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: Policy: Require new dynamic loader names for entirely new ABIs?


On Tue, 28 Jan 2014, Steve McIntyre wrote:

> >It could be that changing the code to be multi-arch friendly would be 
> >simpler than building cross-ldconfig under constraints to avoid large 
> >changes to the underlying code.
> 
> Right, that's what I'm thinking. Unless there are some obscure
> architecture-dependent pieces in ldconfig that I haven't seen yet?

I've looked at the old cross-ldconfig changes - which only allowed 
building a cross-ldconfig that supported a single target at a time, not a 
multi-target ldconfig.  (I don't think the actual patches - of which what 
I have may well be an old version - will be relevant to making ldconfig 
multi-target; they just serve to point out some of the issues arising.)

* Various code in ldconfig needs to handle ELF file fields possibly being 
the wrong endianness (so it can't just access data loaded from the file 
directly).

* The old changes appear to make _dl_cache_check_flags available to the 
cross-ldconfig though I don't see an obvious current reason for it to be 
needed.

* Of course you need the readelflib.c support for all ABIs - and remember 
if building a separate cache for each ABI that some shared libraries might 
be ambiguous (supported for more than one ABI variant) and some ABIs may 
support libraries with / without certain ELF header markings, so the 
present flags don't map to separate ABIs in a very straightforward fashion 
(maybe instead the architecture needs to provide a list of ABIs with which 
a library is compatible, or something like that).

* ldconfig uses dl-procinfo.h and dl-procinfo.c, so a range of 
architecture-specific HWCAP information is needed.

* ldconfig.h provides SYSDEP_KNOWN_INTERPRETER_NAMES and 
SYSDEP_KNOWN_LIBRARY_NAMES.

* readlib.c uses LD_SO, LIBC_SO and LIBM_SO from gnu/lib-names.h - and 
even the present way of generating that for e.g. 32-bit/64-bit 
configurations is a mess, duplicating information in the makefiles and 
shlib-versions, let alone defining some way to enumerate those values for 
every ABI supported by glibc.

No doubt it's possible to resolve all these issues, and have some 
equivalent of elf.h - a shared file or files with the relevant information 
for all ABIs supported by glibc about how to identify the ABIs with which 
a binary is compatible - given consensus that doing so is desirable at 
all.  But there do seem to be a fair number of such system dependencies.

-- 
Joseph S. Myers
joseph@codesourcery.com


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