]> xenbits.xensource.com Git - xen.git/commit
linker/lld: do not generate quoted section names
authorRoger Pau Monné <roger.pau@citrix.com>
Mon, 2 May 2022 06:51:45 +0000 (08:51 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 2 May 2022 06:51:45 +0000 (08:51 +0200)
commit702c9a800eb3ecd4b8595998d37a769d470c5bb0
tree4284cf99750aabb306b51780b48d0d448d12d45a
parentc70c4b624f85f7d4e28c70a804a0a3f20d73092b
linker/lld: do not generate quoted section names

LLVM LD doesn't strip the quotes from the section names, and so the
resulting binary ends up with section names like:

  [ 1] ".text"           PROGBITS         ffff82d040200000  00008000
       000000000018cbc1  0000000000000000  AX       0     0     4096

This confuses some tools (like gdb) and prevents proper parsing of the
binary.

The issue has already been reported and is being fixed in LLD.  In
order to workaround this issue and keep the GNU ld support define
different DECL_SECTION macros depending on the used ld
implementation.

Drop the quotes from the definitions of the debug sections in
DECL_DEBUG{2}, as those quotes are not required for GNU ld either.

Fixes: 6254920587c3 ('x86: quote section names when defining them in linker script')
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/xen.lds.S
xen/include/xen/xen.lds.h