linker/lld: do not generate quoted section names
authorRoger Pau Monné <roger.pau@citrix.com>
Tue, 7 Jun 2022 12:05:24 +0000 (14:05 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 7 Jun 2022 12:05:24 +0000 (14:05 +0200)
commit88b653f73928117461dc250acd1e830a47a14c2b
tree59b2ef557f4491e30b6898871f1800094a1c35e1
parent3754bd128d1a6b3d5864d1a3ee5d27b67d35387a
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>
master commit: 702c9a800eb3ecd4b8595998d37a769d470c5bb0
master date: 2022-05-02 08:51:45 +0200
xen/arch/x86/xen.lds.S