This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFH/RFC: libgcc _Unwind_Backtrace falling off the end of FDElist...


Richard Henderson <rth@redhat.com> writes:
> On Tue, Feb 01, 2005 at 05:08:25PM -0800, David Daney wrote:
>> However it seems to me that "fixing" ld would be a better solution as 
>> any executable or shared object containing an .eh_frame section suffers 
>> from the same problem of an unterminated .eh_frame section.

Executables and shared objects created by a normal gcc link line should
already be correctly terminated.  The terminator normally comes from
gcc's crtend.o, which gcc includes in every link unless explicitly told
not to.

glibc is a special case because its build process deliberately avoids
using gcc's crtend.o when linking shared libraries.  It passes
-nostartfiles on the link line and uses its own elf/soinit.c and
elf/sofini.c instead.

The problem addressed by my glibc patch is that elf/sofini.o doesn't
add the terminator in cases where it really ought to.  But both the
problem and the patch are specific to the glibc DSOs.

> No, Richard's patch should make the termination happen via crtn.o.
> So it should happen for everyone.

I don't think it goes into crtn.o, does it?  I thought elf/soinit.c and
elf/sofini.c were compiled into build-local objects that were used only
in glibc libraries.

Richard


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]