|
| 1 | +/* This linker script generated from xt-genldscripts.tpp for LSP . */ |
| 2 | +/* Linker Script for ld -N */ |
| 3 | +MEMORY |
| 4 | +{ |
| 5 | + dport0_0_seg : org = 0x3FF00000, len = 0x10 |
| 6 | + dram0_0_seg : org = 0x3FFE8000, len = 0x14000 |
| 7 | + iram1_0_seg : org = 0x4010f800, len = 0x800 |
| 8 | + irom0_0_seg : org = 0x40240000, len = 0x32000 |
| 9 | +} |
| 10 | + |
| 11 | +PHDRS |
| 12 | +{ |
| 13 | + dport0_0_phdr PT_LOAD; |
| 14 | + dram0_0_phdr PT_LOAD; |
| 15 | + dram0_0_bss_phdr PT_LOAD; |
| 16 | + iram1_0_phdr PT_LOAD; |
| 17 | + irom0_0_phdr PT_LOAD; |
| 18 | +} |
| 19 | + |
| 20 | + |
| 21 | +/* Default entry point: */ |
| 22 | +ENTRY(main) |
| 23 | +PROVIDE(_memmap_vecbase_reset = 0x40000000); |
| 24 | +/* Various memory-map dependent cache attribute settings: */ |
| 25 | +_memmap_cacheattr_wb_base = 0x00000110; |
| 26 | +_memmap_cacheattr_wt_base = 0x00000110; |
| 27 | +_memmap_cacheattr_bp_base = 0x00000220; |
| 28 | +_memmap_cacheattr_unused_mask = 0xFFFFF00F; |
| 29 | +_memmap_cacheattr_wb_trapnull = 0x2222211F; |
| 30 | +_memmap_cacheattr_wba_trapnull = 0x2222211F; |
| 31 | +_memmap_cacheattr_wbna_trapnull = 0x2222211F; |
| 32 | +_memmap_cacheattr_wt_trapnull = 0x2222211F; |
| 33 | +_memmap_cacheattr_bp_trapnull = 0x2222222F; |
| 34 | +_memmap_cacheattr_wb_strict = 0xFFFFF11F; |
| 35 | +_memmap_cacheattr_wt_strict = 0xFFFFF11F; |
| 36 | +_memmap_cacheattr_bp_strict = 0xFFFFF22F; |
| 37 | +_memmap_cacheattr_wb_allvalid = 0x22222112; |
| 38 | +_memmap_cacheattr_wt_allvalid = 0x22222112; |
| 39 | +_memmap_cacheattr_bp_allvalid = 0x22222222; |
| 40 | +PROVIDE(_memmap_cacheattr_reset = _memmap_cacheattr_wb_trapnull); |
| 41 | + |
| 42 | +SECTIONS |
| 43 | +{ |
| 44 | + |
| 45 | + .dport0.rodata : ALIGN(4) |
| 46 | + { |
| 47 | + _dport0_rodata_start = ABSOLUTE(.); |
| 48 | + *(.dport0.rodata) |
| 49 | + *(.dport.rodata) |
| 50 | + _dport0_rodata_end = ABSOLUTE(.); |
| 51 | + } >dport0_0_seg :dport0_0_phdr |
| 52 | + |
| 53 | + .dport0.literal : ALIGN(4) |
| 54 | + { |
| 55 | + _dport0_literal_start = ABSOLUTE(.); |
| 56 | + *(.dport0.literal) |
| 57 | + *(.dport.literal) |
| 58 | + _dport0_literal_end = ABSOLUTE(.); |
| 59 | + } >dport0_0_seg :dport0_0_phdr |
| 60 | + |
| 61 | + .dport0.data : ALIGN(4) |
| 62 | + { |
| 63 | + _dport0_data_start = ABSOLUTE(.); |
| 64 | + *(.dport0.data) |
| 65 | + *(.dport.data) |
| 66 | + _dport0_data_end = ABSOLUTE(.); |
| 67 | + } >dport0_0_seg :dport0_0_phdr |
| 68 | + |
| 69 | + .data : ALIGN(4) |
| 70 | + { |
| 71 | + _heap_start = ABSOLUTE(.); |
| 72 | +/* _stack_sentry = ALIGN(0x8); */ |
| 73 | + } >dram0_0_seg :dram0_0_bss_phdr |
| 74 | +/* __stack = 0x3ffc8000; */ |
| 75 | + |
| 76 | + .text : ALIGN(4) |
| 77 | + { |
| 78 | + _stext = .; |
| 79 | + _text_start = ABSOLUTE(.); |
| 80 | + *(.entry.text) |
| 81 | + *(.init.literal) |
| 82 | + *(.init) |
| 83 | + *(.literal .text .literal.* .text.* .stub .gnu.warning .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*) |
| 84 | + *(.fini.literal) |
| 85 | + *(.fini) |
| 86 | + *(.gnu.version) |
| 87 | + _text_end = ABSOLUTE(.); |
| 88 | + _etext = .; |
| 89 | + . = ALIGN (8); |
| 90 | + _data_start = ABSOLUTE(.); |
| 91 | + *(.data) |
| 92 | + *(.data.*) |
| 93 | + *(.gnu.linkonce.d.*) |
| 94 | + *(.data1) |
| 95 | + *(.sdata) |
| 96 | + *(.sdata.*) |
| 97 | + *(.gnu.linkonce.s.*) |
| 98 | + *(.sdata2) |
| 99 | + *(.sdata2.*) |
| 100 | + *(.gnu.linkonce.s2.*) |
| 101 | + *(.jcr) |
| 102 | + _data_end = ABSOLUTE(.); |
| 103 | + . = ALIGN (8); |
| 104 | + _rodata_start = ABSOLUTE(.); |
| 105 | + *(.rodata) |
| 106 | + *(.rodata.*) |
| 107 | + *(.gnu.linkonce.r.*) |
| 108 | + *(.rodata1) |
| 109 | + __XT_EXCEPTION_TABLE__ = ABSOLUTE(.); |
| 110 | + *(.xt_except_table) |
| 111 | + *(.gcc_except_table) |
| 112 | + *(.gnu.linkonce.e.*) |
| 113 | + *(.gnu.version_r) |
| 114 | + *(.eh_frame) |
| 115 | + /* C++ constructor and destructor tables, properly ordered: */ |
| 116 | + KEEP (*crtbegin.o(.ctors)) |
| 117 | + KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors)) |
| 118 | + KEEP (*(SORT(.ctors.*))) |
| 119 | + KEEP (*(.ctors)) |
| 120 | + KEEP (*crtbegin.o(.dtors)) |
| 121 | + KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors)) |
| 122 | + KEEP (*(SORT(.dtors.*))) |
| 123 | + KEEP (*(.dtors)) |
| 124 | + /* C++ exception handlers table: */ |
| 125 | + __XT_EXCEPTION_DESCS__ = ABSOLUTE(.); |
| 126 | + *(.xt_except_desc) |
| 127 | + *(.gnu.linkonce.h.*) |
| 128 | + __XT_EXCEPTION_DESCS_END__ = ABSOLUTE(.); |
| 129 | + *(.xt_except_desc_end) |
| 130 | + *(.dynamic) |
| 131 | + *(.gnu.version_d) |
| 132 | + . = ALIGN(4); /* this table MUST be 4-byte aligned */ |
| 133 | + _bss_table_start = ABSOLUTE(.); |
| 134 | + LONG(_bss_start) |
| 135 | + LONG(_bss_end) |
| 136 | + _bss_table_end = ABSOLUTE(.); |
| 137 | + _rodata_end = ABSOLUTE(.); |
| 138 | + |
| 139 | + . = ALIGN (8); |
| 140 | + _bss_start = ABSOLUTE(.); |
| 141 | + *(.dynsbss) |
| 142 | + *(.sbss) |
| 143 | + *(.sbss.*) |
| 144 | + *(.gnu.linkonce.sb.*) |
| 145 | + *(.scommon) |
| 146 | + *(.sbss2) |
| 147 | + *(.sbss2.*) |
| 148 | + *(.gnu.linkonce.sb2.*) |
| 149 | + *(.dynbss) |
| 150 | + *(.bss) |
| 151 | + *(.bss.*) |
| 152 | + *(.gnu.linkonce.b.*) |
| 153 | + *(COMMON) |
| 154 | + . = ALIGN (8); |
| 155 | + _bss_end = ABSOLUTE(.); |
| 156 | + } >iram1_0_seg :iram1_0_phdr |
| 157 | + |
| 158 | + .lit4 : ALIGN(4) |
| 159 | + { |
| 160 | + _lit4_start = ABSOLUTE(.); |
| 161 | + *(*.lit4) |
| 162 | + *(.lit4.*) |
| 163 | + *(.gnu.linkonce.lit4.*) |
| 164 | + _lit4_end = ABSOLUTE(.); |
| 165 | + } >iram1_0_seg :iram1_0_phdr |
| 166 | + |
| 167 | + .irom0.text : ALIGN(4) |
| 168 | + { |
| 169 | + _irom0_text_start = ABSOLUTE(.); |
| 170 | + *(.irom0.literal .irom.literal .irom.text.literal .irom0.text .irom.text) |
| 171 | + _irom0_text_end = ABSOLUTE(.); |
| 172 | + } >irom0_0_seg :irom0_0_phdr |
| 173 | +} |
| 174 | + |
| 175 | +/* get ROM code address */ |
| 176 | +INCLUDE "rom.ld" |
0 commit comments