LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to overcome symbol lookup error? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-overcome-symbol-lookup-error-412944/)

unclesam 02-08-2006 06:33 AM

How to overcome symbol lookup error?
 
Hi
I am facing a problem which is as follows:

I have converted an PE file (DLL) of windows into ELF format (shared object). This DLL contains some functions which are used by the application on windows as well as linux but when the application on linux is executed it gives a following error :

'application name' symbol lookup error : 'app name ' undefined symbol 'symbol name'

But when i load that shared object inside the application by dlopen it gives error :
nonloadable sections

Also i havent included the debug section in my application (when converted from PE to ELF)
So no question of debugging . So i included one printf statement just before the function call ( symbol imported from shared object) in application. When executed ,it runs upto the printf statement after that it terminates and gives the error of non loadable sections found.

Is it a problem in linker or is it mapping problem ?


Can anybody help ????

Mara 02-09-2006 04:43 PM

My guess is that the problem is caused by conversion. What do you exactly mean? Have you used a conversion tool or recompiled the library?

unclesam 02-10-2006 02:50 AM

Conversion process!!
 
Actually,
I converted the file formats manually without using any conversion tool. I read the format of the ELF file and then the needed fields for the Dynamic Shared Object. I then extracted the necessary information from the PE ( i.e.DLL) and then mapped that information into the given format of ELF. where necessary fields were DT_NEEDED,DT_NULL,DT_HASH,DT_STRTAB,DT_SYMTAB,
DT_STRSZ,DT_SYMENT.

But still the problem is there. So what to do?


All times are GMT -5. The time now is 04:54 AM.