X-Git-Url: https://ruderich.org/simon/gitweb/?p=blhc%2Fblhc.git;a=blobdiff_plain;f=bin%2Fblhc;h=d9a3bb252b330db2ba43a90a883670b8de4e4581;hp=193297e4b7fdba4ffb6095074b4c3cea0774e055;hb=5a6704713eef81b462bea15707af8e941c355bc4;hpb=c00a6af3163584d9bbe5f0742f9ed001c202e564 diff --git a/bin/blhc b/bin/blhc index 193297e..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 @@ -1074,6 +1074,8 @@ foreach my $file (@ARGV) { next if $line =~ m{^\s*rm\s+}; # Some build systems emit "gcc > file". 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.