[vox-tech] Relocation errors and dynamic symbols
Peter Jay Salzman
p at dirac.org
Wed Dec 1 09:05:00 PST 2004
On Wed 01 Dec 04, 8:45 AM, Ken Herron <kherron+lugod at fmailbox.com> said:
> Peter Jay Salzman wrote:
>
> >"U" doesn't mean a fatal undefined error; it simply means something that
> >needs to be linked on the fly by ld.so. Right? Is there a way of querying
> >ld.so about whether it "knows" a particular symbol?
> >
> >
> The dynamic linker doesn't know about particular symbols. The nm
> executable contains a list of shared libraries that it was linked with;
> you can use ldd to see this list. When nm is executed, the dynamic
> linker loads those libraries into its address space and tries to resolve
> all of the undefined symbols.
>
> The dynamic linker also has an API which can be invoked to access other
> libraries under the program's control. This is used by things like PAM
> to load authentication modules, or by mozilla to load plugins.
Yeah -- I knew most of this, but what if there's a particular symbol I'm
interested in... say nm reports:
29A0CC U big_hairy_monster
and I want to know what library big_hairy_monster is supposed to come from.
What I was trying to get at is: is there a way of figuring out which library
this unresolved symbol is supposed to come from?
The only method I can think of is using ldd to get a list of all the
libraries, use objdump on each of the individual libraries, and grep through
each individual list. A real pita. I was hoping there was an easier way.
Pete
--
The mathematics of physics has become ever more abstract, rather than more
complicated. The mind of God appears to be abstract but not complicated.
He also appears to like group theory. -- Tony Zee's "Fearful Symmetry"
PGP Fingerprint: B9F1 6CF3 47C4 7CD8 D33E 70A9 A3B9 1945 67EA 951D
More information about the vox-tech
mailing list