From 9a08cbfcc1ef900a04580f35afe2a4592d7d6030 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 6 May 2024 02:45:20 +0200 Subject: Adding upstream version 1.19.8. Signed-off-by: Daniel Baumann --- scripts/t/Dpkg_Shlibs/spacesyms-o-map.pl | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 scripts/t/Dpkg_Shlibs/spacesyms-o-map.pl (limited to 'scripts/t/Dpkg_Shlibs/spacesyms-o-map.pl') diff --git a/scripts/t/Dpkg_Shlibs/spacesyms-o-map.pl b/scripts/t/Dpkg_Shlibs/spacesyms-o-map.pl new file mode 100755 index 0000000..89a1caf --- /dev/null +++ b/scripts/t/Dpkg_Shlibs/spacesyms-o-map.pl @@ -0,0 +1,25 @@ +#!/usr/bin/perl +# +# spacesyms-o-map.pl INPUT OUTPUT +# +# Copy the object file INPUT to OUTPUT, redefining any symbol in INPUT that +# contains "SPACE" in its name to contain "SPA CE" instead. + +use strict; +use warnings; + +my ($input, $output) = @ARGV; +my @cmds = ('objcopy'); + +open my $nm, '-|', 'nm', $input or die "cannot run nm: $!"; +while (<$nm>) { + next if not m/SPACE/; + chomp; + my $x = (split / /, $_, 3)[2]; + my $y = $x =~ s/SPACE/SPA CE/r; + push @cmds, "--redefine-sym=$x=$y"; +} +close $nm; + +push @cmds, $input, $output; +exec @cmds; -- cgit v1.2.3