Subject: Undefined symbol while profiling
To: None <netbsd-help@NetBSD.ORG>
From: Biju Kaimal <BKAIMAL.IN.ORACLE.COM.ofcmail@in.oracle.com>
List: netbsd-help
Date: 10/13/1996 15:52:10
Hi all,
I am getting an undefined symbol, when I am profiling a program. This happens
when I am using the -pg option of gcc to include the profile information in
the executable.
The problem occurs only for the 'dlopen, dlcose' set of functions.
---
/* test.c */
main()
{
dlopen("/usr/lib/libc.a", 0);
}
% cc -pg test.o -o test
gives output as : ld: _dlopen : undefined symbol
while,
% cc test.o -o test
compiles successfully.
On Sun boxes, there is a libdl.so, so compiling with that included in the path
avoids the problem ie % cc -pg test.o -o test -ldl , works .
But, there is no libdl.so in NetBSD, what would be the equivalent for NetBSD,
or is there any solution for this problem.
Thanks in advance.
Regards,
Biju
____________________________________________________________________________
Biju Kaimal Email: bkaimal@in.oracle.com
Sun OS Group Voice: +91 (80) 2256198/199/203/204
Ext - 425
Oracle India Dev. Center Mail : Embassy Point, 3rd floor
150,Infantry Rd,Bangalore
India - 560001
Fax : +91 (80) 2256207
____________________________________________________________________________