This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Using linker scripts with dlopen


On Thu, 2011-07-28 at 11:42 -0700, Roland McGrath wrote (quoting Mike
Frysinger):
> > this is the point ive tried to make with them in the past via the
> > Gentoo bugzilla but it seems i havent been able to get the point
> > across.  no one is saying that dlopening the C library is wrong, but
> > we are saying that dlopening "libc.so" instead of "libc.so.6" is
> > wrong.
> 
> I wonder if they even know about <gnu/lib-names.h>.  We did once try to
> make it relatively easy for people to do this right, after all.  (Not that
> this particularly helps with getting the version sets and ABIs really right.)

I wasn't aware of <gnu/lib-names.h>, but please help me understand the
practical difference between the automatically generated include file
and the specific SONAME I can get by reading the linker script. My
impression is that they have the same information, but the include file
is intended for the C preprocessor and the linker script is intended for
the linker. It still boils down to how one calls and links to a shared
library from C.

My need is different. I want to call and link to a shared library
dynamically. If using <gnu/lib-names.h> is the preferred way to do it,
that's fine with me. However, I don't see the difference if I end up at
the same place by using the information in the linker script.

I still get back to the same requirement: How can I dynamically call the
shared function? You are telling me that I have to be careful because
the ABI might be different. Is that a significant concern when I'm
calling a well-known function using the platform's calling sequence?

So far the responses I've received tell me that I'm doing things wrong.
I'd really appreciate you suggesting better alternatives so I can use
them. Thanks.

Howard


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]