aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2020-06-23 11:02:53 -0400
committerJesse Luehrs <doy@tozt.net>2020-06-23 11:02:53 -0400
commit4afcc51eaefa7f852d7eaf7e8588a6bd7096e909 (patch)
tree0cd614c580f6b0ad0864c7dabf684781a3acc682
parent88a159e5f7f6b6670b1ea6e7b2c4f0db0d9189fb (diff)
downloadrbw-4afcc51eaefa7f852d7eaf7e8588a6bd7096e909.tar.gz
rbw-4afcc51eaefa7f852d7eaf7e8588a6bd7096e909.zip
glibc fix script tweaks
-rwxr-xr-xbin/remove-glibc-2.29-use7
1 files changed, 3 insertions, 4 deletions
diff --git a/bin/remove-glibc-2.29-use b/bin/remove-glibc-2.29-use
index 06e5cd1..c23b7a6 100755
--- a/bin/remove-glibc-2.29-use
+++ b/bin/remove-glibc-2.29-use
@@ -11,8 +11,6 @@ no warnings 'experimental::signatures';
# corresponding version from GLIBC_2.2.5 does exist, so we can just swap it
# out.
-use constant VER_FLG_WEAK => 0x02;
-
my $bin = $ARGV[0];
system("readelf -s $bin | grep -q GLIBC_2.29");
@@ -41,12 +39,13 @@ my $glibc_225_offset = $gnu_version_r_offset + $readelf_v{'.gnu.version_r'}{'lib
# page), but that causes a warning to be printed every time you run the binary,
# which is obnoxious
+# use constant VER_FLG_WEAK => 0x02;
# my $prev_glibc_229_flags = substr $bin_contents, $glibc_229_offset + 0x04, 2, pack('s', VER_FLG_WEAK);
# if (unpack('s', $prev_glibc_229_flags) != 0) {
-# die "GLIBC_2.39 did not have flags set to 0\n";
+# die "GLIBC_2.29 did not have flags set to 0\n";
# }
-# instead, we overwrite vna_hash, vna_flags, vna_other, vna_name with the 2.3.5
+# instead, we overwrite vna_hash, vna_flags, vna_other, vna_name with the 2.2.5
# versions (but leave vna_next the same) - this causes there to be two entries
# describing GLIBC_2.2.5, but this appears to be harmless
substr($bin_contents, $glibc_229_offset + 0x00, 12, substr($bin_contents, $glibc_225_offset + 0x00, 12));