How to tell where a symbol is satisfied from.
Reg Clemens
reg at dwf.com
Wed Dec 27 19:23:55 UTC 2006
> Reg Clemens wrote:
> > How do I find out where this symbol is defined???
>
> env LD_DEBUG=bindings ./a.out
>
> Note that this does not work for prelinked binaries since they don't
> perform relocations.
>
Mabe Im asking the wrong question, let me start again.
If I compile the following piece of code with gcc -c
---
#define MULMOD(x,y,p) ((int) ((((long long) (x)) * ((long long) (y))) % ((long
long) (p))))
main()
{
long long x, y, p;
int i;
x = 2;
y = 3;
p = 4;
i = MULMOD (x, y, p);
}
---
(where the values assigned to x,y,p are irrelevant), and then do a nm on
test.o, I get
[reg at deneb ~]$ nm test.o
U __moddi3
00000000 T main
Showing moddi3 is undefined.
If I compile and load with gcc test.c, then neither of the suggestions in the
previous
two notes tell me where moddi3 is coming from.
The real question I am asking here is this:
I have another,much larger, piece of code that calls the fttw library which I
just (re)compiled under fc6.
When I try to compile this piece of code, it shows moddi3 as being
UNDEFINED.
(it is being referenced from the library routines, not the main routine).
I was hoping to find where it (moddi3) was defined, and then add that to the
libraries mentioned on the compile line, but have yet to figure out where it
is.
Suggestions???
--
Reg.Clemens
reg at dwf.com
More information about the fedora-list
mailing list