diff options
author | Nick Clifton <nickc@redhat.com> | 2000-07-12 16:41:29 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2000-07-12 16:41:29 +0000 |
commit | 062739d1510d8ed2c1558dcd51cf958ce52855c3 (patch) | |
tree | b01232dfe2b66a455465da28b1f71d82b6ed9a38 /ld/scripttempl | |
parent | 2b99395a2eac4216bf7255992e4d3da4df7751fa (diff) | |
download | gdb-062739d1510d8ed2c1558dcd51cf958ce52855c3.zip gdb-062739d1510d8ed2c1558dcd51cf958ce52855c3.tar.gz gdb-062739d1510d8ed2c1558dcd51cf958ce52855c3.tar.bz2 |
Support the g++ attribute init_priority in gcc 2.95.2 and later.
Diffstat (limited to 'ld/scripttempl')
-rw-r--r-- | ld/scripttempl/i386go32.sc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/ld/scripttempl/i386go32.sc b/ld/scripttempl/i386go32.sc index f14aff7..330e4d3 100644 --- a/ld/scripttempl/i386go32.sc +++ b/ld/scripttempl/i386go32.sc @@ -5,8 +5,14 @@ EXE=${CONSTRUCTING+${RELOCATING+-exe}} # These are substituted in as variables in order to get '}' in a shell # conditional expansion. -CTOR='.ctor : { *(.ctor) }' -DTOR='.dtor : { *(.dtor) }' +CTOR='.ctor : { + *(SORT(.ctors.*)) + *(.ctor) + }' +DTOR='.dtor : { + *(SORT(.dtors.*)) + *(.dtor) + }' cat <<EOF OUTPUT_FORMAT("${OUTPUT_FORMAT}${EXE}") @@ -26,9 +32,11 @@ SECTIONS } .data ${RELOCATING+ ${DATA_ALIGNMENT}} : { ${RELOCATING+djgpp_first_ctor = . ; + *(SORT(.ctors.*)) *(.ctor) djgpp_last_ctor = . ;} ${RELOCATING+djgpp_first_dtor = . ; + *(SORT(.dtors.*)) *(.dtor) djgpp_last_dtor = . ;} *(.data) |