This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
Re: -ffunction-sections -fdata-sections vs. string-inst
- To: libstdc++ at sourceware dot cygnus dot com
- Subject: Re: -ffunction-sections -fdata-sections vs. string-inst
- From: Loren James Rittle <rittle at latour dot rsch dot comm dot mot dot com>
- Date: Fri, 16 Jun 2000 19:00:07 -0500 (CDT)
- References: <200006130434.XAA10219@latour.rsch.comm.mot.com>
- Reply-to: rittle at rsch dot comm dot mot dot com
Hi Benjamin,
I tried your latest patch in an already bootstrapped and tested tree
on i686-unknown-freebsd3.4 using the same procedure I posted last
time. I no longer see any unreasonable expansion on
21_strings/append.cc and 21_strings/find.cc.
However, FYI, I now see new core dumps on 7 statically built
executables: append.st-exe, bitset_ctor.st-exe, ctor_copy_dtor.st-exe,
element_access.st-exe, insert.st-exe, ios_members.st-exe,
substr.st-exe
This may or may not be what you reported:
> I am getting some cores in static binaries, and I'm still in the middle
> of trying to see what's going on. I'll post a better patch tonight.
Here is the backtrace in all my new cases:
#0 count_fdes (this_fde=0x8059108) at ../../egcs/gcc/frame-dwarf2.c:257
#1 0x80498ff in frame_init (ob=0x80595c0) at ../../egcs/gcc/frame-dwarf2.c:324
#2 0x8049a56 in find_fde (pc=0x8048eb8) at ../../egcs/gcc/frame-dwarf2.c:364
#3 0x8049fb5 in __frame_state_for (pc_target=0x8048eb8, state_in=0xbfbfc638)
at ../../egcs/gcc/frame-dwarf2.c:628
#4 0x8048ecc in __throw () at ../../egcs/gcc/libgcc2.c:3937
I believe this is exposing a bug in ld on my platform since if I
remove -Wl,--gc-sections from mkcheck, all those tests run fine again.
My opinion only, but I don't think this should stop your patch going
in since I have looked at the build logs closely and think it is doing
the right thing. The test should continue to include
-Wl,--gc-sections in order to continue to flag the problem, but users
that have a buggy ld (if my supposition is correct) can just avoid
including that flag when they link.
I will try to form a small testcase to go in dejagnu for this issue
since then more GCC/binutil hackers will see it. <...thinking...>
Sweet, the obvious testcase fails:
int main (void)
{
try
{
throw 1;
}
catch (...) {}
return 0;
}
g++ -ffunction-sections -fdata-sections -Wl,--gc-sections test.C; a.out #OK
g++ -ffunction-sections -fdata-sections -Wl,--gc-sections -static test.C; \
a.out #dumps core while processing the __throw
I can also confirm that linux fails with this case as well.
Regards,
Loren