@@ -17,12 +17,12 @@ use warnings;
1717use Getopt::Long;
1818use File::Basename qw( basename) ;
1919
20- sub is_whitelisted ;
20+ sub is_allowlisted ;
2121
2222my $MAX_BRIEF = 10;
2323
2424my @orig_argv = @ARGV ;
25- my @sym_whitelist = ();
25+ my @sym_allowlist = ();
2626
2727sub usage {
2828 print STDERR <<EOT ;
@@ -62,22 +62,22 @@ if (0 != system("command -v nm >/dev/null 2>&1")) {
6262 exit 1;
6363}
6464
65- # load the common symbol whitelist from files scattered around the codebase
65+ # load the common symbol allowlist from files scattered around the codebase
6666#
6767# It would be better to load these into some sort of tree and then have those
68- # whitelists only apply to objects that are found in the same directory or
69- # subdirectories. That way a whitelisted symbol in one component doesn't
70- # "shadow" a symbol that should not be whitelisted in another component. If we
68+ # allowlists only apply to objects that are found in the same directory or
69+ # subdirectories. That way a allowlisted symbol in one component doesn't
70+ # "shadow" a symbol that should not be allowlisted in another component. If we
7171# find this is actually a problem in practice then we can write a v2 update.
72- my @wl_files = ` find '${top_srcdir} ' -name 'common_sym_whitelist .txt'` ;
72+ my @wl_files = ` find '${top_srcdir} ' -name 'common_sym_allowlist .txt'` ;
7373foreach my $wl_file (@wl_files ) {
7474 chomp $wl_file ;
7575 my @lines = ` cat $wl_file ` ;
7676 foreach my $line (@lines ) {
7777 chomp $line ;
7878 next if ($line =~ / ^\s *#/ ); # skip comments
7979 next if ($line =~ / ^\s *$ / ); # skip blank lines
80- push @sym_whitelist , $line ;
80+ push @sym_allowlist , $line ;
8181 }
8282}
8383
@@ -93,7 +93,7 @@ OBJECT: while (my $obj_line = <FIND>) {
9393 # at this point how common support for "nm -P" is.
9494 open (NM, ' -|' , " nm '${obj} ' 2>/dev/null | egrep '\\ s[cC]\\ s'" );
9595 SYMBOL: while (my $sym_line = <NM>) {
96- if (!$all and is_whitelisted ($sym_line )) {
96+ if (!$all and is_allowlisted ($sym_line )) {
9797 next SYMBOL;
9898 }
9999
@@ -124,10 +124,10 @@ if ($n > 0) {
124124 exit 0;
125125}
126126
127- sub is_whitelisted {
127+ sub is_allowlisted {
128128 my $line = shift ;
129129
130- foreach my $wl_sym (@sym_whitelist ) {
130+ foreach my $wl_sym (@sym_allowlist ) {
131131 if ($line =~ m /\b _?\Q $wl_sym \E\b / ) {
132132 return 1;
133133 }
0 commit comments