Commit 62549205 authored by Roger Pau Monné's avatar Roger Pau Monné Committed by Jan Beulich

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: undefined section ".text"
ld: error: undefined section ".rodata"
ld: error: undefined section ""

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: 58ad654e ("x86: work around build issue with GNU ld 2.37")
Reported-by: default avatarAndrew Cooper <>
Signed-off-by: default avatarRoger Pau Monné <>
Reviewed-by: default avatarJan Beulich <>
parent e5046fc6
......@@ -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)
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment