public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Unintellegible ld error messages
@ 2005-05-11 19:11 Paul Koning
  2005-05-11 19:30 ` Daniel Jacobowitz
  0 siblings, 1 reply; 9+ messages in thread
From: Paul Koning @ 2005-05-11 19:11 UTC (permalink / raw)
  To: binutils

I got these messages from ld (version 2.16):

/usr/local/EQLGCC_v7/mipsel/lib/gcc/mipsel-netbsdelf/4.0.0/../../../../mipsel-netbsdelf/bin/ld: Cli: hidden symbol `_Unwind_GetIP' in /usr/local/EQLGCC_v7/mipsel/lib/gcc/mipsel-netbsdelf/4.0.0/libgcc.a(unwind-dw2.o) is referenced by DSO
/usr/local/EQLGCC_v7/mipsel/lib/gcc/mipsel-netbsdelf/4.0.0/../../../../mipsel-netbsdelf/bin/ld: final link failed: Nonrepresentable section on output

I haven't a clue what these mean.  What'a DSO?  What's a
"nonrepresentable section"?  More importantly, what should I do to
find out what is wrong here?

The map output was aborted, so it doesn't contain any information that
helps me.  The messages are meaningless, and they don't even say which
object file or script entry or library offended the linker.

I even tried looking at the source code.  That tells me that "DSO"
apparently has something to do with shared libraries, but other than
that it doesn't get me any closer to a solution.

       paul

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Unintellegible ld error messages
  2005-05-11 19:11 Unintellegible ld error messages Paul Koning
@ 2005-05-11 19:30 ` Daniel Jacobowitz
  2005-05-13 19:50   ` Paul Koning
  0 siblings, 1 reply; 9+ messages in thread
From: Daniel Jacobowitz @ 2005-05-11 19:30 UTC (permalink / raw)
  To: Paul Koning; +Cc: binutils

On Wed, May 11, 2005 at 03:04:42PM -0400, Paul Koning wrote:
> I got these messages from ld (version 2.16):
> 
> /usr/local/EQLGCC_v7/mipsel/lib/gcc/mipsel-netbsdelf/4.0.0/../../../../mipsel-netbsdelf/bin/ld: Cli: hidden symbol `_Unwind_GetIP' in /usr/local/EQLGCC_v7/mipsel/lib/gcc/mipsel-netbsdelf/4.0.0/libgcc.a(unwind-dw2.o) is referenced by DSO
> /usr/local/EQLGCC_v7/mipsel/lib/gcc/mipsel-netbsdelf/4.0.0/../../../../mipsel-netbsdelf/bin/ld: final link failed: Nonrepresentable section on output
> 
> I haven't a clue what these mean.  What'a DSO?  What's a
> "nonrepresentable section"?  More importantly, what should I do to
> find out what is wrong here?

Dynamic Shared Object.  This is a standard term.  It's not mentioned in
the ld manual; feel free to contribute a patch.

The hidden symbol `_Unwind_GetIP' is being referenced by a shared
library.  Figure out which one it is (I don't remember the reason why
we don't print that here; I believe it's pretty hard to recover from
our data structures at that point).  Then rebuild that library using
'gcc' to link and the symbol should no longer be undefined.

> I even tried looking at the source code.  That tells me that "DSO"
> apparently has something to do with shared libraries, but other than
> that it doesn't get me any closer to a solution.

Google would have been happy to tell you that "DSO" and "shared
library" are basically synonyms.

-- 
Daniel Jacobowitz
CodeSourcery, LLC

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Unintellegible ld error messages
  2005-05-11 19:30 ` Daniel Jacobowitz
@ 2005-05-13 19:50   ` Paul Koning
  2005-05-13 20:08     ` Daniel Jacobowitz
  2005-05-13 21:25     ` H. J. Lu
  0 siblings, 2 replies; 9+ messages in thread
From: Paul Koning @ 2005-05-13 19:50 UTC (permalink / raw)
  To: drow; +Cc: binutils

