d39106b3e4
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>
80 lines
1.4 KiB
Plaintext
80 lines
1.4 KiB
Plaintext
OUTPUT_FORMAT("elf64-ia64-little")
|
|
OUTPUT_ARCH(ia64)
|
|
ENTRY(_start_plabel)
|
|
SECTIONS
|
|
{
|
|
. = 0;
|
|
ImageBase = .;
|
|
.hash : { *(.hash) } /* this MUST come first! */
|
|
. = ALIGN(4096);
|
|
.text :
|
|
{
|
|
_text = .;
|
|
*(.text)
|
|
*(.text.*)
|
|
*(.gnu.linkonce.t.*)
|
|
. = ALIGN(16);
|
|
}
|
|
_etext = .;
|
|
_text_size = . - _text;
|
|
. = ALIGN(4096);
|
|
__gp = ALIGN (8) + 0x200000;
|
|
.sdata :
|
|
{
|
|
_data = .;
|
|
*(.got.plt)
|
|
*(.got)
|
|
*(.srodata)
|
|
*(.sdata)
|
|
*(.sbss)
|
|
*(.scommon)
|
|
}
|
|
. = ALIGN(4096);
|
|
.data :
|
|
{
|
|
*(.rodata*)
|
|
*(.ctors)
|
|
*(.data*)
|
|
*(.gnu.linkonce.d*)
|
|
*(.plabel) /* data whose relocs we want to ignore */
|
|
/* the EFI loader doesn't seem to like a .bss section, so we stick
|
|
it all into .data: */
|
|
*(.dynbss)
|
|
*(.bss)
|
|
*(COMMON)
|
|
}
|
|
.note.gnu.build-id : { *(.note.gnu.build-id) }
|
|
|
|
. = ALIGN(4096);
|
|
.dynamic : { *(.dynamic) }
|
|
. = ALIGN(4096);
|
|
.rela :
|
|
{
|
|
*(.rela.text)
|
|
*(.rela.data*)
|
|
*(.rela.sdata)
|
|
*(.rela.got)
|
|
*(.rela.gnu.linkonce.d*)
|
|
*(.rela.stab)
|
|
*(.rela.ctors)
|
|
}
|
|
_edata = .;
|
|
_data_size = . - _etext;
|
|
. = ALIGN(4096);
|
|
.reloc : /* This is the PECOFF .reloc section! */
|
|
{
|
|
*(.reloc)
|
|
}
|
|
. = ALIGN(4096);
|
|
.dynsym : { *(.dynsym) }
|
|
. = ALIGN(4096);
|
|
.dynstr : { *(.dynstr) }
|
|
/DISCARD/ :
|
|
{
|
|
*(.rela.plabel)
|
|
*(.rela.reloc)
|
|
*(.IA_64.unwind*)
|
|
*(.IA64.unwind*)
|
|
}
|
|
}
|