diff options
Diffstat (limited to 'ld/scripttempl/h8500s.sc')
-rw-r--r-- | ld/scripttempl/h8500s.sc | 57 |
1 files changed, 31 insertions, 26 deletions
diff --git a/ld/scripttempl/h8500s.sc b/ld/scripttempl/h8500s.sc index 11615d8afe9..2567489e1d0 100644 --- a/ld/scripttempl/h8500s.sc +++ b/ld/scripttempl/h8500s.sc @@ -1,3 +1,11 @@ +TORS=" + ___ctors = . ; + *(.ctors) + ___ctors_end = . ; + ___dtors = . ; + *(.dtors) + ___dtors_end = . ;" + cat <<EOF OUTPUT_FORMAT("${OUTPUT_FORMAT}") OUTPUT_ARCH(${ARCH}) @@ -8,50 +16,47 @@ SECTIONS { .text ${RELOCATING+ 0x10000 } : { - *(.text) - ${RELOCATING+ _etext = . ; } + *(.text) + ${RELOCATING+ _etext = . ; } } .rdata ${RELOCATING+ 0x20000 } : { - *(.rdata); - *(.strings) - ___ctors = . ; - *(.ctors) - ___ctors_end = . ; - ___dtors = . ; - *(.dtors) - ___dtors_end = . ; + *(.rdata); + *(.strings) + + ${CONSTRUCTING+${TORS}} } .data ${RELOCATING+ . } : { - *(.data) - ${RELOCATING+ _edata = . ; } + *(.data) + ${RELOCATING+ _edata = . ; } } .bss ${RELOCATING+ .} : { - ${RELOCATING+ __start_bss = . ; } - *(.bss) - *(COMMON) - ${RELOCATING+ _end = . ; } + ${RELOCATING+ __start_bss = . ; } + *(.bss) + *(COMMON) + ${RELOCATING+ _end = . ; } } .stack ${RELOCATING+ 0x2fff0} : { - ${RELOCATING+ _stack = . ; } - *(.stack) + ${RELOCATING+ _stack = . ; } + *(.stack) } - .stab 0 ${RELOCATING+(NOLOAD)} : - { - [ .stab ] - } - .stabstr 0 ${RELOCATING+(NOLOAD)} : - { - [ .stabstr ] - } +.stab 0 ${RELOCATING+(NOLOAD)} : + { + [ .stab ] + } + +.stabstr 0 ${RELOCATING+(NOLOAD)} : + { + [ .stabstr ] + } } EOF |