LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-01-2008, 08:14 PM   #1
jackandking
Member
 
Registered: Dec 2004
Posts: 92

Rep: Reputation: 15
can libs use symbols defined in app


my problem keyword is "undefined symbol _xxx"

readelf find the symbol defined in the application like:
... FUNC GLOBAL DEFAULT 12 _xxx

readelf also find the symbol used in the library like:
... NOTYPE GLOBAL DEFAULT UND _xxx

ldd show the application need the library like:
ldd applicaton
library => ...

the error msg at run is:
application: symbol lookup error: library: undefined symbol: _xxx

I know it's a bad idea to let the library depend on the application, but sometime this is a convenient way the do some test.
 
Old 12-04-2008, 08:50 AM   #2
jackandking
Member
 
Registered: Dec 2004
Posts: 92

Original Poster
Rep: Reputation: 15
I made a mistake, the symbol in the app is actually in the .symtab section, not in the .dynsym section, so it's unavailabe in runtime.

Interesting thing is that once the symbol is used in the app, the symbol will be put into the .dynsym section. In this way, lib(shared object) can use the symbol defined in app successfully.

maybe some one can give the detailed explanation.
thanks in advance.
 
  


Reply


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
koffice app kplato libs missing BEBigBear Linux - Software 2 08-11-2007 11:09 PM
link-time libs need to be run0time libs says curl's make install UniquelyAm Linux - Software 0 06-09-2007 01:40 AM
Debugger selectively not using symbols in library with symbols Millenniumman Programming 1 03-03-2007 07:46 PM
What app uses what libs... sourceman Linux - General 2 02-18-2002 10:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:08 PM.

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