diff options
author | Nigel Croxon <nigel.croxon@hpe.com> | 2016-02-25 09:36:53 -0500 |
---|---|---|
committer | Nigel Croxon <nigel.croxon@hpe.com> | 2016-02-25 09:36:53 -0500 |
commit | d39106b3e415b7f4927f81650ac469bc147c227f (patch) | |
tree | d10100072350261b452075d3749137ffec2b06b6 /gnuefi/elf_x86_64_efi.lds | |
parent | 06db4a2b538f8b1dbdb5e1c4f2f0617e67491c80 (diff) | |
download | gnu-efi-d39106b3e415b7f4927f81650ac469bc147c227f.tar.gz |
Apparently some linkers will just throw caution to the wind and
decide to stick stuff we don't explicitly mention at 0,
no matter what else has already explicitly been located there.
A debian/ubuntu builder noted:
gcc -O0 -g3 -fpic -Wall -fshort-wchar -fno-strict-aliasing \
-fno-merge-constants -ffreestanding -fno-stack-protector \
-fno-stack-check --std=c11 -DCONFIG_aarch64 -D__KERNEL__ \
-I/usr/include/efi/ -I/usr/include/efi/aarch64/ \
-iquote/«PKGBUILDDIR»/include "-DDEBUGDIR=L\"/\"" \
-ffreestanding -I/usr/lib/gcc/aarch64-linux-gnu/4.9/include \
-c -o fakeesrt2.o fakeesrt2.c
ld -nostdlib --warn-common --no-undefined --fatal-warnings -shared \
-Bsymbolic -L/usr/lib -L/usr/lib --build-id=sha1 \
/usr/lib/crt0-efi-aarch64.o --defsym=EFI_SUBSYSTEM=0xa \
-o fakeesrt2.so fakeesrt2.o -lefi -lgnuefi \
/usr/lib/gcc/aarch64-linux-gnu/4.9/libgcc.a \
-T elf_aarch64_efi.lds
ld: section .note.gnu.build-id loaded at [00000000,00000023] overlaps section .text loaded at [00000000,0000668f]
This shouldn't be a problem if we explicitly tell it where to put them.
Ard added a patch to do this on Arm and aarch64 targets in 16409cad4cb,
but it needs to be everywhere.
Signed-off-by: Peter Jones <pjones@redhat.com>
Signed-off-by: Nigel Croxon <nigel.croxon@hpe.com>
Diffstat (limited to 'gnuefi/elf_x86_64_efi.lds')
-rw-r--r-- | gnuefi/elf_x86_64_efi.lds | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gnuefi/elf_x86_64_efi.lds b/gnuefi/elf_x86_64_efi.lds index 3862d9f..942d1f3 100644 --- a/gnuefi/elf_x86_64_efi.lds +++ b/gnuefi/elf_x86_64_efi.lds @@ -46,6 +46,8 @@ SECTIONS *(COMMON) *(.rel.local) } + .note.gnu.build-id : { *(.note.gnu.build-id) } + _edata = .; _data_size = . - _etext; . = ALIGN(4096); |