Make symbol-prefixing work on 32-bit x86. On Linux, this introduces yet another symbol to blacklist. Change-Id: Ieafe45a25f3b41da6c6934dd9488f4ee400bcab9 Reviewed-on: https://boringssl-review.googlesource.com/c/33350 Commit-Queue: David Benjamin <davidben@google.com> Reviewed-by: Adam Langley <agl@google.com>
diff --git a/crypto/perlasm/x86asm.pl b/crypto/perlasm/x86asm.pl index c9f645e..3d2943b 100644 --- a/crypto/perlasm/x86asm.pl +++ b/crypto/perlasm/x86asm.pl
@@ -262,7 +262,20 @@ $comment source tree. Do not edit by hand. ___ - print "#if defined(__i386__)\n" unless ($win32 || $netware); + if ($win32 || $netware) { + print <<___ unless $masm; +%ifdef BORINGSSL_PREFIX +%include "boringssl_prefix_symbols_nasm.inc" +%endif +___ + } else { + print <<___; +#if defined(__i386__) +#if defined(BORINGSSL_PREFIX) +#include <boringssl_prefix_symbols_asm.h> +#endif +___ + } print @out; print "#endif\n" unless ($win32 || $netware); } @@ -288,7 +301,7 @@ #elsif (($type eq "nw-mwasm")) #{ $netware=1; $mwerks=1; require "x86nasm.pl"; } elsif (($type eq "win32")) - { $win32=1; require "x86masm.pl"; } + { $win32=1; $masm=1; require "x86masm.pl"; } elsif (($type eq "macosx")) { $aout=1; $macosx=1; require "x86gas.pl"; } elsif (($type eq "android"))
diff --git a/util/read_symbols.go b/util/read_symbols.go index d6d5a9a..791ea5d 100644 --- a/util/read_symbols.go +++ b/util/read_symbols.go
@@ -140,7 +140,7 @@ break } } - if skip || isCXXSymbol(s) || strings.HasPrefix(s, "__real@") { + if skip || isCXXSymbol(s) || strings.HasPrefix(s, "__real@") || strings.HasPrefix(s, "__x86.get_pc_thunk.") { continue } if _, err := fmt.Fprintln(out, s); err != nil {