62821e5720
When building loader bits, lld fails with the following error: "ld: error: section: .dynamic is not contiguous with other relro sections" on both ubldr and EFI loader. Move .dynamic up to make ld.lld happy, adjust .got as necessary for ubldr. Tested on: OrangePi One (ld.lld, ubldr) Tested on: Banana Pi-M3 (ld.lld, ubldr) Tested on: qemu-armv7 (ld.lld, EFI) Tested on: qemu-armv7 (ld.bfd, EFI) Tested on: Raspberry Pi 2 (ld.bfd, ubldr) [manu] Tested on: Banana Pi-M2 (ld.bfd, ubldr) [manu] Reviewed by: andrew, emaste, imp Differential Revision: https://reviews.freebsd.org/D13942
68 lines
1.4 KiB
Plaintext
68 lines
1.4 KiB
Plaintext
/* $FreeBSD$ */
|
|
OUTPUT_ARCH(arm)
|
|
ENTRY(_start)
|
|
SECTIONS
|
|
{
|
|
/* Read-only sections, merged into text segment: */
|
|
. = 0;
|
|
ImageBase = .;
|
|
.text : {
|
|
*(.peheader)
|
|
*(.text .stub .text.* .gnu.linkonce.t.*)
|
|
/* .gnu.warning sections are handled specially by elf32.em. */
|
|
*(.gnu.warning)
|
|
*(.gnu.linkonce.t*)
|
|
} =0
|
|
_etext = .;
|
|
PROVIDE (etext = .);
|
|
. = ALIGN(16);
|
|
.data :
|
|
{
|
|
*(.data .data.*)
|
|
*(.gnu.linkonce.d*)
|
|
*(.rodata)
|
|
*(.rodata.*)
|
|
CONSTRUCTORS
|
|
|
|
. = ALIGN(4);
|
|
PROVIDE (__bss_start = .);
|
|
*(.sbss)
|
|
*(.scommon)
|
|
*(.dynsbss)
|
|
*(.dynbss)
|
|
*(.bss)
|
|
*(COMMON)
|
|
. = ALIGN(4);
|
|
PROVIDE (__bss_end = .);
|
|
}
|
|
.dynamic : { *(.dynamic) }
|
|
/* We want the small data sections together, so single-instruction offsets
|
|
can access them all, and initialized data all before uninitialized, so
|
|
we can shorten the on-disk segment size. */
|
|
.sdata : {
|
|
*(.got.plt .got)
|
|
*(.sdata*.sdata.* .gnu.linkonce.s.*)
|
|
}
|
|
set_Xcommand_set : {
|
|
__start_set_Xcommand_set = .;
|
|
*(set_Xcommand_set)
|
|
__stop_set_Xcommand_set = .;
|
|
}
|
|
set_Xficl_compile_set : {
|
|
__start_set_Xficl_compile_set = .;
|
|
*(set_Xficl_compile_set)
|
|
__stop_set_Xficl_compile_set = .;
|
|
}
|
|
__gp = .;
|
|
.plt : { *(.plt) }
|
|
.reloc : { *(.reloc) }
|
|
.dynsym : { *(.dynsym) }
|
|
.dynstr : { *(.dynstr) }
|
|
.rel.dyn : {
|
|
*(.rel.*)
|
|
*(.relset_*)
|
|
}
|
|
_edata = .;
|
|
.hash : { *(.hash) }
|
|
}
|