This is the mail archive of the
mailing list for the glibc project.
Re: Linking with -lc
- From: Franz Sirl <Franz dot Sirl-kernel at lauterbach dot com>
- To: "H. J. Lu" <hjl at lucon dot org>
- Cc: "Harris, Jeff" <JeffH at aiinet dot com>,amodra at bigpond dot net dot au,GNU C Library <libc-alpha at sources dot redhat dot com>,"'binutils at sources dot redhat dot com'" <binutils at sources dot redhat dot com>
- Date: Thu, 08 May 2003 10:42:35 +0200
- Subject: Re: Linking with -lc
- References: <3B785392832ED71192AE00D0B7B0D75B1C6498@aimail.aiinet.com><3B785392832ED71192AE00D0B7B0D75B1C6498@aimail.aiinet.com>
At 21:47 07.05.2003, H. J. Lu wrote:
On Wed, May 07, 2003 at 03:38:49PM -0400, Harris, Jeff wrote:
> The output from the objdump command is:
> 00114fa4 g DF .text 00000894 GLIBC_2.3.2 __muldf3
This definitely is wrong. __muldf3 in glibc should be for backward
compatibility only. Someone working on pcc should take a look at
sysdeps/powerpc/nofpu/Versions and fix them similar to the way in
Argh, this somehow passed me by. This means glibc-2.3.2 is quite broken in
the ppc-nofpu case. If these symbols are exported at all from glibc, they
shouldn't be exported as default symbols. So at least a libgcc-compat.S is
needed here (a Version script extension to create a non-default versioned
symbol would be nice), even better would be to remove the symbols from the
Versions file again, I don't think there are glibc-2.3.2 based nofpu
distros out there, so that should be fine. What was the reasoning to add
these symbols in the first place?
> I didn't mention in my original email, but linking with -lgcc before -lc
> works. This is what happens when gcc calls ld from the output of gcc -v.
I will see if I can reproduce it on Linux/x86. I suspect it is a ppc
That's normal behaviour, libgcc has all these symbols and gcc correctly
links '-lgcc -lc -lgcc', but adding -lc to the gcc link line undos that and
then breaks with a the broken glibc-2.3.2.