From 558a1f51abd9edd4028b9497ae57407e19583139 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Wed, 8 Nov 2000 22:57:05 +0000 Subject: Use ${CONSTRUCTING...} to enclose constructors and destructors. --- ld/ChangeLog | 15 ++++++++ ld/scripttempl/h8300.sc | 90 +++++++++++++++++++++++++++------------------ ld/scripttempl/h8300h.sc | 95 +++++++++++++++++++++++++++++------------------- ld/scripttempl/h8300s.sc | 95 +++++++++++++++++++++++++++++------------------- ld/scripttempl/h8500.sc | 59 ++++++++++++++++-------------- ld/scripttempl/h8500b.sc | 18 +++++---- ld/scripttempl/h8500c.sc | 21 +++++++---- ld/scripttempl/h8500m.sc | 54 ++++++++++++++------------- ld/scripttempl/h8500s.sc | 57 ++++++++++++++++------------- ld/scripttempl/v850.sc | 68 ++++++++++++++++++++-------------- ld/scripttempl/w65.sc | 65 ++++++++++++++++++--------------- ld/scripttempl/z8000.sc | 45 ++++++++++++----------- 12 files changed, 401 insertions(+), 281 deletions(-) diff --git a/ld/ChangeLog b/ld/ChangeLog index 39a6b79e37..359aae6453 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,18 @@ +2000-11-08 Nick Clifton + + * scripttempl/h8300.sc: Use ${CONSTRUCTING...} to enclose + constructors and destructors. + * scripttempl/h8300h.sc: Ditto. + * scripttempl/h8300s.sc: Ditto. + * scripttempl/h8500.sc: Ditto. + * scripttempl/h8500b.sc: Ditto. + * scripttempl/h8500c.sc: Ditto. + * scripttempl/h8500m.sc: Ditto. + * scripttempl/h8500s.sc: Ditto. + * scripttempl/v850.sc: Ditto. + * scripttempl/w65.sc: Ditto. + * scripttempl/z8000.sc: Ditto. + 2000-11-06 Alan Modra Merge most place_orphan changes from mainline. diff --git a/ld/scripttempl/h8300.sc b/ld/scripttempl/h8300.sc index f2f876e283..6f4cdcec4b 100644 --- a/ld/scripttempl/h8300.sc +++ b/ld/scripttempl/h8300.sc @@ -1,3 +1,13 @@ +TORS=".tors : + { + ___ctors = . ; + *(.ctors) + ___ctors_end = . ; + ___dtors = . ; + *(.dtors) + ___dtors_end = . ; + } > ram" + cat < vectors} -.text : { - *(.rodata) - *(.text) - *(.strings) - ${RELOCATING+ _etext = . ; } - } ${RELOCATING+ > ram} -.tors : { - ___ctors = . ; - *(.ctors) - ___ctors_end = . ; - ___dtors = . ; - *(.dtors) - ___dtors_end = . ; +.text : + { + *(.rodata) + *(.text) + *(.strings) + ${RELOCATING+ _etext = . ; } } ${RELOCATING+ > ram} -.data : { - *(.data) - *(.tiny) - ${RELOCATING+ _edata = . ; } + + ${CONSTRUCTING+${TORS}} + +.data : + { + *(.data) + *(.tiny) + ${RELOCATING+ _edata = . ; } } ${RELOCATING+ > ram} -.bss : { - ${RELOCATING+ _bss_start = . ;} - *(.bss) - *(COMMON) - ${RELOCATING+ _end = . ; } + +.bss : + { + ${RELOCATING+ _bss_start = . ;} + *(.bss) + *(COMMON) + ${RELOCATING+ _end = . ; } } ${RELOCATING+ >ram} -.stack : { - ${RELOCATING+ _stack = . ; } - *(.stack) + +.stack : + { + ${RELOCATING+ _stack = . ; } + *(.stack) } ${RELOCATING+ > topram} -.eight : { - *(.eight) + +.eight : + { + *(.eight) } ${RELOCATING+ > eight} -.stab 0 ${RELOCATING+(NOLOAD)} : { - [ .stab ] + +.stab 0 ${RELOCATING+(NOLOAD)} : + { + [ .stab ] } -.stabstr 0 ${RELOCATING+(NOLOAD)} : { - [ .stabstr ] + +.stabstr 0 ${RELOCATING+(NOLOAD)} : + { + [ .stabstr ] } } EOF diff --git a/ld/scripttempl/h8300h.sc b/ld/scripttempl/h8300h.sc index d1cfd860b6..e543df924e 100644 --- a/ld/scripttempl/h8300h.sc +++ b/ld/scripttempl/h8300h.sc @@ -1,3 +1,13 @@ +TORS=".tors : + { + ___ctors = . ; + *(.ctors) + ___ctors_end = . ; + ___dtors = . ; + *(.dtors) + ___dtors_end = . ; + } > ram" + cat < vectors} -.text : { - *(.rodata) - *(.text) - *(.strings) - ${RELOCATING+ _etext = . ; } - } ${RELOCATING+ > ram} -.tors : { - ___ctors = . ; - *(.ctors) - ___ctors_end = . ; - ___dtors = . ; - *(.dtors) - ___dtors_end = . ; + +.text : + { + *(.rodata) + *(.text) + *(.strings) + ${RELOCATING+ _etext = . ; } } ${RELOCATING+ > ram} -.data : { - *(.data) - ${RELOCATING+ _edata = . ; } + + ${CONSTRUCTING+${TORS}} + +.data : + { + *(.data) + ${RELOCATING+ _edata = . ; } } ${RELOCATING+ > ram} -.bss : { - ${RELOCATING+ _bss_start = . ;} - *(.bss) - *(COMMON) - ${RELOCATING+ _end = . ; } + +.bss : + { + ${RELOCATING+ _bss_start = . ;} + *(.bss) + *(COMMON) + ${RELOCATING+ _end = . ; } } ${RELOCATING+ >ram} -.stack : { - ${RELOCATING+ _stack = . ; } - *(.stack) + +.stack : + { + ${RELOCATING+ _stack = . ; } + *(.stack) } ${RELOCATING+ > topram} -.tiny : { - *(.tiny) + +.tiny : + { + *(.tiny) } ${RELOCATING+ > tiny} -.eight : { - *(.eight) + +.eight : + { + *(.eight) } ${RELOCATING+ > eight} -.stab 0 ${RELOCATING+(NOLOAD)} : { - [ .stab ] + +.stab 0 ${RELOCATING+(NOLOAD)} : + { + [ .stab ] } -.stabstr 0 ${RELOCATING+(NOLOAD)} : { - [ .stabstr ] + +.stabstr 0 ${RELOCATING+(NOLOAD)} : + { + [ .stabstr ] } } EOF diff --git a/ld/scripttempl/h8300s.sc b/ld/scripttempl/h8300s.sc index 45474fc51c..b8a3ea53b5 100644 --- a/ld/scripttempl/h8300s.sc +++ b/ld/scripttempl/h8300s.sc @@ -1,3 +1,13 @@ +TORS=".tors : + { + ___ctors = . ; + *(.ctors) + ___ctors_end = . ; + ___dtors = . ; + *(.dtors) + ___dtors_end = . ; + } > ram" + cat < vectors} -.text : { - *(.rodata) - *(.text) - *(.strings) - ${RELOCATING+ _etext = . ; } - } ${RELOCATING+ > ram} -.tors : { - ___ctors = . ; - *(.ctors) - ___ctors_end = . ; - ___dtors = . ; - *(.dtors) - ___dtors_end = . ; + +.text : + { + *(.rodata) + *(.text) + *(.strings) + ${RELOCATING+ _etext = . ; } } ${RELOCATING+ > ram} -.data : { - *(.data) - ${RELOCATING+ _edata = . ; } + + ${CONSTRUCTING+${TORS}} + +.data : + { + *(.data) + ${RELOCATING+ _edata = . ; } } ${RELOCATING+ > ram} -.bss : { - ${RELOCATING+ _bss_start = . ;} - *(.bss) - *(COMMON) - ${RELOCATING+ _end = . ; } + +.bss : + { + ${RELOCATING+ _bss_start = . ;} + *(.bss) + *(COMMON) + ${RELOCATING+ _end = . ; } } ${RELOCATING+ >ram} -.stack : { - ${RELOCATING+ _stack = . ; } - *(.stack) + +.stack : + { + ${RELOCATING+ _stack = . ; } + *(.stack) } ${RELOCATING+ > topram} -.tiny : { - *(.tiny) + +.tiny : + { + *(.tiny) } ${RELOCATING+ > tiny} -.eight : { - *(.eight) + +.eight : + { + *(.eight) } ${RELOCATING+ > eight} -.stab 0 ${RELOCATING+(NOLOAD)} : { - [ .stab ] + +.stab 0 ${RELOCATING+(NOLOAD)} : + { + [ .stab ] } -.stabstr 0 ${RELOCATING+(NOLOAD)} : { - [ .stabstr ] + +.stabstr 0 ${RELOCATING+(NOLOAD)} : + { + [ .stabstr ] } } EOF diff --git a/ld/scripttempl/h8500.sc b/ld/scripttempl/h8500.sc index d6a39eec38..f6e88c61df 100644 --- a/ld/scripttempl/h8500.sc +++ b/ld/scripttempl/h8500.sc @@ -1,3 +1,11 @@ +TORS=" + ___ctors = . ; + *(.ctors) + ___ctors_end = . ; + ___dtors = . ; + *(.dtors) + ___dtors_end = . ;" + cat < ram} -.rdata 0x30000 : { +.rdata 0x30000 : + { *(.rdata); - ___ctors = . ; - *(.ctors) - ___ctors_end = . ; - ___dtors = . ; - *(.dtors) - ___dtors_end = . ; -} ${RELOCATING+ > ram} + + ${CONSTRUCTING+${TORS}} + } ${RELOCATING+ > ram} .bss 0x40000 : { diff --git a/ld/scripttempl/h8500m.sc b/ld/scripttempl/h8500m.sc index 040a4a7c63..06ce2af6b4 100644 --- a/ld/scripttempl/h8500m.sc +++ b/ld/scripttempl/h8500m.sc @@ -1,3 +1,11 @@ +TORS=" + ___ctors = . ; + *(.ctors) + ___ctors_end = . ; + ___dtors = . ; + *(.dtors) + ___dtors_end = . ;" + cat < ram} - -.tors : { - ___ctors = . ; - *(.ctors) - ___ctors_end = . ; - ___dtors = . ; - *(.dtors) - ___dtors_end = . ; -} ${RELOCATING+ > ram} + ${CONSTRUCTING+${TORS}} .data : { - *(.data) - ${RELOCATING+ _edata = . ; } + *(.data) + ${RELOCATING+ _edata = . ; } } ${RELOCATING+ > ram} + .bss : { - ${RELOCATING+ _bss_start = . ; } - *(.bss) - *(COMMON) - ${RELOCATING+ _end = . ; } + ${RELOCATING+ _bss_start = . ; } + *(.bss) + *(COMMON) + ${RELOCATING+ _end = . ; } } ${RELOCATING+ >ram} -.stack ${RELOCATING+ 0x30000 } : + +.stack ${RELOCATING+ 0x30000 } : { - ${RELOCATING+ _stack = . ; } - *(.stack) + ${RELOCATING+ _stack = . ; } + *(.stack) } ${RELOCATING+ > ram} - .stab . (NOLOAD) : - { - [ .stab ] - } - .stabstr . (NOLOAD) : - { - [ .stabstr ] - } + +.stab . (NOLOAD) : + { + [ .stab ] + } + +.stabstr . (NOLOAD) : + { + [ .stabstr ] + } } EOF diff --git a/ld/scripttempl/z8000.sc b/ld/scripttempl/z8000.sc index 2b87930100..646c88080a 100644 --- a/ld/scripttempl/z8000.sc +++ b/ld/scripttempl/z8000.sc @@ -5,7 +5,8 @@ ENTRY(_start) SECTIONS { -.text ${BIG+ ${RELOCATING+ 0x0000000}} : { +.text ${BIG+ ${RELOCATING+ 0x0000000}} : + { *(.text) *(.strings) *(.rdata) @@ -13,38 +14,40 @@ SECTIONS .ctors ${BIG+ ${RELOCATING+ 0x2000000}} : { - ${RELOCATING+ ___ctors = . ; } + ${CONSTRUCTING+ ___ctors = . ; } *(.ctors); - ${RELOCATING+ ___ctors_end = . ; } + ${CONSTRUCTING+ ___ctors_end = . ; } ___dtors = . ; *(.dtors); - ${RELOCATING+ ___dtors_end = . ; } + ${CONSTRUCTING+ ___dtors_end = . ; } } -.data ${BIG+ ${RELOCATING+ 0x3000000}} : { - *(.data) +.data ${BIG+ ${RELOCATING+ 0x3000000}} : + { + *(.data) } .bss ${BIG+ ${RELOCATING+ 0x4000000}} : - { - ${RELOCATING+ __start_bss = . ; } - *(.bss); - *(COMMON); - ${RELOCATING+ __end_bss = . ; } - } - -.heap ${BIG+ ${RELOCATING+ 0x5000000}} : { - ${RELOCATING+ __start_heap = . ; } - ${RELOCATING+ . = . + 20k ; } - ${RELOCATING+ __end_heap = . ; } + { + ${RELOCATING+ __start_bss = . ; } + *(.bss); + *(COMMON); + ${RELOCATING+ __end_bss = . ; } + } + +.heap ${BIG+ ${RELOCATING+ 0x5000000}} : + { + ${RELOCATING+ __start_heap = . ; } + ${RELOCATING+ . = . + 20k ; } + ${RELOCATING+ __end_heap = . ; } } .stack ${RELOCATING+ 0xf000 } : { - ${RELOCATING+ _stack = . ; } - *(.stack) - ${RELOCATING+ __stack_top = . ; } - } + ${RELOCATING+ _stack = . ; } + *(.stack) + ${RELOCATING+ __stack_top = . ; } + } } EOF -- cgit v1.2.1