104 lines
2.5 KiB
Plaintext
104 lines
2.5 KiB
Plaintext
|
|
PHDRS
|
|
{
|
|
vxgos_load PT_LOAD FLAGS(1);
|
|
}
|
|
|
|
SECTIONS
|
|
{
|
|
/* set the base address to zero. This is really usefull when patching
|
|
* symbols "on-the-fly" during runtime */
|
|
. = 0x00000000 ;
|
|
|
|
/* used for the self-translation step if needed */
|
|
___bootloader_code_start = . ;
|
|
|
|
/* explicitly isolate the "pre text" code which should be executed first */
|
|
.bootloader : {
|
|
KEEP(*(.bootloader.header))
|
|
KEEP(*(.bootloader.pre_text))
|
|
KEEP(*(.bootloader.text))
|
|
} : vxgos_load
|
|
|
|
/* assembly code should be inserted here */
|
|
.text : {
|
|
*(.text.entry)
|
|
*(.text)
|
|
*(.text.*)
|
|
}
|
|
|
|
/* Read-only sections */
|
|
.rodata : {
|
|
*(.rodata)
|
|
*(.rodata.*)
|
|
}
|
|
|
|
/* uninitialized globals (must be 16-aligned) */
|
|
.bss ALIGN(16) (NOLOAD) : {
|
|
*(.bss)
|
|
*(.bss.*)
|
|
|
|
. = ALIGN(16) ;
|
|
|
|
. = . + (16 * 1024) ;
|
|
__bootloader_stack = ALIGN(16) ;
|
|
}
|
|
|
|
/* readable / writable data (must be 16-aligned) */
|
|
.data ALIGN(16) : {
|
|
*(.data)
|
|
*(.data.*)
|
|
*(COMMON)
|
|
. = ALIGN(16) ;
|
|
}
|
|
|
|
/* We do not want any PLT/GOT information in this part of the code */
|
|
.plt : { *(.plt) }
|
|
.plt.got : { *(.plt.got) }
|
|
ASSERT(SIZEOF(.plt) == 0, "unexpected '.plt' entries")
|
|
ASSERT(SIZEOF(.plt.got) == 0, "unexpected '.plt.got' entries")
|
|
|
|
/* Dynamic linking information
|
|
* Generated by linker when linking with "-pie" */
|
|
.dynamic : { *(.dynamic) }
|
|
.rela.dyn : { *(.rela.dyn) }
|
|
.rel.dyn : { *(.rel.dyn) }
|
|
.relr.dyn : { *(.relr.dyn) }
|
|
.dynsym : { *(.dynsym) }
|
|
.dynstr : { *(.dynstr) }
|
|
.gnu.hash : { *(.gnu.hash) }
|
|
|
|
/* Gloabal offset table
|
|
* We don't want/need any GOT entries, but BFD LD insert an entry
|
|
* ("_DYNAMIC") into '.got', as required by ABI, and three empty entry on
|
|
* some architecture. */
|
|
.got : { *(.got.plt) *(.got) }
|
|
/*ASSERT(
|
|
SIZEOF(.got) <= (4 * 8),
|
|
"'.got' should contain only ABI-required entries"
|
|
)*/
|
|
|
|
/* indicate the end of the bootloader
|
|
* this symbols will be used to resolve ASLR patching during runtime */
|
|
___bootloader_code_end = . ;
|
|
|
|
/* unwanted sections */
|
|
/DISCARD/ : {
|
|
*(.gnu.*)
|
|
*(.debug_info)
|
|
*(.debug_abbrev)
|
|
*(.debug_loc)
|
|
*(.debug_aranges)
|
|
*(.debug_ranges)
|
|
*(.debug_line)
|
|
*(.debug_str)
|
|
*(.debug_*)
|
|
*(.jcr)
|
|
*(.eh_frame_hdr)
|
|
*(.eh_frame)
|
|
*(.comment)
|
|
*(.interp)
|
|
*(.note.*)
|
|
}
|
|
}
|