How to know if a symbol refers to a static linked library with "nm"
Hi,
Given the code below:
<<snip>>
jlfdiaz@narcea:/tmp$ cat foo1.c
int foo1() {}
jlfdiaz@narcea:/tmp$ gcc -c -o foo1.o foo1.c
jlfdiaz@narcea:/tmp$ ar rs libfoo1.a foo1.o
jlfdiaz@narcea:/tmp$ cat kk.c
#include <stdio.h>
int main()
{
foo1();
}
jlfdiaz@narcea:/tmp$ vi kk.c
jlfdiaz@narcea:/tmp$ gcc -I/tmp -L/tmp kk.c -lfoo1
<<snip>>
Is possible to know with "nm", "ldd", "ar" or other unix similar command that executable "a.out" is statically linked with "libfoo1.a".
Thanks in advance,
Jose Luis
|