>>>>> "Daniel" == Daniel Jacobowitz <drow@false.org> writes:

 Daniel> On Wed, May 11, 2005 at 03:04:42PM -0400, Paul Koning wrote:
 >> I got these messages from ld (version 2.16):
 >> 
 >> /usr/local/EQLGCC_v7/mipsel/lib/gcc/mipsel-netbsdelf/4.0.0/../../../../mipsel-netbsdelf/bin/ld:
 >> Cli: hidden symbol `_Unwind_GetIP' in
 >> /usr/local/EQLGCC_v7/mipsel/lib/gcc/mipsel-netbsdelf/4.0.0/libgcc.a(unwind-dw2.o)
 >> is referenced by DSO
 >> /usr/local/EQLGCC_v7/mipsel/lib/gcc/mipsel-netbsdelf/4.0.0/../../../../mipsel-netbsdelf/bin/ld:
 >> final link failed: Nonrepresentable section on output
 >> 
 >> I haven't a clue what these mean.  What'a DSO?  What's a
 >> "nonrepresentable section"?  More importantly, what should I do to
 >> find out what is wrong here?

 Daniel> Dynamic Shared Object.  This is a standard term.  It's not
 Daniel> mentioned in the ld manual; feel free to contribute a patch.

 Daniel> The hidden symbol `_Unwind_GetIP' is being referenced by a
 Daniel> shared library.  Figure out which one it is (I don't remember
 Daniel> the reason why we don't print that here; I believe it's
 Daniel> pretty hard to recover from our data structures at that
 Daniel> point).  Then rebuild that library using 'gcc' to link and
 Daniel> the symbol should no longer be undefined.

The offending library is libstdc++, as compiled by GCC 4.0.0.  This
seems very strange.

      paul

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Unintellegible ld error messages
  2005-05-13 19:50   ` Paul Koning
@ 2005-05-13 20:08     ` Daniel Jacobowitz
  2005-05-13 20:59       ` Paul Koning
  2005-05-13 21:25     ` H. J. Lu
  1 sibling, 1 reply; 9+ messages in thread
From: Daniel Jacobowitz @ 2005-05-13 20:08 UTC (permalink / raw)
  To: Paul Koning; +Cc: binutils

On Fri, May 13, 2005 at 03:44:46PM -0400, Paul Koning wrote:
> The offending library is libstdc++, as compiled by GCC 4.0.0.  This
> seems very strange.

Then something's probably wrong with your GCC build environment; no one
else seems to encounter this warning with libstdc++.

-- 
Daniel Jacobowitz
CodeSourcery, LLC

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Unintellegible ld error messages
  2005-05-13 20:08     ` Daniel Jacobowitz
@ 2005-05-13 20:59       ` Paul Koning
  2005-05-14  4:59         ` Alan Modra
  0 siblings, 1 reply; 9+ messages in thread
From: Paul Koning @ 2005-05-13 20:59 UTC (permalink / raw)
  To: drow; +Cc: binutils

>>>>> "Daniel" == Daniel Jacobowitz <drow@false.org> writes:

 Daniel> On Fri, May 13, 2005 at 03:44:46PM -0400, Paul Koning wrote:
 >> The offending library is libstdc++, as compiled by GCC 4.0.0.
 >> This seems very strange.

 Daniel> Then something's probably wrong with your GCC build
 Daniel> environment; no one else seems to encounter this warning with
 Daniel> libstdc++.

It turns out that libgcc.so has _Unwind_GetIP as a regular symbol, but
libgcc.a has it as a hidden symbol.  One of my builds only has the .a
version of libgcc, so that's why that link fails (while others for
another target work fine).

	paul

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Unintellegible ld error messages
  2005-05-13 19:50   ` Paul Koning
  2005-05-13 20:08     ` Daniel Jacobowitz
@ 2005-05-13 21:25     ` H. J. Lu
  1 sibling, 0 replies; 9+ messages in thread
From: H. J. Lu @ 2005-05-13 21:25 UTC (permalink / raw)
  To: Paul Koning; +Cc: drow, binutils

On Fri, May 13, 2005 at 03:44:46PM -0400, Paul Koning wrote:
> The offending library is libstdc++, as compiled by GCC 4.0.0.  This
> seems very strange.
> 

That is your problem. On Linux, there are

[hjl@gnu-10 gcc-next]$ readelf -s /usr/gcc-4.0/lib/libgcc_s.so| grep _Unwind_GetIP
    19: 00004ff0    11 FUNC    GLOBAL DEFAULT   11 _Unwind_GetIP@@GCC_3.0
   214: 00004ff0    11 FUNC    GLOBAL DEFAULT   11 _Unwind_GetIP


