2008-09-01 02:26:09 -07:00
|
|
|
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
|
|
|
|
|
OUTPUT_ARCH(arm)
|
|
|
|
|
|
|
|
|
|
ENTRY(_start)
|
|
|
|
|
SECTIONS
|
|
|
|
|
{
|
2015-10-26 16:33:39 -07:00
|
|
|
. = %ROMBASE%;
|
2016-03-09 15:23:25 -08:00
|
|
|
__rom_start = .;
|
2008-09-01 02:26:09 -07:00
|
|
|
|
2015-10-26 16:33:39 -07:00
|
|
|
/* text/read-only data */
|
|
|
|
|
.text : {
|
2021-02-05 16:59:12 -08:00
|
|
|
KEEP(*(.text.boot.secondstage))
|
2015-10-26 16:33:39 -07:00
|
|
|
KEEP(*(.text.boot.vectab1))
|
|
|
|
|
KEEP(*(.text.boot.vectab2))
|
|
|
|
|
KEEP(*(.text.boot))
|
|
|
|
|
*(.text* .sram.text.glue_7* .gnu.linkonce.t.*)
|
|
|
|
|
}
|
2009-04-24 11:45:25 -07:00
|
|
|
|
2015-10-26 16:33:39 -07:00
|
|
|
.interp : { *(.interp) }
|
|
|
|
|
.hash : { *(.hash) }
|
|
|
|
|
.dynsym : { *(.dynsym) }
|
|
|
|
|
.dynstr : { *(.dynstr) }
|
|
|
|
|
.rel.text : { *(.rel.text) *(.rel.gnu.linkonce.t*) }
|
|
|
|
|
.rela.text : { *(.rela.text) *(.rela.gnu.linkonce.t*) }
|
|
|
|
|
.rel.data : { *(.rel.data) *(.rel.gnu.linkonce.d*) }
|
|
|
|
|
.rela.data : { *(.rela.data) *(.rela.gnu.linkonce.d*) }
|
|
|
|
|
.rel.rodata : { *(.rel.rodata) *(.rel.gnu.linkonce.r*) }
|
|
|
|
|
.rela.rodata : { *(.rela.rodata) *(.rela.gnu.linkonce.r*) }
|
|
|
|
|
.rel.got : { *(.rel.got) }
|
|
|
|
|
.rela.got : { *(.rela.got) }
|
|
|
|
|
.rel.ctors : { *(.rel.ctors) }
|
|
|
|
|
.rela.ctors : { *(.rela.ctors) }
|
|
|
|
|
.rel.dtors : { *(.rel.dtors) }
|
|
|
|
|
.rela.dtors : { *(.rela.dtors) }
|
|
|
|
|
.rel.init : { *(.rel.init) }
|
|
|
|
|
.rela.init : { *(.rela.init) }
|
|
|
|
|
.rel.fini : { *(.rel.fini) }
|
|
|
|
|
.rela.fini : { *(.rela.fini) }
|
|
|
|
|
.rel.bss : { *(.rel.bss) }
|
|
|
|
|
.rela.bss : { *(.rela.bss) }
|
|
|
|
|
.rel.plt : { *(.rel.plt) }
|
|
|
|
|
.rela.plt : { *(.rela.plt) }
|
|
|
|
|
.init : { *(.init) } =0x9090
|
|
|
|
|
.plt : { *(.plt) }
|
2008-09-01 02:26:09 -07:00
|
|
|
|
2015-10-26 16:33:39 -07:00
|
|
|
/* .ARM.exidx is sorted, so has to go in its own output section. */
|
|
|
|
|
__exidx_start = .;
|
|
|
|
|
.ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) }
|
|
|
|
|
__exidx_end = .;
|
2012-05-09 01:44:57 -07:00
|
|
|
|
2015-10-26 16:33:39 -07:00
|
|
|
.rodata : ALIGN(4) {
|
|
|
|
|
__rodata_start = .;
|
|
|
|
|
__fault_handler_table_start = .;
|
|
|
|
|
KEEP(*(.rodata.fault_handler_table))
|
|
|
|
|
__fault_handler_table_end = .;
|
|
|
|
|
*(.rodata .rodata.* .gnu.linkonce.r.*)
|
|
|
|
|
}
|
2012-04-10 14:19:16 -07:00
|
|
|
|
2015-10-26 16:33:39 -07:00
|
|
|
/* fake section for .data to anchor off of
|
|
|
|
|
* needed because extra linker scripts tend to insert sections
|
|
|
|
|
* just after .rodata
|
|
|
|
|
*/
|
2015-11-06 15:53:28 -08:00
|
|
|
.dummy_post_rodata : {
|
2015-10-26 16:33:39 -07:00
|
|
|
/* end of rodata, start of data area */
|
|
|
|
|
__rodata_end = . ;
|
2016-03-09 15:23:25 -08:00
|
|
|
__rom_end = . ;
|
2015-10-26 16:33:39 -07:00
|
|
|
__data_start_rom = .;
|
|
|
|
|
}
|
2013-01-12 20:30:22 -08:00
|
|
|
|
2015-10-26 16:33:39 -07:00
|
|
|
/* in two segment binaries, the data starts at the bottom of ram (MEMBASE)
|
|
|
|
|
* bump us forward to the start of ram
|
|
|
|
|
*/
|
|
|
|
|
. = %MEMBASE%;
|
2012-11-10 18:26:12 -08:00
|
|
|
|
2015-10-26 16:33:39 -07:00
|
|
|
/* start .data segment, force the physical address to be AT() __data_start_rom */
|
2015-11-06 15:53:28 -08:00
|
|
|
.data : AT ( ADDR (.dummy_post_rodata) + SIZEOF (.dummy_post_rodata) ) ALIGN(4) {
|
2015-10-26 16:33:39 -07:00
|
|
|
__data_start = .;
|
|
|
|
|
*(.data .data.* .gnu.linkonce.d.*)
|
|
|
|
|
}
|
2008-09-01 02:26:09 -07:00
|
|
|
|
2015-10-26 16:33:39 -07:00
|
|
|
/* code that is located in ram */
|
|
|
|
|
.sram.text : ALIGN(4) {
|
|
|
|
|
KEEP (*(.sram.text*))
|
|
|
|
|
}
|
|
|
|
|
.ctors : ALIGN(4) {
|
|
|
|
|
__ctor_list = .;
|
2025-09-26 20:17:15 +08:00
|
|
|
KEEP(*(.ctors .init_array*))
|
2015-10-26 16:33:39 -07:00
|
|
|
__ctor_end = .;
|
|
|
|
|
}
|
|
|
|
|
.dtors : ALIGN(4) {
|
|
|
|
|
__dtor_list = .;
|
2025-09-26 20:17:15 +08:00
|
|
|
KEEP(*(.dtors .fini_array*))
|
2015-10-26 16:33:39 -07:00
|
|
|
__dtor_end = .;
|
|
|
|
|
}
|
|
|
|
|
.got : { *(.got.plt) *(.got) }
|
|
|
|
|
.dynamic : { *(.dynamic) }
|
2008-09-01 02:26:09 -07:00
|
|
|
|
2015-11-06 15:53:28 -08:00
|
|
|
/*
|
|
|
|
|
* extra linker scripts tend to insert sections just after .data,
|
|
|
|
|
* so we want to make sure this symbol comes after anything inserted above,
|
|
|
|
|
* but not aligned to the next section necessarily.
|
|
|
|
|
*/
|
|
|
|
|
.dummy_post_data : {
|
2015-10-26 16:33:39 -07:00
|
|
|
__data_end = .;
|
2015-11-06 15:53:28 -08:00
|
|
|
}
|
2012-05-09 02:08:34 -07:00
|
|
|
|
2016-08-15 17:55:40 +02:00
|
|
|
/* uninitialized data (in same segment as writable data) */
|
2015-11-06 15:53:28 -08:00
|
|
|
.bss : ALIGN(4) {
|
2015-10-26 16:33:39 -07:00
|
|
|
KEEP(*(.bss.prebss.*))
|
|
|
|
|
. = ALIGN(4);
|
|
|
|
|
__bss_start = .;
|
|
|
|
|
*(.bss .bss.*)
|
|
|
|
|
*(.gnu.linkonce.b.*)
|
|
|
|
|
*(COMMON)
|
|
|
|
|
. = ALIGN(4);
|
|
|
|
|
__bss_end = .;
|
|
|
|
|
}
|
2012-05-09 02:08:34 -07:00
|
|
|
|
2015-10-26 16:33:39 -07:00
|
|
|
_end = .;
|
2008-09-01 02:26:09 -07:00
|
|
|
|
2015-10-26 16:33:39 -07:00
|
|
|
. = %MEMBASE% + %MEMSIZE%;
|
|
|
|
|
_end_of_ram = .;
|
2008-09-01 02:26:09 -07:00
|
|
|
|
2015-10-26 16:33:39 -07:00
|
|
|
/* Strip unnecessary stuff */
|
|
|
|
|
/DISCARD/ : { *(.comment .note .eh_frame) }
|
2008-09-01 02:26:09 -07:00
|
|
|
}
|