Travis Geiselbrecht | 1d0df69 | 2008-09-01 02:26:09 -0700 | [diff] [blame] | 1 | OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") |
| 2 | OUTPUT_ARCH(arm) |
| 3 | |
| 4 | ENTRY(_start) |
| 5 | SECTIONS |
| 6 | { |
| 7 | . = %ROMBASE%; |
| 8 | |
| 9 | .interp : { *(.interp) } |
| 10 | .hash : { *(.hash) } |
| 11 | .dynsym : { *(.dynsym) } |
| 12 | .dynstr : { *(.dynstr) } |
| 13 | .rel.text : { *(.rel.text) *(.rel.gnu.linkonce.t*) } |
| 14 | .rela.text : { *(.rela.text) *(.rela.gnu.linkonce.t*) } |
| 15 | .rel.data : { *(.rel.data) *(.rel.gnu.linkonce.d*) } |
| 16 | .rela.data : { *(.rela.data) *(.rela.gnu.linkonce.d*) } |
| 17 | .rel.rodata : { *(.rel.rodata) *(.rel.gnu.linkonce.r*) } |
| 18 | .rela.rodata : { *(.rela.rodata) *(.rela.gnu.linkonce.r*) } |
| 19 | .rel.got : { *(.rel.got) } |
| 20 | .rela.got : { *(.rela.got) } |
| 21 | .rel.ctors : { *(.rel.ctors) } |
| 22 | .rela.ctors : { *(.rela.ctors) } |
| 23 | .rel.dtors : { *(.rel.dtors) } |
| 24 | .rela.dtors : { *(.rela.dtors) } |
| 25 | .rel.init : { *(.rel.init) } |
| 26 | .rela.init : { *(.rela.init) } |
| 27 | .rel.fini : { *(.rel.fini) } |
| 28 | .rela.fini : { *(.rela.fini) } |
| 29 | .rel.bss : { *(.rel.bss) } |
| 30 | .rela.bss : { *(.rela.bss) } |
| 31 | .rel.plt : { *(.rel.plt) } |
| 32 | .rela.plt : { *(.rela.plt) } |
| 33 | .init : { *(.init) } =0x9090 |
| 34 | .plt : { *(.plt) } |
| 35 | |
| 36 | /* text/read-only data */ |
| 37 | .text : { *(.text .text.* .glue_7* .gnu.linkonce.t.*) } =0x9090 |
| 38 | |
| 39 | .rodata : { |
| 40 | *(.rodata .rodata.* .gnu.linkonce.r.*) |
Travis Geiselbrecht | 887061f | 2008-09-05 01:47:07 -0700 | [diff] [blame] | 41 | . = ALIGN(4); |
Travis Geiselbrecht | 1d0df69 | 2008-09-01 02:26:09 -0700 | [diff] [blame] | 42 | __commands_start = .; |
| 43 | KEEP (*(.commands)) |
| 44 | __commands_end = .; |
Travis Geiselbrecht | 6837223 | 2009-01-24 21:21:08 -0800 | [diff] [blame] | 45 | . = ALIGN(4); |
| 46 | __apps_start = .; |
| 47 | KEEP (*(.apps)) |
| 48 | __apps_end = .; |
Travis Geiselbrecht | 1d0df69 | 2008-09-01 02:26:09 -0700 | [diff] [blame] | 49 | . = ALIGN(4); |
| 50 | __rodata_end = . ; |
| 51 | } |
| 52 | |
| 53 | /* writable data */ |
| 54 | __data_start_rom = .; |
| 55 | . = %MEMBASE%; |
| 56 | __data_start = .; |
| 57 | .data : |
| 58 | AT ( ADDR (.rodata) + SIZEOF (.rodata) ) |
| 59 | { *(.data .data.* .gnu.linkonce.d.*) } |
| 60 | |
| 61 | __ctor_list = .; |
| 62 | .ctors : { *(.ctors) } |
| 63 | __ctor_end = .; |
| 64 | __dtor_list = .; |
| 65 | .dtors : { *(.dtors) } |
| 66 | __dtor_end = .; |
| 67 | .got : { *(.got.plt) *(.got) } |
| 68 | .dynamic : { *(.dynamic) } |
| 69 | |
| 70 | __data_end = .; |
| 71 | |
| 72 | /* unintialized data (in same segment as writable data) */ |
| 73 | . = ALIGN(4); |
| 74 | __bss_start = .; |
| 75 | .bss : { *(.bss .bss.*) } |
| 76 | |
| 77 | . = ALIGN(4); |
| 78 | _end = . ; |
| 79 | |
| 80 | . = %MEMBASE% + %MEMSIZE%; |
| 81 | _end_of_ram = . ; |
| 82 | |
| 83 | /* Strip unnecessary stuff */ |
| 84 | /DISCARD/ : { *(.comment .note .eh_frame) } |
| 85 | } |