libgcc-compat patch and gcc 2.95.4 on ppclinux
Franz Sirl
Franz.Sirl-kernel@lauterbach.com
Sun Jul 14 10:07:00 GMT 2002
On Samstag, 13. Juli 2002 09:31, Jakub Jelinek wrote:
> On Fri, Jul 12, 2002 at 10:43:02PM -0700, H. J. Lu wrote:
> > Please try this patch. The problem is gcc 2.95.4 won't make those
> > libgcc functions hidden. We have to help it.
> >
> > --- libc/sysdeps/powerpc/libgcc-compat.c.gcc Mon May 20 17:19:09 2002
> > +++ libc/sysdeps/powerpc/libgcc-compat.c Fri Jul 12 22:39:18 2002
> > @@ -23,6 +23,7 @@
> >
> > #if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_2_6)
> >
> > +__asm__(".hidden __ashldi3");
> > extern int64_t __ashldi3 (int64_t, int32_t);
> > int64_t INTUSE (__ashldi3) (int64_t u, int32_t b)
> > {
>
> Err, isn't this an exact opposite of what is desirable?
> This would make __ashldi3 in libgcc-compat.o hidden, while it has to
> be visible, so with gcc-3.1+ you'd end up
> with not exporting those functions at all, while with 2.95.x you'd
> be exporting the libgcc.a functions (yes, that's what you want in that
> case).
> IMHO libgcc-compat.c should be only compiled in if the functions are
> .hidden in libgcc.a (ie. gcc 3.1+), otherwise glibc just needs to ensure
> all the needed libgcc.a functions are included in the link.
I think so too. It would be nice if the version script would support a
runtime: label too besides global: and local:. Or if ld would support
something like --import-hidden -lgcc --no-import-hidden.
Jakub, one thing I don't understand yet about the symbols from divdi3.c in
glibc, why are they exported with _linktime_ reference? Wouldn't a runtime
reference be enough? It would possibly break some broken apps during
building, but who cares?
And why are these symbols versioned GLIBC2.0 in GCC?
Franz.
More information about the Libc-alpha
mailing list