This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: gold not finding symbols in ld-linux.so.2
> In Symbol_table::warn_about_undefined_dynobj_symbol I see that we
> explicitly don't warn about libraries found in the system library
> directory, that being the directory in which we find libc.so. I
> wonder why that didn't help here?
Possibly because libc.so was found in /lib and libpthread.so was found
in /usr/lib or vice versa?
It looks like warn_about_undefined_dynobj_symbol tries to decide when
it doesn't have enough information to issue the warning by looking to
see if we've seen all the DT_NEEDED entries for the object containing
the reference. The problem here is that we *have* seen them all, but
we haven't seen the transitive closure -- i.e., we haven't seen one of
the DT_NEEDED entries for libc.so.6. Do we need to fix
Dynobj::has_unknown_needed_entries to check the transitive closure?
Of course, fixing libpthread.so to use a GROUP that explicitly names
ld-linux.so would also fix the problem.
-cary