@@ -17,12 +17,12 @@ use warnings;
17
17
use Getopt::Long;
18
18
use File::Basename qw( basename) ;
19
19
20
- sub is_whitelisted ;
20
+ sub is_allowlisted ;
21
21
22
22
my $MAX_BRIEF = 10;
23
23
24
24
my @orig_argv = @ARGV ;
25
- my @sym_whitelist = ();
25
+ my @sym_allowlist = ();
26
26
27
27
sub usage {
28
28
print STDERR <<EOT ;
@@ -62,22 +62,22 @@ if (0 != system("command -v nm >/dev/null 2>&1")) {
62
62
exit 1;
63
63
}
64
64
65
- # load the common symbol whitelist from files scattered around the codebase
65
+ # load the common symbol allowlist from files scattered around the codebase
66
66
#
67
67
# 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
71
71
# 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'` ;
73
73
foreach my $wl_file (@wl_files ) {
74
74
chomp $wl_file ;
75
75
my @lines = ` cat $wl_file ` ;
76
76
foreach my $line (@lines ) {
77
77
chomp $line ;
78
78
next if ($line =~ / ^\s *#/ ); # skip comments
79
79
next if ($line =~ / ^\s *$ / ); # skip blank lines
80
- push @sym_whitelist , $line ;
80
+ push @sym_allowlist , $line ;
81
81
}
82
82
}
83
83
@@ -93,7 +93,7 @@ OBJECT: while (my $obj_line = <FIND>) {
93
93
# at this point how common support for "nm -P" is.
94
94
open (NM, ' -|' , " nm '${obj} ' 2>/dev/null | egrep '\\ s[cC]\\ s'" );
95
95
SYMBOL: while (my $sym_line = <NM>) {
96
- if (!$all and is_whitelisted ($sym_line )) {
96
+ if (!$all and is_allowlisted ($sym_line )) {
97
97
next SYMBOL;
98
98
}
99
99
@@ -124,10 +124,10 @@ if ($n > 0) {
124
124
exit 0;
125
125
}
126
126
127
- sub is_whitelisted {
127
+ sub is_allowlisted {
128
128
my $line = shift ;
129
129
130
- foreach my $wl_sym (@sym_whitelist ) {
130
+ foreach my $wl_sym (@sym_allowlist ) {
131
131
if ($line =~ m /\b _?\Q $wl_sym \E\b / ) {
132
132
return 1;
133
133
}
0 commit comments