This is the mail archive of the libc-hacker@cygnus.com 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]

Re: More on 32bit/64bit ABIs under Linux


> 
> On Apr 22, 1999, hjl@lucon.org (H.J. Lu) wrote:
> 
> >> On Apr 22, 1999, hjl@lucon.org (H.J. Lu) wrote:
> 
> >> > You don't want to prepend "-L../foo". We only prepend things like
> >> > "-L/foo"
> 
> >> How about -L$HOME/lib?
> 
> > Don't prepend "/ABI32".
> 
> How can it tell?
> 
> >> I can't make symlinks in /ABI32 as a regular user.  And I can't do
> >> that on every single host of the network from which I might want to
> >> mount my home dir and run the application.
> 
> > If we don't prepend "/ABI32" to -L$HOME/lib, will that be a problem?
> 
> We're supposed to take care of the flags for finding libraries in
> non-standard paths, aren't we?
> 
> > We only prepend "/ABI32" to -L/foo/bar, if both /foo/bar and
> > /ABI32/foo/bar exist.
> 
> Then the super-user could play tricks on me by creating
> /ABI32/home/oliva/lib :-)

He/she can also do

# rm -rf /home/oliva

> 
> > The current /etc/ld.so.conf can handle multiple ABIs. The run-time
> > linker is not a problem. The linker, ld, is a problem.
> 
> Why can't it be taught to hande multiple ABIs too?  I like you idea of
> introducing the ABI in the SONAME of the library; why couldn't it also
> use it when searching for a library?  So that, when you specify
> -mabi=64 (default) -lfoo, it will look for libfoo-64.so, or maybe

-mabi=64  may not be enough. As I mentioned on my soname proposal, you
need to keep track the interface of libfoo, the interface of libc used
to compile libfoo and 32bit vs. 64bit.

> lib64.foo.so, if you will, which is less likely to lead to conflicts.
> Then we wouldn't need special directories at all: the linker would
> search for the library with the appropriate ABI prefix.  If it can't
> find it, it would fallback to the traditional library naming scheme,
> making sure that the library actually complies to the selected ABI.
> 

The problem is it is a big change. The existing libraries won't work
and the linker people may not like it. It can be very complicated.
Symlink to libfoo.so/libfoo.a seems to be a simple solution.

-- 
H.J. Lu (hjl@gnu.org)


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