[PATCH] Don't check ABI for _nl_default_dirname

David Miller davem@davemloft.net
Mon Dec 10 05:28:00 GMT 2012


From: Andi Kleen <ak@linux.intel.com>
Date: Sun, 9 Dec 2012 21:20:35 -0800

> On Sun, Dec 09, 2012 at 06:28:42PM -0800, Jonathan Nieder wrote:
>> Andreas Schwab wrote:
>> 
>> > The size is copied into the program by the COPY relocation.
>> 
>> Yep, that's why I didn't write a patch after reporting PR14664.
>> 
>> Are applications that use _nl_default_dirname buggy by definition
>> because its size can vary from machine to machine?  I'm inclined to
> 
> They are only buggy if they rely on a particular size or content
> (or rather length, as in strlen, as they cannot even know the true
> size)

But, as already mentioned, the size is encoded into the COPY reloc.

So the dynamic linker "notices" that your application linked with
a "different" instance of the symbol, since the size is different,
and it will signal an error.

This happens in the handling of R_*_COPY in every target's
dl-machine.h file.

It's therefore complete and utter garbage to just let this ABI check
pass as the symbol's size is encoded into, and checked, in every
application that references the symbol.



More information about the Libc-alpha mailing list