We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 38d5669 commit dc6fc15Copy full SHA for dc6fc15
glibc_run.sh
@@ -13,4 +13,12 @@ if [ ! -e "$VERSION/libc-$1.so" ]; then
13
echo "./build_glibc $1 <#make-threads"
14
fi
15
16
-LD_PRELOAD="$VERSION/libc-$1.so" "$VERSION/ld-$1.so" "$2"
+curr_interp=$(readelf -l "$2" | grep 'Requesting' | cut -d':' -f2 | tr -d ' ]')
17
+target_interp="$VERSION/ld-$1.so"
18
+
19
+if [[ $curr_interp != $target_interp ]];
20
+then
21
+ patchelf --set-interpreter "$target_interp" "$2"
22
+fi
23
24
+LD_PRELOAD="$VERSION/libc-$1.so" "$2"
0 commit comments