]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
x86-64: Reorder dynamic linker list in ldd script (bug 32508)
authorFlorian Weimer <fweimer@redhat.com>
Mon, 30 Dec 2024 11:41:51 +0000 (12:41 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Mon, 30 Dec 2024 12:24:36 +0000 (13:24 +0100)
Move the x86-64 loader first, before the i386 and x32 loaders.  In
most cases, it's the loader the script needs.  This avoids an error
message if the i386 loader does not work.

The effect of this change to the generated ldd script looks like this:

-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"

Reviewed-by: Sam James <sam@gentoo.org>
sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed

index 49c0c7a3a8635c78fc97a22de6d5d6dd7a0fbe97..ed5277e3cc74f62ce36d62c2141bac8afcf35b2e 100644 (file)
@@ -1 +1 @@
-s_^\(RTLDLIST=\)\(.*lib\)\(\|64\|x32\)\(/[^/]*\)\(-x86-64\|-x32\)\(\.so\.[0-9.]*\)[    ]*$_\1"\2\4\6 \264\4-x86-64\6 \2x32\4-x32\6"_
+s_^\(RTLDLIST=\)\(.*lib\)\(\|64\|x32\)\(/[^/]*\)\(-x86-64\|-x32\)\(\.so\.[0-9.]*\)[    ]*$_\1"\264\4-x86-64\6 \2\4\6 \2x32\4-x32\6"_