From 8fea289244d8758c69b8c8443679b2d73cb2f70d Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Tue, 20 Mar 2018 19:24:42 +0100 Subject: erts: Remove our own NIF modules from "taints" Dynamic NIF libs and those added with config option --enable-static-nifs are considered as taints. --- erts/emulator/utils/make_driver_tab | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'erts/emulator/utils/make_driver_tab') 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"; -- cgit v1.2.3