Re: Extracting data symbols from an archive using dlsym
- From: Christina <christina.subscribes@xxxxxxxxx>
- Date: Tue, 4 Dec 2007 09:26:25 -0800 (PST)
I tried declaring it extern. But it is not able to execute. That is
why I tried going for the dlopen/dlsym approach. I think the
components of the archive are dynamic, it is not static. I know that
in AIX, members of a dynamic archive can be obtained using dlopen/
dlsym. But I am not sure that it can be done in Linux.
Regards,
Christina.
On Dec 3, 3:02 pm, sc...@xxxxxxxxxxxxx (Scott Lurndal) wrote:
Christina <christina.subscri...@xxxxxxxxx> writes:
Hi Everybody,
I have declared a static variable in a header file of a library that
times certain routines in the library. My application links to this
library. Before terminating, I want to print the value of this
variable. The library is in archive format. When I try using dlopen on
this library on Linux, I get the error, "library: invalid ELF header".
Does anybody have any idea, how to extract symbols from an archive
format?
Or does anybody have any other ideas about how to collect the timing
of routines in the library in a better way?
I would really appreciate any help and suggestion that anybody could
offer,
Warm Regards,
Christina.
If it is a static archive, and is linked with your application, simply
declare the variable 'extern' and access it directly.
scott- Hide quoted text -
- Show quoted text -
.
- References:
- Extracting data symbols from an archive using dlsym
- From: Christina
- Re: Extracting data symbols from an archive using dlsym
- From: Scott Lurndal
- Extracting data symbols from an archive using dlsym
- Prev by Date: select() question, avoiding blocks on read/write
- Next by Date: Re: Extracting data symbols from an archive using dlsym
- Previous by thread: Re: Extracting data symbols from an archive using dlsym
- Next by thread: لاول مرة شاهد فديو التحرش بمروة بالصوت والصورة
- Index(es):
Relevant Pages
|