aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/ldd-rewrite.sed
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/ldd-rewrite.sed')
-rw-r--r--sysdeps/unix/sysv/linux/ldd-rewrite.sed11
1 files changed, 11 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/ldd-rewrite.sed b/sysdeps/unix/sysv/linux/ldd-rewrite.sed
new file mode 100644
index 0000000000..efc1b57540
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/ldd-rewrite.sed
@@ -0,0 +1,11 @@
+/Maybe extra code for non-ELF binaries/a\
+ file=$1\
+ # Run the ldd stub.\
+ lddlibc4 $file\
+ # Test the result.\
+ if test $? -lt 3; then\
+ exit 0;\
+ fi\
+ # In case of an error punt.
+/LD_TRACE_LOADED_OBJECTS=1/a\
+add_env="$add_env LD_LIBRARY_VERSION=\\$verify_out"