[[ -f $outfile ]] && echo "WARNING: File '${outfile}' exists, ignoring" && return
mkdir -p ${outfile%/*}
cp -aL $binary $outfile
- objdump -s -j .rodata -j .data $outfile | sed 's/^ *\([a-z0-9]*\)/\1:/' | \
- grep ': ' | grep -v 'file format' | grep -v 'Contents of section' | \
- xxd -g4 -r - $outfile.data
- if grep -q "%{HOST_ARCH}"$outfile.data; then
- echo "ERROR file $binary leaks host information into the guest"
- exit 1
- fi
- rm -f $outfile.data
[ "$binary" == "$rtld" ] && return
patchelf --set-rpath "%{emul_path}/%{_libdir}" $outfile
-# not all binaries have an .interp section
+ # not all binaries have an .interp section
if patchelf --print-interpreter $outfile 1>/dev/null 2>/dev/null; then
patchelf --set-interpreter %{emul_path}$rtld $outfile
fi
[[ -f $outfile ]] && echo "WARNING: File '${outfile}' exists, ignoring" && return
mkdir -p ${outfile%/*}
cp -aL $binary $outfile
- objdump -s -j .rodata -j .data $outfile | sed 's/^ *\([a-z0-9]*\)/\1:/' | \
- grep ': ' | grep -v 'file format' | grep -v 'Contents of section' | \
- xxd -g4 -r - $outfile.data
- if grep -q "%{HOST_ARCH}"$outfile.data; then
- echo "ERROR file $binary leaks host information into the guest"
- exit 1
- fi
- rm -f $outfile.data
[ "$binary" == "$rtld" ] && return
patchelf --set-rpath "%{emul_path}/%{_libdir}" $outfile
-# not all binaries have an .interp section
+ # not all binaries have an .interp section
if patchelf --print-interpreter $outfile 1>/dev/null 2>/dev/null; then
patchelf --set-interpreter %{emul_path}$rtld $outfile
fi
[[ -f $outfile ]] && echo "WARNING: File '${outfile}' exists, ignoring" && return
mkdir -p ${outfile%/*}
cp -aL $binary $outfile
- objdump -s -j .rodata -j .data $outfile | sed 's/^ *\([a-z0-9]*\)/\1:/' | \
- grep ': ' | grep -v 'file format' | grep -v 'Contents of section' | \
- xxd -g4 -r - $outfile.data
- if grep -q "%{HOST_ARCH}"$outfile.data; then
- echo "ERROR file $binary leaks host information into the guest"
- exit 1
- fi
- rm -f $outfile.data
[ "$binary" == "$rtld" ] && return
patchelf --set-rpath "%{emul_path}/%{_libdir}" $outfile
-# not all binaries have an .interp section
+ # not all binaries have an .interp section
if patchelf --print-interpreter $outfile 1>/dev/null 2>/dev/null; then
patchelf --set-interpreter %{emul_path}$rtld $outfile
fi
[[ -f $outfile ]] && echo "WARNING: File '${outfile}' exists, ignoring" && return
mkdir -p ${outfile%/*}
cp -aL $binary $outfile
- objdump -s -j .rodata -j .data $outfile | sed 's/^ *\([a-z0-9]*\)/\1:/' | \
- grep ': ' | grep -v 'file format' | grep -v 'Contents of section' | \
- xxd -g4 -r - $outfile.data
- if grep -q "%{HOST_ARCH}"$outfile.data; then
- echo "ERROR file $binary leaks host information into the guest"
- exit 1
- fi
- rm -f $outfile.data
[ "$binary" == "$rtld" ] && return
patchelf --set-rpath "%{emul_path}/%{_libdir}" $outfile
-# not all binaries have an .interp section
+ # not all binaries have an .interp section
if patchelf --print-interpreter $outfile 1>/dev/null 2>/dev/null; then
patchelf --set-interpreter %{emul_path}$rtld $outfile
fi