| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180 |
- OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
- OUTPUT_ARCH(arm)
- ENTRY(_start)
- MEMORY { /* memory map of AT91SAM7S256 */
- ROM (rx) : ORIGIN = 0x00100000, LENGTH = 256k
- RAM (rwx) : ORIGIN = 0x00200000, LENGTH = 64k
- }
- /* The sizes of the stacks used by the application. NOTE: you need to adjust */
- C_STACK_SIZE = 1024;
- IRQ_STACK_SIZE = 0;
- FIQ_STACK_SIZE = 0;
- SVC_STACK_SIZE = 0;
- ABT_STACK_SIZE = 0;
- UND_STACK_SIZE = 0;
- SECTIONS {
- .reset : {
- *startup.o (.text) /* startup code (ARM vectors and reset handler) */
- . = ALIGN(0x4);
- } >ROM
- .fastcode : {
- __fastcode_load = LOADADDR (.fastcode);
- __fastcode_start = .;
- *(.glue_7t) *(.glue_7)
- *isr.o (.text.*)
- *(.text.fastcode)
- /* add other modules here ... */
- . = ALIGN (4);
- __fastcode_end = .;
- } >RAM AT>ROM
- .text : {
- CREATE_OBJECT_SYMBOLS
- *(.text .text.* .gnu.linkonce.t.*)
- *(.plt)
- *(.gnu.warning)
- *(.glue_7t) *(.glue_7) /* NOTE: placed already in .fastcode */
- . = ALIGN (4);
- /* These are for static constructors and destructors under ELF */
- KEEP (*crtbegin.o(.ctors))
- KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
- KEEP (*(SORT(.ctors.*)))
- KEEP (*crtend.o(.ctors))
- KEEP (*crtbegin.o(.dtors))
- KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
- KEEP (*(SORT(.dtors.*)))
- KEEP (*crtend.o(.dtors))
- *(.rodata .rodata.* .gnu.linkonce.r.*)
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- *(.gcc_except_table)
- *(.eh_frame_hdr)
- *(.eh_frame)
- *(.init)
- *(.fini)
- PROVIDE_HIDDEN (__preinit_array_start = .);
- KEEP (*(.preinit_array))
- PROVIDE_HIDDEN (__preinit_array_end = .);
- PROVIDE_HIDDEN (__init_array_start = .);
- KEEP (*(SORT(.init_array.*)))
- KEEP (*(.init_array))
- PROVIDE_HIDDEN (__init_array_end = .);
- PROVIDE_HIDDEN (__fini_array_start = .);
- KEEP (*(.fini_array))
- KEEP (*(SORT(.fini_array.*)))
- PROVIDE_HIDDEN (__fini_array_end = .);
- } >ROM
- /* .ARM.exidx is sorted, so has to go in its own output section. */
- .ARM.exidx : {
- __exidx_start = .;
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- __exidx_end = .;
- } >ROM
- _etext = .;
- .data : {
- __data_load = LOADADDR (.data);
- __data_start = .;
- KEEP(*(.jcr))
- *(.got.plt) *(.got)
- *(.shdata)
- *(.data .data.* .gnu.linkonce.d.*)
- . = ALIGN (4);
- _edata = .;
- } >RAM AT>ROM
- .bss : {
- __bss_start__ = . ;
- *(.shbss)
- *(.bss .bss.* .gnu.linkonce.b.*)
- *(COMMON)
- . = ALIGN (8);
- __bss_end__ = .;
- } >RAM
- .stack : {
- __stack_start__ = . ;
- . += IRQ_STACK_SIZE;
- . = ALIGN (4);
- __irq_stack_top__ = . ;
- . += FIQ_STACK_SIZE;
- . = ALIGN (4);
- __fiq_stack_top__ = . ;
- . += SVC_STACK_SIZE;
- . = ALIGN (4);
- __svc_stack_top__ = . ;
- . += ABT_STACK_SIZE;
- . = ALIGN (4);
- __abt_stack_top__ = . ;
- . += UND_STACK_SIZE;
- . = ALIGN (4);
- __und_stack_top__ = . ;
- . += C_STACK_SIZE;
- . = ALIGN (4);
- __c_stack_top__ = . ;
- __stack_end__ = .;
- } >RAM
- _end = . ;
- __end = . ;
- PROVIDE(end = .);
- .stab 0 (NOLOAD) : {
- *(.stab)
- }
- .stabstr 0 (NOLOAD) : {
- *(.stabstr)
- }
- /* DWARF debug sections.
- * Symbols in the DWARF debugging sections are relative to the beginning
- * of the section so we begin them at 0.
- */
- /* DWARF 1 */
- .debug 0 : { *(.debug) }
- .line 0 : { *(.line) }
- /* GNU DWARF 1 extensions */
- .debug_srcinfo 0 : { *(.debug_srcinfo) }
- .debug_sfnames 0 : { *(.debug_sfnames) }
- /* DWARF 1.1 and DWARF 2 */
- .debug_aranges 0 : { *(.debug_aranges) }
- .debug_pubnames 0 : { *(.debug_pubnames) }
- /* DWARF 2 */
- .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
- .debug_abbrev 0 : { *(.debug_abbrev) }
- .debug_line 0 : { *(.debug_line) }
- .debug_frame 0 : { *(.debug_frame) }
- .debug_str 0 : { *(.debug_str) }
- .debug_loc 0 : { *(.debug_loc) }
- .debug_macinfo 0 : { *(.debug_macinfo) }
- /* SGI/MIPS DWARF 2 extensions */
- .debug_weaknames 0 : { *(.debug_weaknames) }
- .debug_funcnames 0 : { *(.debug_funcnames) }
- .debug_typenames 0 : { *(.debug_typenames) }
- .debug_varnames 0 : { *(.debug_varnames) }
- .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }
- .ARM.attributes 0 : { KEEP (*(.ARM.attributes)) }
- /DISCARD/ : { *(.note.GNU-stack) }
- }
|