mirror of
https://github.com/libretro/libretro-super
synced 2024-12-26 18:26:06 +00:00
2f96177c33
Line 6: start=$(readelf -V $1 | grep -A1 .gnu.version_r | tail -n1 | cut -d' ' -f6) ^-- SC2086: Double quote to prevent globbing and word splitting. Line 7: pos=$(readelf -V $1 | grep 'Flags: none' | cut -d' ' -f3 | sed 's/://') ^-- SC2086: Double quote to prevent globbing and word splitting. Line 9: printf '\x02' | dd if=/dev/stdin of=$1 seek=$(($start+$pos+4)) count=1 bs=1 conv=notrunc 2> /dev/null ^-- SC2086: Double quote to prevent globbing and word splitting. ^-- SC2004: $/${} is unnecessary on arithmetic variables. ^-- SC2004: $/${} is unnecessary on arithmetic variables.
11 lines
488 B
Bash
Executable File
11 lines
488 B
Bash
Executable File
#!/bin/bash
|
|
#RetroLink - Allows a library or executable to link to any symbols, without version restrictions
|
|
#Usage: ./retrolink foobar_libretro.so
|
|
#http://www.lightofdawn.org/wiki/wiki.cgi/NewAppsOnOldGlibc
|
|
|
|
start=$(readelf -V "$1" | grep -A1 .gnu.version_r | tail -n1 | cut -d' ' -f6)
|
|
pos=$(readelf -V "$1" | grep 'Flags: none' | cut -d' ' -f3 | sed 's/://')
|
|
for pos in $pos; do
|
|
printf '\x02' | dd if=/dev/stdin of="$1" seek=$((start+pos+4)) count=1 bs=1 conv=notrunc 2> /dev/null
|
|
done
|