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:

> The reason I suggested ${libc_version} is it tells me which C
> library is compiled against. In many cases, this information
> is very useful. It is just my opinion.

Doesn't ldd give you this information already?

IMO, introducing sonames of dependency libraries into dependent ones
*is* a good idea, because it solves the problem of libc migration in a
much cleaner way than the ld.so hack introduced in the migration from
libc5 to 6.  The point is that it's not just libc that can change,
affecting relinks of all libraries that depend on it: any other
library that may have other libraries depending on it may cause the
same kind of problem that the libc5->6 upgrade did.

>> > As I said, it is too complex to me.  /ABI32 is easier to implement.

>> But it's more error prone.  I, for one, wouldn't like to install a new
>> version of a library with ABI32 in /usr/local/lib, link with
>> -L/usr/local/lib and see the linker use the old version just because
>> it tried to outsmart me by searching /ABI32/usr/local/lib instead.

> There is no perfect solution. You can write down your proposed linker
> change in some detail. Let's discuss it with linker users as well as
> linker writers.

My suggestion is quite simple: the linker would search for
lib${ABI}.foo.so before libfoo.so.  This wouldn't (and isn't supposed
to) solve the general problem of dependency libraries.  In order to
solve it, we'd need some way to enumerate all available versions of a
library, along with their dependencies, and select the appropriate
ones to use by matching dependencies with available versions, like
ld.so currently does.  I don't think this is something we should care
about at the linker level, though.  IMO, supporting -mabi=ABI and
searching for libraries named like lib${ABI}.foo.so is enough.

-- 
Alexandre Oliva http://www.dcc.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
{oliva,Alexandre.Oliva}@dcc.unicamp.br  aoliva@{acm.org,computer.org}
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
*** E-mail about software projects will be forwarded to mailing lists



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