Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 01-31-2006, 06:07 AM   #1
LQ Newbie
Registered: Jan 2006
Posts: 8

Rep: Reputation: 0
Is it madatory for a executable file to have relocation section ?


I have a problem in finding a symbol in shared object . When i convert a dll made on windows to the shared object on linux . Also i have a application which i have converted in elf format but it is running properly if it is without any dependency on the user created dll . When an application depending on the user created dll on windows is converted into elf format then on executing it on linux it gives an error that ->

undefined symbol fopen_api eg,) this symbol is defined in the dll which has been converted to shared object . So when the elf file using that shared object on linux is executed the given error comes.

Although the executable gets shared library but it does not execute because on readelf it shows the dependencies and also the export information is also present in the shared object.

What might be the reason?

Also after error , segmentation fault occurs and program exits .

How can i debug the program without having debug section in my converted format of executable ?

Can anybody out there help me ?
Old 01-31-2006, 11:07 PM   #2
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
A statically linked file shouldn't have a relocation section since no external libraries have to be mapped in (I'm not 100% sure on this, but it makes sense and a quick test I ran seems to confirm it).

How are you converting your dll? Are you recompiling with gcc -shared to make the library? It sounds like either the library hasn't been created correctly or the loader isn't picking it up. This could be because it is not in your LD_LIBRARY_PATH or /etc/, which govern the directories in which ld looks for shared libraries. Try setting the LD_LIBRARY_PATH to point to the directory with your library. You can run ldd <executable> yto get a list of the shared libs an executable depends on -- if any are not found, chances are the executable will fail in the manner you describe.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
LILO L 99 99 99... again. Physical relocation of file? dodgecharger Linux - General 1 10-18-2004 08:51 PM
Madatory Auto Logoff and shutdown wanted 1kyle Linux - Security 1 07-17-2004 03:19 PM
relocation error - glibc - file gjhicks Linux - Software 1 07-04-2004 11:06 AM
Linux Executable File Help (created from a .c file) MattG1981 Linux - Newbie 7 06-06-2004 05:54 PM
RPM Spec file creation: %file section question davidas Linux - Newbie 0 03-16-2004 11:36 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:40 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration