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

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

Reply to
Rohit
Loading thread data ...

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

Reply to
Amit Limaye

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.
Reply to
Paul Pluzhnikov

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

$objdump -t appl.o

00000000 *UND* 00000000 IxfApiInit
Reply to
Rohit

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.