- Timestamp:
- 07/20/2017 04:15:24 PM (7 years ago)
- Branches:
- master
- Children:
- cd1d0db
- Parents:
- 7913d06
- Location:
- misc
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
misc/mkhd.sh
r7913d06 r0acb7d0 31 31 echo >&2 32 32 33 getsym _Lo_RAM; SYM_LO_RAM=${RET} 34 getsym _etext; SYM_ETEXT=${RET} 35 getsym _edata; SYM_EDATA=${RET} 36 getsym _end; SYM_END=${RET} 33 getsym _stext; SYM_STEXT=${RET} 34 getsym _etext; SYM_ETEXT=${RET} 35 getsym _sdata; SYM_SDATA=${RET} 36 getsym _edata; SYM_EDATA=${RET} 37 getsym _sbss; SYM_SBSS=${RET} 38 getsym _ebss; SYM_EBSS=${RET} 37 39 38 40 echo >&2 39 41 40 LEN_TEXT=$((${SYM_ETEXT} - ${SYM_LO_RAM})) 41 LEN_DATA=$((${SYM_EDATA} - ${SYM_ETEXT})) 42 LEN_BSS=$((${SYM_END} - ${SYM_EDATA})) 42 LEN_TEXT=$((${SYM_SDATA} - ${SYM_STEXT})) 43 LEN_DATA=$((${SYM_EDATA} - ${SYM_SDATA})) 44 LEN_IMAG=$((${LEN_TEXT} + ${LEN_DATA})) 45 LEN_BSS=$((${SYM_EBSS} - ${SYM_SBSS})) 46 47 printf ' sz_text 0x%08x %6s\n' ${LEN_TEXT} ${LEN_TEXT} >&2 48 printf ' sz_data 0x%08x %6s\n' ${LEN_DATA} ${LEN_DATA} >&2 49 printf ' sz_imag 0x%08x %6s\n' ${LEN_IMAG} ${LEN_IMAG} >&2 50 printf ' sz_bss 0x%08x %6s\n' ${LEN_BSS} ${LEN_BSS} >&2 51 52 echo >&2 43 53 44 54 out8() { … … 64 74 } 65 75 66 out16 2460 276 out16 24603 67 77 out32 ${LEN_TEXT} 68 78 out32 ${LEN_DATA} … … 70 80 out32 0 71 81 out32 0 72 out32 ${SYM_ LO_RAM}82 out32 ${SYM_STEXT} 73 83 out16 65535 84 out32 ${SYM_SDATA} 85 out32 ${SYM_SBSS} -
misc/ram.ld
r7913d06 r0acb7d0 3 3 SECTIONS 4 4 { 5 .text (0x10000) 5 .text (0x10000): 6 6 { 7 _stext = .; 7 8 *(.text .text.*) 8 9 *(.rodata .rodata.*) 9 _etext = .;10 _etext = ALIGN(0x10); 10 11 } 11 12 12 .data : ALIGN(0x10)13 .data (_etext): 13 14 { 15 _sdata = .; 14 16 *(.data .data.*) 15 _edata = .;17 _edata = ALIGN(0x10); 16 18 } 17 19 18 .bss : ALIGN(0x10)20 .bss (_edata): 19 21 { 22 _sbss = .; 20 23 *(.bss .bss.*) 24 _ebss = .; 21 25 } 22 26 -
misc/rom.ld
r7913d06 r0acb7d0 3 3 SECTIONS 4 4 { 5 .text (0x100000) 5 .text (0x100000): 6 6 { 7 _stext = .; 7 8 *(.text .text.*) 8 9 *(.rodata .rodata.*) 9 _etext = .;10 _etext = ALIGN(0x10); 10 11 } 11 12 12 .data : ALIGN(0x10)13 .data (_etext): 13 14 { 15 _sdata = .; 14 16 *(.data .data.*) 15 17 _edata = .; 16 18 } 17 19 18 .bss (0x400) 20 .bss (0x400): 19 21 { 22 _sbss = .; 20 23 *(.bss .bss.*) 24 _ebss = .; 21 25 } 22 23 _end = .;24 26 }
Note:
See TracChangeset
for help on using the changeset viewer.