diff options
Diffstat (limited to 'ld/scripttempl/h8500.sc')
-rw-r--r-- | ld/scripttempl/h8500.sc | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/ld/scripttempl/h8500.sc b/ld/scripttempl/h8500.sc new file mode 100644 index 00000000000..f6e88c61dfc --- /dev/null +++ b/ld/scripttempl/h8500.sc @@ -0,0 +1,65 @@ +TORS=" + ___ctors = . ; + *(.ctors) + ___ctors_end = . ; + ___dtors = . ; + *(.dtors) + ___dtors_end = . ;" + +cat <<EOF +OUTPUT_FORMAT("${OUTPUT_FORMAT}") +OUTPUT_ARCH(${ARCH}) + +/* Code and data 64k total */ + +SECTIONS +{ +.text ${RELOCATING+ 0x0000 } : + { + *(.text) + ${RELOCATING+ _etext = . ; } + } + +.data ${RELOCATING+ . } : + { + *(.data) + ${RELOCATING+ _edata = . ; } + } + +.rdata ${RELOCATING+ . } : + { + *(.rdata); + *(.strings) + + ${CONSTRUCTING+${TORS}} + } + +.bss ${RELOCATING+ . } : + { + ${RELOCATING+ __start_bss = . ; } + *(.bss) + *(COMMON) + ${RELOCATING+ _end = . ; } + } + +.stack ${RELOCATING+ 0xfff0} : + { + ${RELOCATING+ _stack = . ; } + *(.stack) + } + +.stab 0 ${RELOCATING+(NOLOAD)} : + { + [ .stab ] + } + +.stabstr 0 ${RELOCATING+(NOLOAD)} : + { + [ .stabstr ] + } +} +EOF + + + + |