diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2007-04-27 20:00:45 +0400 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2007-04-27 20:00:45 +0400 |
commit | 7369eb7af3cc3cc7adabaf822d181c3152542734 (patch) | |
tree | 9be55a4f498bb0d985dbdb365e5f9d19814d7e94 /libgloss | |
parent | 5682d0f1a7a4eb002d8c1b624441974541d989ac (diff) |
2007-04-27 Kazu Hirata <kazu@codesourcery.com>
* libgloss/m68k/fido.sc: Catch .text.*, .rodata.*, .data.*,
.bss.*, .ctor.*, and .dtor.*. Wrap ctor/dtor-related sections
with KEEP.
Diffstat (limited to 'libgloss')
-rw-r--r-- | libgloss/ChangeLog | 6 | ||||
-rw-r--r-- | libgloss/m68k/fido.sc | 35 |
2 files changed, 25 insertions, 16 deletions
diff --git a/libgloss/ChangeLog b/libgloss/ChangeLog index a80ed950a..a77a66bde 100644 --- a/libgloss/ChangeLog +++ b/libgloss/ChangeLog @@ -1,3 +1,9 @@ +2007-04-27 Kazu Hirata <kazu@codesourcery.com> + + * libgloss/m68k/fido.sc: Catch .text.*, .rodata.*, .data.*, + .bss.*, .ctor.*, and .dtor.*. Wrap ctor/dtor-related sections + with KEEP. + 2007-04-04 Patrick Mansfield <patmans@us.ibm.com> * spu/syscalls.c: Rename _send_to_ppe __send_to_ppe, and set errno diff --git a/libgloss/m68k/fido.sc b/libgloss/m68k/fido.sc index 07aa6e366..99c2014ce 100644 --- a/libgloss/m68k/fido.sc +++ b/libgloss/m68k/fido.sc @@ -142,21 +142,22 @@ SECTIONS { /* Text section. */ .text : { - *(.text .gnu.linkonce.t.*) + *(.text .text.*) + *(.gnu.linkonce.t.*) + . = ALIGN(0x4); - __CTOR_LIST__ = .; - ___CTOR_LIST__ = .; - LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2) - *(.ctors) - LONG(0) - __CTOR_END__ = .; - __DTOR_LIST__ = .; - ___DTOR_LIST__ = .; - LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2) - *(.dtors) - LONG(0) - __DTOR_END__ = .; - *(.rodata* .gnu.linkonce.r.*) + /* These are for running static constructors and destructors under ELF. */ + KEEP (*crtbegin.o(.ctors)) + KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors)) + KEEP (*(SORT(.ctors.*))) + KEEP (*crtend.o(.ctors)) + KEEP (*crtbegin.o(.dtors)) + KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors)) + KEEP (*(SORT(.dtors.*))) + KEEP (*crtend.o(.dtors)) + + *(.rodata .rodata.*) + *(.gnu.linkonce.r.*) *(.gcc_except_table) *(.eh_frame) @@ -188,7 +189,8 @@ SECTIONS { _data = .; KEEP (*(.jcr)); *(.shdata); - *(.data .gnu.linkonce.d.*); + *(.data .data.*) + *(.gnu.linkonce.d.*) _edata_cksum = .; *(checksum); _edata = .; @@ -200,7 +202,8 @@ SECTIONS { . = ALIGN(0x4); __bss_start = . ; *(.shbss) - *(.bss .gnu.linkonce.b.*) + *(.bss .bss.*) + *(.gnu.linkonce.b.*) *(COMMON) _end = ALIGN (0x8); __end = _end; |