The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
Google UNIX.COM


High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
what is wrong with the log function in c? return_user High Level Programming 2 05-02-2008 02:40 PM
Problem with SQL loader risshanth UNIX for Dummies Questions & Answers 2 11-02-2007 12:08 AM
Wrong date function Asteroid Shell Programming and Scripting 3 04-04-2007 01:09 AM
Whats wrong with my function?? <newbie> riwa Shell Programming and Scripting 4 03-04-2006 02:14 PM
boot loader - HELP !!!! perleo UNIX for Dummies Questions & Answers 1 10-15-2002 03:44 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 01-08-2008
Registered User
 

Join Date: Oct 2007
Posts: 15
Dynamic loader taking function from wrong lib

Hi,

I have two dynamically loaded libraries (shared objects), both of which include functions of the same name - foo. When I call 'foo' from libA, it takes it from libB, although it is implemented in libA as well. Since we need the function to be called from libA, we tried linking it with the flag -bSymbolic, to no avail. It still called the function from libB.

Specifics: Working on HP 11.23, compiling with HP gdb 5.7.4.

Background: In this case libA is an ODBC driver we've written. libB is the unixODBC driver manager. The way these works is that in our driver we implement a set of SQLxxx functions, which have the same names as the set of functions in the driver manager. When the driver manager loads our ODBC driver, it knows to call the SQLxxx functions from our driver. Our problem is in a case where we call our own SQLxxx function from within our own driver, and it calls the function from the driver manager instead!

Ideas?

Thanks.
Reply With Quote
Forum Sponsor
  #2  
Old 01-29-2008
Registered User
 

Join Date: Oct 2007
Posts: 15
Problem resolution – for anyone interested.
The problem was finally solved by -Bsymbolic, but it was in a roundabout way.
We are working on HP and when we ran into the problem we were compiling with gcc. We tried adding –Bsymbolic to the gcc command but it didn’t help. We then tried adding –W1,Bsymbolic in order to pass the option to the linker, but this didn’t help either.
Now we have moved to compile with HP’s native aCC, for reasons that are unrelated to this problem. With aCC when we gave it –W1,Bsymbolic the library’s symbols were finally taken locally.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 08:52 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0