|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH v2 2/3] build32: don't discard .shstrtab in linker script
LLVM linker doesn't support discarding .shstrtab, and complains with:
ld -melf_i386_fbsd -N -T build32.lds -o reloc.lnk reloc.o
ld: error: discarding .shstrtab section is not allowed
Add an explicit .shstrtab section to the linker script after the text
section in order to make LLVM LD happy.
Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
---
xen/arch/x86/boot/build32.lds | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/xen/arch/x86/boot/build32.lds b/xen/arch/x86/boot/build32.lds
index 97454b40ff..5bd42ee4d9 100644
--- a/xen/arch/x86/boot/build32.lds
+++ b/xen/arch/x86/boot/build32.lds
@@ -50,6 +50,11 @@ SECTIONS
*(.got.plt)
}
+ .shstrtab : {
+ /* Discarding .shstrtab is not supported by LLD (LLVM LD). */
+ *(.shstrtab)
+ }
+
/DISCARD/ : {
/*
* Discard everything else, to prevent linkers from putting
--
2.26.2
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |