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

Sep 13, 2005 3 Replies

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



does the objdump appl.o of show the function IxfApiInit ?

Your description of the problem is quite confusing. You will probably benefit from reading this:

formatting link

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.

objdump shows this... and this is shown for many other functions presend in the driver

$objdump -t appl.o

00000000 *UND* 00000000 IxfApiInit

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required