Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
- OUTPUT_ARCH(arm)
- ENTRY(_start)
- MEMORY {
- itcm : ORIGIN = 0x01FF8000, LENGTH = 32K
- ewram : ORIGIN = 0x02000800, LENGTH = 4M
- dtcm : ORIGIN = 0x027E0000, LENGTH = 16K
- }
- /* Memory Sections */
- __itcm__ = ORIGIN(itcm);
- __dtcm__ = ORIGIN(dtcm);
- __itcm_bot__ = ORIGIN(itcm);
- __dtcm_bot__ = ORIGIN(dtcm);
- __itcm_top__ = ORIGIN(itcm) + LENGTH(itcm);
- __dtcm_top__ = ORIGIN(dtcm) + LENGTH(dtcm);
- /* Stack Config */
- __sp_len__ = 0x200;
- __sp_irq__ = __dtcm_top__ - (__sp_len__*1);
- __sp_svc__ = __dtcm_top__ - (__sp_len__*2);
- __sp_usr__ = __dtcm_top__ - (__sp_len__*3);
- SECTIONS {
- . = ORIGIN(ewram);
- __text_bot__ = . ;
- .init : {
- KEEP (*(.init))
- . = ALIGN(4);
- } >ewram
- .plt : {
- *(.plt)
- . = ALIGN(4);
- } >ewram
- .text : {
- *(EXCLUDE_FILE (*.itcm*) .text)
- *(EXCLUDE_FILE (*.itcm*) .text.*)
- *(.stub)
- *(.gnu.warning)
- *(.gnu.linkonce.t*)
- *(.glue_7 .glue_7t)
- . = ALIGN(4);
- } >ewram
- .fini : {
- KEEP (*(.fini))
- . = ALIGN(4);
- } >ewram
- __text_top__ = . ;
- __data_bot__ = . ;
- .rodata : {
- *all.rodata*(*)
- *(.roda .rodata .rodata.*)
- *(.gnu.linkonce.r*)
- SORT(CONSTRUCTORS)
- . = ALIGN(4);
- } >ewram
- .ctors : {
- KEEP (*crtbegin.o(.ctors))
- KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors))
- KEEP (*(SORT(.ctors.*)))
- KEEP (*(.ctors))
- . = ALIGN(4);
- } >ewram
- .dtors : {
- KEEP (*crtbegin.o(.dtors))
- KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors))
- KEEP (*(SORT(.dtors.*)))
- KEEP (*(.dtors))
- . = ALIGN(4);
- } >ewram
- .eh_frame : {
- KEEP (*(.eh_frame))
- . = ALIGN(4);
- } >ewram
- .gcc_except_table : {
- KEEP (*(.gcc_except_table))
- . = ALIGN(4);
- } >ewram
- .jcr : {
- KEEP (*(.jcr))
- . = ALIGN(4);
- } >ewram
- .got : {
- *(.got.plt .rel.got .got)
- . = ALIGN(4);
- } >ewram
- .ewram : {
- *(.ewram .ewram.*)
- *ewram.*(.text)
- . = ALIGN(4);
- } >ewram
- .data : {
- *(.data .data.*)
- *(.gnu.linkonce.d*)
- CONSTRUCTORS
- . = ALIGN(4);
- } >ewram
- __data_top__ = . ;
- __itcmlma__ = . ;
- __itcmlma_bot__ = . ;
- __itcmlma_top__ = . + SIZEOF(.itcm);
- .itcm __itcm__ : AT(__itcmlma__) {
- *(.itcm .itcm.*)
- *itcm.*(.text)
- . = ALIGN(4);
- } >itcm
- __dtcmlma__ = __itcmlma__ + SIZEOF(.itcm);
- __dtcmlma_bot__ = __itcmlma__ + SIZEOF(.itcm);
- __dtcmlma_top__ = __itcmlma__ + SIZEOF(.itcm) + SIZEOF(.dtcm);
- .dtcm __dtcm__ : AT(__dtcmlma__) {
- *(.dtcm .dtcm.*)
- . = ALIGN(4);
- } >dtcm
- .sbss __dtcm_top__ (NOLOAD) : {
- __sbss__ = . ;
- __sbss_bot__ = . ;
- *(.dynsbss)
- *(.sbss .sbss.*)
- *(.scommon)
- . = ALIGN(4);
- __sbss_top__ = . ;
- } >dtcm
- .bss __data_top__ (NOLOAD) : {
- __bss__ = . ;
- __bss_bot__ = . ;
- *(.dynbss)
- *(.bss .bss.*)
- *(.gnu.linkonce.b*)
- *(COMMON)
- . = ALIGN(4);
- __bss_top__ = . ;
- __end__ = . ;
- } AT>ewram
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement