123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244 |
- OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
- OUTPUT_ARCH(arm)
- ENTRY(_start)
- SECTIONS
- {
- . = (DEFINED(PROGRAM_LOAD_ADDRESS)) ? (PROGRAM_LOAD_ADDRESS) : 0xc0200000;
-
- /*
- ************************************************************
- ** NOCACHE_BUFFER for HW & SW
- ************************************************************
- */
- . = ALIGN(4);
- .nocache_buffer :
- {
- PROVIDE(__nocache_buffer_start__ = .);
- *(.nocache_buffer*)
- KEEP(*(.nocache_buffer))
- . = ALIGN(1M);
- PROVIDE(__nocache_buffer_end__ = .);
- }
-
- . = 0xC0300000;
- __text_start = .;
- .text :
- {
- _stext = .;
- KEEP(*(.ARM1176START))
- KEEP(*(.ARM1176INIT))
- KEEP(*(.ARM1176IVT))
- *(.init)
- *(.text*)
- *(.stub)
- *(.gnu.warning)
- *(.gnu.linkonce.t*)
-
- /* section information for finsh shell */
- . = ALIGN(4);
- __fsymtab_start = .;
- KEEP(*(FSymTab))
- __fsymtab_end = .;
- . = ALIGN(4);
- __vsymtab_start = .;
- KEEP(*(VSymTab))
- __vsymtab_end = .;
- . = ALIGN(4);
- . = ALIGN(4);
- __rt_init_start = .;
- KEEP(*(SORT(.rti_fn*)))
- __rt_init_end = .;
- . = ALIGN(4);
- /* section information for modules */
- . = ALIGN(4);
- __rtmsymtab_start = .;
- KEEP(*(RTMSymTab))
- __rtmsymtab_end = .;
- _etext = .;
- }
- PROVIDE(_etext = .);
- __text_end = .;
-
- /*
- ************************************************************
- ** add ro data sections
- ************************************************************
- */
- . = ALIGN(4);
- __rodata_start = .;
- .rodata :
- {
- *(.rodata*)
- . = ALIGN(4);
- *(.gnu.linkonce.r*)
- *(.eh_frame)
- }
- PROVIDE(_end_readonly = .);
-
- /*
- ************************************************************
- ** add rw data sections
- ************************************************************
- */
- .data :
- {
- *(.data*)
- . = ALIGN(4);
- *(.gnu.linkonce.d*) CONSTRUCTORS
- }
-
- /*
- ************************************************************
- ** .bss section which is used for uninitialized data
- ************************************************************
- */
- . = ALIGN(1024);
- .bss :
- {
- PROVIDE(__bss_start__ = .);
- *(.bss*)
- *(COMMON)
- PROVIDE(__bss_end__ = .);
- }
- /*
- ************************************************************
- ** .ctors .dtors are used for c++ constructors/destructors
- ************************************************************
- */
- .ctors :
- {
- PROVIDE(__ctors_start__ = .);
- KEEP(*(SORT(.ctors.*)))
- KEEP(*(.ctors))
- PROVIDE(__ctors_end__ = .);
- }
- .dtors :
- {
- PROVIDE(__dtors_start__ = .);
- KEEP(*(SORT(.dtors.*)) )
- KEEP(*(.dtors) )
- PROVIDE(__dtors_end__ = .);
- }
- /*
- ************************************************************
- ** ARM extensions
- ************************************************************
- */
- .ARM.attributes :
- {
- *(.ARM.attributes)
- *(.ARM.extab*)
- PROVIDE(__exidx_start = .);
- *(.ARM.exidx*)
- PROVIDE(__exidx_end = .);
- }
- /*
- ************************************************************
- ** _end marks the end of code
- ************************************************************
- */
- . = ALIGN(4);
- PROVIDE(_end = .);
- PROVIDE(end = .);
- /*
- ************************************************************
- ** The ".stack" section is used for user stacks, we use the
- ** memory sizes given by the make symbol PROGRAM_STACK_BYTES.
- ** The variables "__stack_end__" and "__stack_start__"
- ** mark the stack buffer to be used by libc functions.
- ************************************************************
- */
- . = ALIGN(8);
- .stack :
- {
- PROVIDE(__stack_end__ = .);
- . += PROGRAM_STACK_BYTES;
- PROVIDE(__stack_start__ = .);
- }
- /*
- ************************************************************
- ** The ".heap" section is used for dynamic data, we use the
- ** memory sizes given by the make symbols PROGRAM_HEAP_BYTES.
- ** The variables "__heap_start__" and "__heap_end__"
- ** mark the heap memory to be used by libc "malloc()"
- ** functions.
- ************************************************************
- */
- . = ALIGN(8);
- .heap :
- {
- PROVIDE(__heap_start__ = .);
- . += PROGRAM_HEAP_BYTES;
- . = ALIGN(1M);
- PROVIDE(__heap_end__ = .);
- }
- /*
- ************************************************************
- ** Stabs debugging sections.
- ************************************************************
- */
- .stab 0 : { *(.stab) }
- .stabstr 0 : { *(.stabstr) }
- .stab.excl 0 : { *(.stab.excl) }
- .stab.exclstr 0 : { *(.stab.exclstr) }
- .stab.index 0 : { *(.stab.index) }
- .stab.indexstr 0 : { *(.stab.indexstr) }
- .comment 0 : { *(.comment) }
- /*
- ************************************************************
- ** 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) }
- .debug_ranges 0 : { *(.debug_ranges) }
- /*
- ************************************************************
- ** 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) }
- }
|