diff options
author | Richard Levitte <levitte@openssl.org> | 2016-01-12 01:07:46 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2016-01-12 04:44:24 +0100 |
commit | fd40db9ecd39302e4d5c6f4e3929a02d0b093d76 (patch) | |
tree | d49be22c353a170cc3f5b1b27f208c34d852b60c /util/mkdef.pl | |
parent | 6bd3e10b64c6815b233d75f15aa05cbd7c238c01 (diff) | |
download | openssl-fd40db9ecd39302e4d5c6f4e3929a02d0b093d76.tar.gz |
The limit per SYMBOL_VECTOR isn't the amount of symbols, it's the line length
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'util/mkdef.pl')
-rwxr-xr-x | util/mkdef.pl | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/util/mkdef.pl b/util/mkdef.pl index 6d5b00dfc0..da2dbd3e5b 100755 --- a/util/mkdef.pl +++ b/util/mkdef.pl @@ -1198,7 +1198,7 @@ sub print_def_file my $prevsymversion = "", $prevprevsymversion = ""; # For VMS my $prevnum = 0; - my $symbolcount = 0; + my $symvtextcount = 0; if ($W32) { $libname.="32"; } @@ -1240,6 +1240,7 @@ LIB$libname.OLB /LIBRARY $libref SYMBOL_VECTOR=(- EOF + $symvtextcount = 16; # length of "SYMBOL_VECTOR=(-" } (@r)=grep(/^\w+(\{[0-9]+\})?\\.*?:.*?:FUNCTION/,@symbols); @@ -1303,25 +1304,29 @@ EOF print OUT " $s2;\n"; } elsif ($VMS) { while(++$prevnum < $n) { - if ($symbolcount > 1023) { + my $symline="dummy$prevcount=PRIVATE_PROCEDURE -"; + if ($symvtextcount + length($symline) + 1 > 1024) { print OUT ")\nSYMBOL_VECTOR=(-\n"; - $symbolcount = 0; + $symvtextcount = 16; # length of "SYMBOL_VECTOR=(-" } - print OUT $symbolcount - ? " ," : " "; - print OUT "dummy$prevnum=PRIVATE_PROCEDURE -\n"; - $symbolcount++; + if ($symvtextcount > 16) { + $symline = ",".$symline; + } + print OUT " $symline\n"; + $symvtextcount += length($symline); } (my $s_uc = $s) =~ tr/a-z/A-Z/; - if ($symbolcount > 1023) { + my $symline="$s_uc/$s=" + , ($v ? "DATA" : "PROCEDURE"), " -\n"; + if ($symvtextcount + length($symline) + 1 > 1024) { print OUT ")\nSYMBOL_VECTOR=(-\n"; - $symbolcount = 0; + $symvtextcount = 16; # length of "SYMBOL_VECTOR=(-" } - print OUT $symbolcount - ? " ," : " "; - print OUT "$s_uc/$s=" - , ($v ? "DATA" : "PROCEDURE"), " -\n"; - $symbolcount++; + if ($symvtextcount > 16) { + $symline = ",".$symline; + } + print OUT " $symline\n"; + $symvtextcount += length($symline); } elsif($v && !$OS2) { printf OUT " %s%-39s @%-8d DATA\n", ($W32)?"":"_",$s2,$n; |