help me; i'm continuously getting relocation error after dlopen and then dlsym

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
hi,
i have the Driver and API level code running on SA1100 processor board,
i.e. my executable is ocdLinuxBuild140-B0 and when i do file command on
it:
[kkotary@lx-xeon-8 embedded]$ file ocdLinuxBuild140-B0
ocdLinuxBuild140-B0: ELF 32-bit LSB executable, ARM, version 1 (ARM),
statically linked, not stripped

Now, this runs on a firmware, and inside this program i have a dlopen
routine which takes appl.o and RTLD_LAZY as parameters. And appl.o is
as:
[ixf@manteo8 embedded]$ file appl.o
appl.o: ELF 32-bit LSB shared object, ARM, version 1 (ARM), not
stripped

dlopen and dlsym are sucessfull but there is function call inside
appl.o which calls a function "IxfApiInit" of my API level program
ocdLinuxBuild140-B0 as:
pLaunchFunction=(launchAppl_t)(*(char**)pointerToFunction);
(pLaunchFunction)(clientReq->m_nParam1,clientReq->m_nParam2,
clientReq->m_nParam3,clientReq-m_nParam4,downloadedBuffer);

of course after searching for the pointer to the function "IxfApiInit"
and assigning it to function pointer "pLaunchFunction"...
The error statement coming is:
OcdLinuxBuild139-B0: relocation error: "/home/ftp/appl.o":
Undefined symbol: IxfApiInit
I'm using proper Makefiles for generating both appl.o and
ocdLinuxBuild140-B0, please help me out...
thanx,
rohit


Re: help me; i'm continuously getting relocation error after dlopen and then dlsym
does the objdump appl.o of show the function IxfApiInit ?


Re: help me; i'm continuously getting relocation error after dlopen and then dlsym
objdump shows this... and this is shown for many other functions
presend in the driver

$objdump -t appl.o
00000000         *UND*  00000000 IxfApiInit


Re: help me; i'm continuously getting relocation error after dlopen and then dlsym

Quoted text here. Click to load it

Your description of the problem is quite confusing.
You will probably benefit from reading this:
 http://www.catb.org/~esr/faqs/smart-questions.html

That said, you probably want to relink your main application with
'-rdynamic' or '-Wl,-E' flag. Do 'info ld' or 'man ld' to see what
that means.

Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.

Site Timeline