public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "Harris, Jeff" <JeffH@aiinet.com>
To: "'H. J. Lu'" <hjl@lucon.org>, "Harris, Jeff" <JeffH@aiinet.com>,
	 amodra@bigpond.net.au
Cc: "'binutils@sources.redhat.com'" <binutils@sources.redhat.com>
Subject: RE: Linking with -lc
Date: Wed, 07 May 2003 19:39:00 -0000	[thread overview]
Message-ID: <3B785392832ED71192AE00D0B7B0D75B1C6498@aimail.aiinet.com> (raw)

The output from the objdump command is:

00114fa4 g    DF .text  00000894  GLIBC_2.3.2 __muldf3

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.

Jeff

-----Original Message-----
From: H. J. Lu [mailto:hjl@lucon.org] 
Sent: Wednesday, May 07, 2003 3:21 PM
To: Harris, Jeff; amodra@bigpond.net.au
Cc: 'binutils@sources.redhat.com'
Subject: Re: Linking with -lc


On Wed, May 07, 2003 at 02:54:55PM -0400, Harris, Jeff wrote:
> I am experiencing a strange linking problem since upgrading my binutils to
> 2.14.90.0.1.  I have a GCC version 3.2.3 cross-compiler for powerpc with
> soft floating point.  I am using GLIBC 2.3.2.
> 
> I have a shared library which uses floating point operations.  I build it
> as:
> 	powerpc-ai-linux-gcc -g fplib.c -shared -o libcfp.so
> As a result, it defines __muldf3 as a local text symbol in libcfp.so.
> 
> If, however, I build it as:
> 	powerpc-ai-linux-gcc -g fplib.c -shared -o libcfp.so -lc

-lc shouldn't be needed.

> The __muldf3 symbol is an undefined global symbol: __muldf3@@GLIBC_2.3.2.

There are 2 problems:

1. Glibc 2.3.2 shouldn't export __muldf3 for ld. You need to find out
why it does. Please provide

# objdump --dynamic-sym libc.so.6 | grep __muldf3

2. Even if glibc is wrong, ld should still work.

I will see if I can come with a small testcase for Linux/x86.


H.J.

             reply	other threads:[~2003-05-07 19:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-07 19:39 Harris, Jeff [this message]
2003-05-07 19:47 ` H. J. Lu
2003-05-07 20:09   ` H. J. Lu
2003-05-08  8:42   ` Franz Sirl
2003-05-08 13:52     ` H. J. Lu
  -- strict thread matches above, loose matches on Subject: below --
2003-05-08 13:55 Harris, Jeff
2003-05-08 18:51 ` H. J. Lu
2003-05-07 20:40 Harris, Jeff
2003-05-07 21:51 ` H. J. Lu
2003-05-07 18:55 Harris, Jeff
2003-05-07 19:20 ` H. J. Lu
2003-05-07 19:37 ` Thiemo Seufer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3B785392832ED71192AE00D0B7B0D75B1C6498@aimail.aiinet.com \
    --to=jeffh@aiinet.com \
    --cc=amodra@bigpond.net.au \
    --cc=binutils@sources.redhat.com \
    --cc=hjl@lucon.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).