77 lines
2.7 KiB
Plaintext
77 lines
2.7 KiB
Plaintext
/* Default linker script, for normal executables */
|
|
OUTPUT_FORMAT("elf64-littleaarch64", "elf64-bigaarch64",
|
|
"elf64-littleaarch64")
|
|
OUTPUT_ARCH(aarch64)
|
|
ENTRY(_start)
|
|
SECTIONS
|
|
{
|
|
/* Read-only sections, merged into text segment: */
|
|
PROVIDE (__kernel_text = .;
|
|
.text :
|
|
{
|
|
PROVIDE_HIDDEN (__eprol = .);
|
|
*(.text)
|
|
*(.text.unlikely .text.*_unlikely)
|
|
*(.text.exit .text.exit.*)
|
|
*(.text.startup .text.startup.*)
|
|
*(.text.hot .text.hot.*)
|
|
*(.stub .text.* .gnu.linkonce.t.*)
|
|
/* .gnu.warning sections are handled specially by elf32.em. */
|
|
. = ALIGN(0x800)
|
|
*(.vectors)
|
|
} =0
|
|
.rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
|
|
.rodata1 : { *(.rodata1) }
|
|
.eh_frame_hdr : { *(.eh_frame_hdr) }
|
|
.eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) }
|
|
.gcc_except_table : ONLY_IF_RO { *(.gcc_except_table
|
|
.gcc_except_table.*) }
|
|
/* These sections are generated by the Sun/Oracle C++ compiler. */
|
|
.exception_ranges : ONLY_IF_RO { *(.exception_ranges
|
|
.exception_ranges*) }
|
|
PROVIDE (__etext = .);
|
|
PROVIDE (_etext = .);
|
|
PROVIDE (etext = .);
|
|
/* Adjust the address for the data segment. We want to adjust up to
|
|
the same address within the page on the next page up. */
|
|
. = ALIGN (CONSTANT (MAXPAGESIZE)) - ((CONSTANT (MAXPAGESIZE) - .) & (CONSTANT (MAXPAGESIZE) - 1)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
|
|
/* Exception handling */
|
|
.eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) }
|
|
.gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
|
|
.exception_ranges : ONLY_IF_RW { *(.exception_ranges .exception_ranges*) }
|
|
.got : { *(.got) *(.igot) }
|
|
. = DATA_SEGMENT_RELRO_END (24, .);
|
|
.got.plt : { *(.got.plt) *(.igot.plt) }
|
|
.data :
|
|
{
|
|
PROVIDE (__data_start = .);
|
|
*(.data .data.* .gnu.linkonce.d.*)
|
|
SORT(CONSTRUCTORS)
|
|
}
|
|
.data1 : { *(.data1) }
|
|
_edata = .; PROVIDE (edata = .);
|
|
. = .;
|
|
__bss_start = .;
|
|
__bss_start__ = .;
|
|
.bss :
|
|
{
|
|
*(.dynbss)
|
|
*(.bss .bss.* .gnu.linkonce.b.*)
|
|
*(COMMON)
|
|
/* Align here to ensure that the .bss section occupies space up to
|
|
_end. Align after .bss to ensure correct alignment even if the
|
|
.bss section disappears because there are no input sections.
|
|
FIXME: Why do we need it? When there is no .bss section, we don't
|
|
pad the .data section. */
|
|
. = ALIGN(. != 0 ? 32 / 8 : 1);
|
|
}
|
|
_bss_end__ = . ; __bss_end__ = . ;
|
|
. = ALIGN(32 / 8);
|
|
. = ALIGN(32 / 8);
|
|
__end__ = . ;
|
|
_end = .; PROVIDE (end = .);
|
|
. = DATA_SEGMENT_END (.);
|
|
.ARM.attributes 0 : { KEEP (*(.ARM.attributes)) KEEP (*(.gnu.attributes)) }
|
|
.note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }
|
|
}
|