http://sourceware.org/bugzilla/show_bug.cgi?id=15478
Bug #: 15478
Summary: -no-as-needed required to avoid runtime symbol lookup
error
Product: binutils
Version: 2.22
Status: NEW
Severity: normal
Prio
http://sourceware.org/bugzilla/show_bug.cgi?id=15478
--- Comment #2 from Dave Cunningham 2013-05-17
01:46:41 UTC ---
> I think this is intended behavior for gold. It's expected that each
> library will have its own dependencies recorded so that we only record
> direct dependencies in the dynamic
http://sourceware.org/bugzilla/show_bug.cgi?id=15478
--- Comment #4 from Dave Cunningham 2013-05-17
15:58:14 UTC ---
> I think this is a behavior of the Gnu linker that gold is better off
> not copying. The linker ends up having to replicate the path searching
> done at runtime by the dynamic lo
http://sourceware.org/bugzilla/show_bug.cgi?id=15478
--- Comment #6 from Dave Cunningham 2013-05-17
19:45:56 UTC ---
> In this specific case, yes, no searching is necessary, but in the
> general case, if we're going to try to resolve undefined symbols in
> shared libraries, we need to process th
http://sourceware.org/bugzilla/show_bug.cgi?id=15478
--- Comment #8 from Dave Cunningham 2013-05-19
23:26:42 UTC ---
There doesn't seem to be any relationship between --allow-shlib-undefined and
--as-needed.
There is no undefined symbol in the link job, everything is satisfied by the
libraries
http://sourceware.org/bugzilla/show_bug.cgi?id=15478
--- Comment #12 from Dave Cunningham 2013-05-21
00:27:30 UTC ---
I guess you need to do a full mark/sweep. It's similar to garbage collection,
except instead of heap objects you have .so files, the .o files are the stack,
and the symbols are
http://sourceware.org/bugzilla/show_bug.cgi?id=15478
--- Comment #14 from Dave Cunningham 2013-05-21
15:31:17 UTC ---
OK, so here are the options, in decreasing order of my personal preference :)
1) Do the graph traversal to make --as-needed compatible with GNU ld
2) Rename --as-needed to --as-