On Thu, Nov 10, 2011 at 05:33:52PM +0000, Steve McIntyre wrote:
Hey folks,
Continuing on from the discussions at LC last week, here are my two patches. They work OK for me in testing on armhf and armel builds here, so I hope they are helpful for other people.
Background: in bi-arch and multi-arch configuration, soft-float and hard-float libraries do not play well together at all:
ldconfig (currently) does not distinguish between the two ABIs when scanning libraries and putting their details in ld.so.cache, so if you have libs of both ABIs installed on your system then there is no guarantee that the right one will be used when needed.
ld.so (currently) cannot verify at run-time whether a given lib uses the hard-float or soft-float ABI, which can lead to similar problems.
Talking with doko on IRC, it's become clear that the second patch needs extending a little more to allow ldd to work on a mixed/multi-arch system. Here's the addition:
steve@panda-smcintyre:~/linker/eglibc-2.13/elf$ diff -u dl-load.c~ dl-load.c --- dl-load.c~ 2011-11-23 15:53:24.341835279 +0000 +++ dl-load.c 2011-11-23 16:21:27.005896511 +0000 @@ -1715,7 +1715,15 @@ ret = check_arm_attributes_hfabi(fd, ehdr, &is_hf); if (ret != 0) return ret; - + +#ifdef __ARM_PCS_VFP + if (!is_hf) + _exit(1); +#else + if (is_hf) + _exit(1); +#endif + if (all_hf == -1) { if (is_hf)
Cheers,