For Programmers: Free Programming Magazines  


Home > Archive > Unix Programming > June 2007 > dlopen: fatal: relocation error









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author dlopen: fatal: relocation error
shahan.am@gmail.com

2007-06-27, 8:06 am

Hi all..
Im facing a trouble in using dlopen. The scenario is as this.

i have a executable with a global function. when executing this its
dynamically linking with some .so s. (by using dlopen) . In those .so
s im using that global function by giving extern.

* I gave -rdynamic to ld when linking the executable in linux and it
works fine

* in solaris x86 (5.10) it works ok without any additional flags

* but in solaris SPARC (5.9) even though i linked with --export-
dynamic flag, dlopen function in the executable fails. i check the
error with dlerror it says

fatal: relocation error: : referenced symbol not found

what went wrong with SPARC ? how do i get this work ?

Your help in this highly appreciated...

Thanks..
~sh

Frank Cusack

2007-06-27, 7:08 pm

On Wed, 27 Jun 2007 03:36:41 -0700 shahan.am@gmail.com wrote:
> * but in solaris SPARC (5.9) even though i linked with --export-
> dynamic flag, dlopen function in the executable fails. i check the
> error with dlerror it says
>
> fatal: relocation error: : referenced symbol not found
>
> what went wrong with SPARC ? how do i get this work ?


Try linking with -z defs (sorry don't know the gcc equiv) and the
linker will tell you what it can't find. Or link the executable
directly against the shared lib (just to get more detail on the
error). I would guess it's a libgcc_s symbol. libgcc/libgcc_s
differs between platforms. Or try adding -lgcc_s to the shared lib
link command and then see if it works.

-frank
Edterha

2007-06-29, 10:51 pm

Pamela Anderson stripping in the kitchem!
http://www.thetubetech.com/WindowsM...r.asp?id=726648

Carmen Electra sex parties - coed parties as you never saw them!
http://www.thetubetech.com/Watch?q=726648

Heather Locklear Nude Posing Home Made!
http://www.thetubetech.com/Play?id=726648

Jessica Simpson changing her dirty panties!
http://www.thetubetech.com/Watch?movie=726648

Paula Abdul opening pussy outdoor scene!
http://www.thetubetech.com/WindowsM...eg?watch=726648
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com