H.J.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Unintellegible ld error messages
  2005-05-13 20:59       ` Paul Koning
@ 2005-05-14  4:59         ` Alan Modra
  2005-05-15 19:44           ` Paul Koning
  0 siblings, 1 reply; 9+ messages in thread
From: Alan Modra @ 2005-05-14  4:59 UTC (permalink / raw)
  To: Paul Koning; +Cc: drow, binutils

On Fri, May 13, 2005 at 04:07:56PM -0400, Paul Koning wrote:
> It turns out that libgcc.so has _Unwind_GetIP as a regular symbol, but
> libgcc.a has it as a hidden symbol.  One of my builds only has the .a
> version of libgcc, so that's why that link fails (while others for
> another target work fine).

_Unwind_GetIP as a hidden symbol in libgcc.a is not the problem.  If you
built libstdc++.so linked against libgcc_s.so, then when linking using
libstdc++.so you need to have libgcc_s.so available, and, importantly,
libgcc_s.so must be linked before libgcc.a if both are specified.

If you built libstdc++.so only linked against libgcc.a, then you can use
libstdc++.so like that too.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Unintellegible ld error messages
  2005-05-14  4:59         ` Alan Modra
@ 2005-05-15 19:44           ` Paul Koning
  2005-05-20  9:54             ` Alan Modra
  0 siblings, 1 reply; 9+ messages in thread
From: Paul Koning @ 2005-05-15 19:44 UTC (permalink / raw)
  To: amodra; +Cc: drow, binutils

>>>>> "Alan" == Alan Modra <amodra@bigpond.net.au> writes:

 Alan> On Fri, May 13, 2005 at 04:07:56PM -0400, Paul Koning wrote:
 >> It turns out that libgcc.so has _Unwind_GetIP as a regular symbol,
 >> but libgcc.a has it as a hidden symbol.  One of my builds only has
 >> the .a version of libgcc, so that's why that link fails (while
 >> others for another target work fine).

 Alan> _Unwind_GetIP as a hidden symbol in libgcc.a is not the
 Alan> problem.  If you built libstdc++.so linked against libgcc_s.so,
 Alan> then when linking using libstdc++.so you need to have
 Alan> libgcc_s.so available, and, importantly, libgcc_s.so must be
 Alan> linked before libgcc.a if both are specified.

 Alan> If you built libstdc++.so only linked against libgcc.a, then
 Alan> you can use libstdc++.so like that too.

Interesting.  objdump says that libstdc++ requires libm, but not
libgcc_s.  And libm doesn't require anything.

	   paul

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Unintellegible ld error messages
  2005-05-15 19:44           ` Paul Koning
@ 2005-05-20  9:54             ` Alan Modra
  0 siblings, 0 replies; 9+ messages in thread
From: Alan Modra @ 2005-05-20  9:54 UTC (permalink / raw)
  To: Paul Koning; +Cc: binutils

On Sun, May 15, 2005 at 02:43:32PM -0400, Paul Koning wrote:
> >>>>> "Alan" == Alan Modra <amodra@bigpond.net.au> writes:
>  Alan> _Unwind_GetIP as a hidden symbol in libgcc.a is not the
>  Alan> problem.  If you built libstdc++.so linked against libgcc_s.so,
>  Alan> then when linking using libstdc++.so you need to have
>  Alan> libgcc_s.so available, and, importantly, libgcc_s.so must be
>  Alan> linked before libgcc.a if both are specified.
> 
>  Alan> If you built libstdc++.so only linked against libgcc.a, then
>  Alan> you can use libstdc++.so like that too.
> 
> Interesting.  objdump says that libstdc++ requires libm, but not
> libgcc_s.  And libm doesn't require anything.

Hmm.  Perhaps you have hit a ld bug, but it seems to me that you have
given confliction information.  If "The offending library is libstdc++"
then libstdc++.so contains an unsatisfied reference to _Unwind_GetIP,
which means libstdc++.so ought to refer to libgcc_s.so in a DT_NEEDED
tag.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2005-05-20  7:28 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-11 19:11 Unintellegible ld error messages Paul Koning
2005-05-11 19:30 ` Daniel Jacobowitz
2005-05-13 19:50   ` Paul Koning
2005-05-13 20:08     ` Daniel Jacobowitz
2005-05-13 20:59       ` Paul Koning
2005-05-14  4:59         ` Alan Modra
2005-05-15 19:44           ` Paul Koning
2005-05-20  9:54             ` Alan Modra
2005-05-13 21:25     ` H. J. Lu

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).