On Mon, 19 Aug 2019 at 13:22, David Hildenbrand <da...@redhat.com> wrote: > Thanks, running > > "ldconfig -c etc/ld.so.cache -r ." > > Seems to fix the issue for me. So you are sure the bug resides in glic > and not in the qemu-user pieces of the library loader?
Pretty sure, yes. QEMU doesn't implement any of the dynamic loader: it just loads the elf interpreter (ld.so) and the binary into memory, and all dynamic loading is ld.so running as guest code doing syscall. The problem IIRC is that ld.so just mmap()s the ld.so.cache file in and wades through it: https://sourceware.org/git/?p=glibc.git;a=blob;f=elf/dl-cache.c;h=d8d1e2344e612d98689cf7d7ad965822d0ab6ed1;hb=HEAD and the magic-number checks are memcmp(), so the magic number is the same for both big and little endian but the data structures in the file are not endian-independent. thanks -- PMM