This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Don't check ABI for _nl_default_dirname
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,
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?
Andreas
--
Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126