summaryrefslogtreecommitdiffstats
path: root/patches/03_ldd-dont-call-lddlibc4.patch
blob: a22aa183e2204c97dc5d62ac359bd7aa34c5e391 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Author: "P. J. McDermott" <pj@pehjota.net>
Subject: ldd: Don't call lddlibc4

On i?86-linux-gnu systems, ldd is modified to call lddlibc4, an a.out
compatibility stub program derived from Linux libc.

We don't need ldd to handle a.out programs, so we won't make ldd call this stub
program.  Debian achieves the same effect by installing their amd64 ldd on i386.

diff -Naur src.orig/libc/sysdeps/unix/sysv/linux/ldd-rewrite.sed src/libc/sysdeps/unix/sysv/linux/ldd-rewrite.sed
--- src.orig/libc/sysdeps/unix/sysv/linux/ldd-rewrite.sed	2006-08-16 21:18:26.000000000 -0400
+++ src/libc/sysdeps/unix/sysv/linux/ldd-rewrite.sed	2014-02-17 20:41:08.096156938 -0500
@@ -1,11 +1,2 @@
-/Maybe extra code for non-ELF binaries/a\
-  file=$1\
-  # Run the ldd stub.\
-  lddlibc4 "$file"\
-  # Test the result.\
-  if test $? -lt 3; then\
-    return 0;\
-  fi\
-  # In case of an error punt.
 /LD_TRACE_LOADED_OBJECTS=1/a\
 add_env="$add_env LD_LIBRARY_VERSION=\\$verify_out"