[PATCH] Fix weak/strong attribute of __errno_location and it's __GI alias

Vineet Gupta Vineet.Gupta1 at synopsys.com
Fri Oct 11 13:39:00 UTC 2013


On 10/04/2013 10:12 PM, Bernhard Reutner-Fischer wrote:
> On 1 October 2013 14:21:44 Vineet Gupta <Vineet.Gupta1 at synopsys.com> wrote:
>> A simple statically linked hello world program was segfaulting for ARC
>> in linuxthreads.old configuration (although the root casue applies
>> cross-arch for NPTL as well as linuxthreads.old as described)
>>
>> The crash was due to branch to NULL in _stdio_init
> 
> is this gcc.gnu.org/PR32219 ?
> See GCC ML for proposed patches..
> Thanks,

Thinking about this a bit - you are probably right that this is due to GCC PR -
i.e. __GI_errno_location being weak/hidden.

However the fix to make it strong, is not a workaround for that PR - but because
it needs to be strong anyways.

And alternately, the exportable version __errno_location needs to be weak so that
we don't get redefs when static linking with libpthread etc.

Is this convincing enough to get this v2 patch into trunk :-)

Thx,
-Vineet




More information about the uClibc mailing list