x86: quote section names when defining them in linker script

LLVM ld seems to require section names to be quoted at both definition
and when referencing them for a match to happen, or else we get the
following errors:

ld: error: xen.lds:45: undefined section ".text"
ld: error: xen.lds:69: undefined section ".rodata"
ld: error: xen.lds:104: undefined section ".note.gnu.build-id"
[...]

The original fix for GNU ld 2.37 only quoted the section name when
referencing it in the ADDR function. Fix by also quoting the section
names when declaring them.

Fixes: 58ad654ebc ("x86: work around build issue with GNU ld 2.37")
Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
master commit: 6254920587
master date: 2021-09-15 11:02:21 +0200
This commit is contained in:
Roger Pau Monné authored and Jan Beulich committed 2021-10-15 11:03:18 +02:00
1 parent c3c9a7c890
commit c67f652339
1 file changed
+1 -1
+1 -1
View File
@@ -18,7 +18,7 @@ ENTRY(efi_start)
#else /* !EFI */
#define FORMAT "elf64-x86-64"
#define DECL_SECTION(x) x : AT(ADDR(#x) - __XEN_VIRT_START)
#define DECL_SECTION(x) #x : AT(ADDR(#x) - __XEN_VIRT_START)
ENTRY(start_pa)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.