[uClibc] dlopen / dlsym
John Gordon
jgordon at instant802.com
Sun Jun 27 12:13:59 UTC 2004
Hello Michael,
Are you doing anything with mklibs, or similar library minimising
scripts as part of your build process? I noticed that the installed
_pic.a is not in fact a PIC library for libdl (which is where those
functions come from I believe). You might want to check whether the
libdl.so file you are getting is a PIC one (not sure how to do that on
x86 - it is not an arch I use I'm afraid).
TTFN,
John...
> Thanks for your quick response. I must compliment you on a great
> library. It will really help our app. (Mbedthis AppWeb).
>
> Sorry, excuse my inexactness -- lack of sleep.
>
> Under gcc/glibc ix86 as supplied by redhat 9 it works fine.
> Using uClinux/uClibc or a uClibc toolchain for IX86 on the same system
> as above, I get the problem.
>
> BTW: the pointer returned is in the right memory space. running the
> system monitor and looking at the memory maps, the DLL is being loaded
> and the pointer is into the DLLs memory space. It just faults when I try
> to use the pointer.
>
> I built the toolchain, by downloading (CVS) your current snapshot. I did
> not use buildroot, but rather I used toolchain/gcc-3.3.x/make. Seemed to
> work fine. Had a few issues with ccache linking to executables
> incorrectly, but that was easily fixed.
>
> Most of our product works fine and I can compile without DLLs and it
> works well also.
>
> Any guidance will be appreciated.
>
> Michael
>
> On Thu, 2004-06-24 at 15:52, Erik Andersen wrote:
>
>>On Thu Jun 24, 2004 at 03:52:48PM -0700, Michael O'Brien wrote:
>>
>>>I'm porting a app to use uclibc and so far so good.
>>>
>>>I've run into a problem that looks similar to past postings, but can't
>>>find the resolution.
>>>
>>>dlopen works and dlsym returns a pointer. Going indirect on that pointer
>>>to initialize the shared library gives a seg fault. The code works well
>>>without these calls and under gcc these calls work fine.
>>>
>>>Is there a known issue with dlsym?
>>>
>>>I'm using the latest uClibc snapshot and an IX86 toolchain. The shared
>>>library I'm loading has no external dependencies.
>>>
>>>Any guidance -- appreciated.
>>
>>"under gcc these calls work fine" suggests you are using
>>something other than gcc? What toolchain are you using?
>>
>> -Erik
>>
>>--
>>Erik B. Andersen http://codepoet-consulting.com/
>>--This message was written using 73% post-consumer electrons--
>>
>>
>>------------------------------------------------------------------------
>>
>>_______________________________________________
>>uClibc mailing list
>>uClibc at uclibc.org
>>http://uclibc.org/mailman/listinfo/uclibc
More information about the uClibc
mailing list