This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: [PATCH] Don't check ABI for _nl_default_dirname


On Mon, Dec 10, 2012 at 3:38 AM, Andreas Jaeger <aj@suse.com> wrote:
> On Sunday, December 09, 2012 13:38:41 Rich Felker wrote:
>> On Fri, Dec 07, 2012 at 09:02:15PM -0800, Andi Kleen wrote:
>> > From: Andi Kleen <ak@linux.intel.com>
>> >
>> > As discussed in
>> > http://comments.gmane.org/gmane.comp.lib.glibc.alpha/24671
>> >
>> > The ABI of _nl_default_dirname depends on the prefix glibc is
>> > compiled with. For glibcs with non standard prefix
>> > _nl_default_dirname changes, which causes the ABI check in make
>> > check to fail.
>>
>> This is a fundamentally broken part of the ABI that should be fixed.
>> _nl_default_dirname should be deprecated (with whatever tricks to
>> prevent new programs from linking to it) and replaced with
>> _nl_default_dirname_ptr that's a pointer instead of an array.
>> Exporting arrays that will be subject to copy relocations is deep into
>> the realm of Considered Harmful.
>>
>> If _nl_default_dirname is declared anywhere in the headers, it could
>> be remapped to generate a reference through the
>> _nl_default_dirname_ptr pointer instead.
>
> Is _nl_default_dirname really used anywhere? I just did a grep on my
> system and did not get a single match besides libc itself,

I didn't find anything either on FC17 system.

> Still I fear there might be broken programs but why not change the ABI
> that this is not exported anymore for newly build applications and only
> for old one?

Fully agree. We can talk about this when Jonathan posts his patch.

Cheers,
Carlos.


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