diff options
author | Sverker Eriksson <[email protected]> | 2018-03-20 19:24:42 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2018-03-20 19:24:42 +0100 |
commit | 8fea289244d8758c69b8c8443679b2d73cb2f70d (patch) | |
tree | 4bd2e84dea4678e2cc7094ec20bf2d7c742bbd49 /erts/emulator/utils/make_driver_tab | |
parent | 5b557bccac579291301a7a4d78a3d992b4e9373d (diff) | |
download | otp-8fea289244d8758c69b8c8443679b2d73cb2f70d.tar.gz otp-8fea289244d8758c69b8c8443679b2d73cb2f70d.tar.bz2 otp-8fea289244d8758c69b8c8443679b2d73cb2f70d.zip |
erts: Remove our own NIF modules from "taints"
Dynamic NIF libs and those added with config option
--enable-static-nifs are considered as taints.
Diffstat (limited to 'erts/emulator/utils/make_driver_tab')
-rwxr-xr-x | erts/emulator/utils/make_driver_tab | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/erts/emulator/utils/make_driver_tab b/erts/emulator/utils/make_driver_tab index 6f28a21f81..cefb3e2504 100755 --- a/erts/emulator/utils/make_driver_tab +++ b/erts/emulator/utils/make_driver_tab @@ -30,6 +30,7 @@ use File::Basename; my $file = ""; my $nif = ""; my @emu_drivers = (); +my @emu_nifs = (); my @static_drivers = (); my @static_nifs = (); my $mode = 1; @@ -61,7 +62,7 @@ while (@ARGV) { } elsif ($mode == 2) { $d = basename $d; $d =~ s/_nif(\..*|)$//; # strip nif.* or just nif - push(@static_nifs, $d); + push(@emu_nifs, $d); next; } $d = basename $d; @@ -116,6 +117,11 @@ foreach (@static_drivers) { print "}\n"; # prototypes +foreach (@emu_nifs) { + my $d = ${_}; + $d =~ s/\.debug//; # strip .debug + print "void *".$d."_nif_init(void);\n"; +} foreach (@static_nifs) { my $d = ${_}; $d =~ s/\.debug//; # strip .debug @@ -125,10 +131,15 @@ foreach (@static_nifs) { # The array itself print "static ErtsStaticNifEntry static_nif_tab[] =\n{\n"; +foreach (@emu_nifs) { + my $d = ${_}; + $d =~ s/\.debug//; # strip .debug + print " {\"${_}\", &".$d."_nif_init, 0},\n"; +} foreach (@static_nifs) { my $d = ${_}; $d =~ s/\.debug//; # strip .debug - print " {\"${_}\",&".$d."_nif_init},\n"; + print " {\"${_}\", &".$d."_nif_init, 1},\n"; } print " {NULL,NULL}\n};\n"; |