From a4fb56a4374ac52a0b1c23e3654d4426c2e4adb3 Mon Sep 17 00:00:00 2001 From: Adam Langley Date: Fri, 6 Mar 2015 11:08:23 -0800 Subject: Include .extern and .hidden in x86-64 asm. This is backport of BoringSSL's d216b71f909fe56255813dab0a8d052534bdcb91 and https://boringssl-review.googlesource.com/3810 and should allow asm on x86-64 to build correctly. Change-Id: Id321768930182951223dbf90c4c910e24d9b6798 --- src/crypto/perlasm/x86_64-xlate.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/crypto/perlasm/x86_64-xlate.pl b/src/crypto/perlasm/x86_64-xlate.pl index ed545f2..8b46329 100755 --- a/src/crypto/perlasm/x86_64-xlate.pl +++ b/src/crypto/perlasm/x86_64-xlate.pl @@ -497,7 +497,11 @@ my %globals; $self->{value} = $dir . "\t" . $line; if ($dir =~ /\.extern/) { - $self->{value} = ""; # swallow extern + if ($flavour eq "elf") { + $self->{value} .= "\n.hidden $line"; + } else { + $self->{value} = ""; + } } elsif (!$elf && $dir =~ /\.type/) { $self->{value} = ""; $self->{value} = ".def\t" . ($globals{$1} or $1) . ";\t" . -- cgit v1.1