bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gold/14727] New: --gc-sections deletes section referenced from .eh_


From: amodra at gmail dot com
Subject: [Bug gold/14727] New: --gc-sections deletes section referenced from .eh_frame
Date: Tue, 16 Oct 2012 12:39:22 +0000


http://sourceware.org/bugzilla/show_bug.cgi?id=14727



             Bug #: 14727

           Summary: --gc-sections deletes section referenced from

                    .eh_frame

           Product: binutils

           Version: 2.24 (HEAD)

            Status: NEW

          Severity: normal

          Priority: P2

         Component: gold

        AssignedTo: address@hidden

        ReportedBy: address@hidden

                CC: address@hidden

    Classification: Unclassified





I see large numbers of failures in the gcc testsuite when ppc32 libstdc++ is

linked with gold.  These are all due to the unwinder getting a segfault when

trying to execute a personality function at address 0x7f454c46.



ppc32 uses an eh_frame encoding of 0x9b, DW_EH_PE_indirect | DW_EH_PE_pcrel |

DW_EH_PE_sdata4 for the 'P' augmentation, ie. the personality function.  So the

word (four bytes) following the encoding has the relative address of a word

containing the personality function address.



In relocatable object files we have a section in a comdat group

.sdata.DW.ref.__gxx_personality_v0 containing a word with a relocation against

__gxx_personality_v0, the actual personality function.  A weak hidden symbol,

DW.ref.__gxx_personality_v0 is defined on this word.  The .eh_frame 'P'

augmentation value mentioned above references DW.ref.__gxx_personality_v0.



However, when --gc-sections is enabled *all* .sdata.DW.ref.__gxx_personality_v0

sections are deleted, resulting in DW.ref.__gxx_personality_v0 getting a value

of zero, and the personality function address being loaded from relative

address zero.  In a shared object this is the ELF magic number or 0x7f454c46.



-- 

Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email

------- You are receiving this mail because: -------

You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]