X-Git-Url: https://ruderich.org/simon/gitweb/?p=blhc%2Fblhc.git;a=blobdiff_plain;f=bin%2Fblhc;h=d9a3bb252b330db2ba43a90a883670b8de4e4581;hp=c2a9d98f9b802494c49b9760f27f3afb6c476b29;hb=5a6704713eef81b462bea15707af8e941c355bc4;hpb=d791242047730d55a858f668702ea27fe3c77f77 diff --git a/bin/blhc b/bin/blhc index c2a9d98..d9a3bb2 100755 --- a/bin/blhc +++ b/bin/blhc @@ -24,7 +24,7 @@ use warnings; use Getopt::Long (); use Text::ParseWords (); -our $VERSION = '0.08'; +our $VERSION = '0.09'; # CONSTANTS/VARIABLES @@ -1073,7 +1073,9 @@ foreach my $file (@ARGV) { # treated as a normal compiler line. next if $line =~ m{^\s*rm\s+}; # Some build systems emit "gcc > file". - next if $line =~ m{$cc_regex_normal\s*>\s*\S+}; + next if $line =~ m{$cc_regex_normal\s*>\s*\S+}o; + # Hex output may contain "cc". + next if $line =~ m#(?:\b[0-9a-fA-F]{2,}\b\s*){5}#; # Check if additional hardening options were used. Used to ensure # they are used for the complete build. @@ -1115,7 +1117,7 @@ foreach my $file (@ARGV) { # Option or auto detected. if ($arch) { - # The following was partially copied from dpkg-dev 1.19.0.5 + # The following was partially copied from dpkg-dev 1.19.5 # (/usr/share/perl5/Dpkg/Vendor/Debian.pm, _add_build_flags()), # copyright Raphaël Hertzog , Guillem Jover # , Kees Cook , Canonical, Ltd. @@ -1132,8 +1134,24 @@ foreach my $file (@ARGV) { } my %builtin_pie_arch = map { $_ => 1 } qw( - amd64 arm64 armel armhf hurd-i386 i386 kfreebsd-amd64 kfreebsd-i386 - mips mipsel mips64el powerpc ppc64 ppc64el s390x sparc sparc64 + amd64 + arm64 + armel + armhf + hurd-i386 + i386 + kfreebsd-amd64 + kfreebsd-i386 + mips + mipsel + mips64el + powerpc + ppc64 + ppc64el + riscv64 + s390x + sparc + sparc64 ); # Disable unsupported hardening options.