linker.ld (1109B)
1 OUTPUT_ARCH(arm) 2 ENTRY(_start) 3 4 STACK_SIZE = 0x100000; 5 MB = 1024 * 1024; 6 7 SECTIONS 8 { 9 __program_start__ = .; 10 11 /* link the code first at 0x8000. */ 12 .text 0x8000 : { 13 __code_start__ = .; 14 KEEP(*(.kmain)) 15 *(.text*) 16 __code_end__ = .; 17 . = ALIGN(8); 18 } 19 20 /* read-only data */ 21 .rodata ALIGN(8) : { 22 *(.rodata*) 23 . = ALIGN(8); 24 } 25 /* rw data */ 26 .data ALIGN(8) : { 27 *(.data*) 28 . = ALIGN(8); 29 } 30 31 /* 0 data */ 32 .bss : { 33 . = ALIGN(8); 34 __bss_start__ = .; 35 *(.bss*) 36 *(COMMON) 37 . = ALIGN(8); 38 __bss_end__ = .; 39 } 40 41 . = ALIGN(8); 42 __program_end__ = .; 43 . = ALIGN(MB); 44 __stack_start__ = .; 45 . = . + STACK_SIZE; 46 . = ALIGN(MB); 47 __stack_end__ = .; 48 . = ALIGN(MB); 49 __int_stack_start__ = .; 50 . = . + STACK_SIZE; 51 . = ALIGN(MB); 52 __int_stack_end__ = .; 53 54 . = ALIGN(32); 55 __heap_start__ = .; 56 57 /DISCARD/ : { *(.debug*) } 58 /DISCARD/ : { *(.comment*) } 59 /DISCARD/ : { *(*.attributes*) } 60 /DISCARD/ : { *(*.ARM.exidx*) } 61 }