readelf/ldconfig confused about ELF header

Hamish Moffatt hamish at cloud.net.au
Wed Oct 31 06:51:17 UTC 2007


On Wed, Oct 31, 2007 at 05:10:05PM +1100, Hamish Moffatt wrote:
> I'm using buildroot to compile for armeb on a x86-64 (little-endian) host.
> uclibc's readelf and ldconfig are giving confusing results reading the
> headers of compiled libraries. 
> 
> Programs run ok, but ldconfig decides that my target has mixed
> byte-order libraries and generates a wrong-endianness ld.so.conf.
> 
[..]
> 
> I guess this means something is whacky in ext2fsprog's library generation?

Yup. I was running readelf on libext2fs.so, which was a symlink to
/lib/libext2fs.so.2.4 (absolute path) - the host's library, not the 
cross-compiled version.

ldconfig was following the links and seeing different endianness in the
host's libraries, thus generating a host-order ld.so.conf.

Bug#1565 reported against buildroot's e2fsprogs package, with patch.


Hamish
-- 
Hamish Moffatt VK3SB <hamish at debian.org> <hamish at cloud.net.au>



More information about the uClibc mailing list