This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: undefined reference to __gxx_personality_v0
On 2012-06-18 09:47, Chris Metcalf wrote:
> On 6/18/2012 12:38 PM, Richard Henderson wrote:
>> On 2012-06-18 00:55, Andreas Jaeger wrote:
>>> are you suggesting that GCC 4.7 (the compiler I use) is doing a better
>>> job at optimization than GCC 4.4 (Roland's and Chris' version)?
>>>
>>> Btw. the test case was introduced in May 2011 and I never saw it
>>> failing,
>>
>> I have no idea what the actual subject is; there didn't seem to be a
>> proper referant in roland's original post. I merely answered the
>> question of what dw2_force_const_mem does.
>
> I started this thread here:
>
> http://sourceware.org/ml/libc-alpha/2012-06/msg00430.html
Ah, right. I've now done some actual digging into the sources and
have reproduced the problem.
So, I had mis-remembered what dw2_force_const_mem was for. In this
case, the putting the dynamic relocation for the personality function
in a section other than the unwind info.
You can see this still in current gcc via any test case that needs
to run an exception handling cleanup. E.g. -fPIC
struct S { S(); ~S(); };
void bar();
void foo() { S s; bar(); }
Now, there's nothing about in_lib that ought to be generating a
cleanup, however in gcc 4.4 we did not yet have an optimization
that would elide the personality routine when it was unneeded.
That was done in gcc 4.5 as a part of supporting multiple
simultaneous personalites during LTO.
r~