[Bug dynamic-link/32508] ldd: /lib/ld-linux.so.2: cannot execute binary file: Exec format error

stsp at users dot sourceforge.net sourceware-bugzilla@sourceware.org
Mon Dec 30 11:24:32 GMT 2024


https://sourceware.org/bugzilla/show_bug.cgi?id=32508

--- Comment #3 from Stas Sergeev <stsp at users dot sourceforge.net> ---
(In reply to Florian Weimer from comment #1)
> It's odd to have a 32-bit glibc installed and not have kernel support.
> 
> It looks like this comes from sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed:
> 
> s_^\(RTLDLIST=\)\(.*lib\)\(\|64\|x32\)\(/[^/]*\)\(-x86-64\|-x32\)\(\.so\.[0-
> 9.]*\)[     ]*$_\1"\2\4\6 \264\4-x86-64\6 \2x32\4-x32\6"_
> 
> I think changing the order will avoid the error because the x86-64 loader is
> tried first:
> 
> s_^\(RTLDLIST=\)\(.*lib\)\(\|64\|x32\)\(/[^/]*\)\(-x86-64\|-x32\)\(\.so\.[0-
> 9.]*\)[     ]*$_\264\4-x86-64\6 \1"\2\4\6 \2x32\4-x32\6"_

So I did this change to ldd:
```
--- ldd.old     2024-12-30 14:21:05.985472932 +0300
+++ ldd 2024-12-30 14:21:52.708741096 +0300
@@ -26,7 +26,7 @@
 TEXTDOMAIN=libc
 TEXTDOMAINDIR=/usr/share/locale

-RTLDLIST="/lib/ld-linux.so.2 /lib64/ld-linux-x86-64.so.2
/libx32/ld-linux-x32.so.2"
+RTLDLIST="/lib64/ld-linux-x86-64.so.2 /lib/ld-linux.so.2
/libx32/ld-linux-x32.so.2"
 warn=
 bind_now=
 verbose=
```

... and error disappeared.
Not sure if this is what you were saying,
but I think it is so (rearrange RTLDLIST).

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Glibc-bugs mailing list