This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Re: [PATCH 2/2] MIPS: Fix n64 `ldconfig' for 32-bit objects
On Wed, 18 Mar 2009, Joseph S. Myers wrote:
> Thanks, applied, although using a union between the two header types might
> be cleaner than casting a pointer to one to a pointer to the other.
Thanks (for both). I agree that a union might be cleaner iff both
Elf32_Ehdr and Elf64_Ehdr were already used explicitly (rather than
through ElfW()). As it is, the use of lone Elf32_Ehdr would suffice, so a
union would be all but obvious and I thought it might be worth expressing
code like this so that such a mistake is not repeated if someone in the
future refers to the header from the n64 path and misses the fact in a
multilib Linux system any of the {o32,n32,n64} `ldconfig' binaries is used
to maintain common "ld.so.cache". With my version there is a chance they
will ask themselves what this cast in the o32/n32 path is all about.
And the correct behaviour of "ld.so.cache" is difficult to verify as
AFAICS the path is hardcoded and you have to actually have a system (or
chroot(2) jail) available to spare for a fresh libc installation and
verification rather than just running the testsuite. So it better be as
prone to human errors as it can. Hmm, perhaps I better expressed it with
some comment in the code actually...
Maciej