1
0
mirror of https://github.com/golang/go synced 2024-09-28 22:14:28 -06:00

[dev.boringcrypto] crypto/internal/boring: remove .llvm_addrsig section

The section doesn't survive some of the mangling of the object file we
do while building it, and ld.lld --icf=safe throws a warning on it.

Could have changed the clang invocation to add -fno-addrsig, but this
change is safer in that it doesn't affect the FIPS module build.

Change-Id: I65e097a48857f90aaa641dceb47120350ba8c073
Reviewed-on: https://go-review.googlesource.com/c/go/+/290170
Trust: Filippo Valsorda <filippo@golang.org>
Run-TryBot: Filippo Valsorda <filippo@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Filippo Valsorda 2021-02-06 01:00:58 +01:00
parent 325e03a64f
commit 0d34d85dee
2 changed files with 2 additions and 1 deletions

View File

@ -187,7 +187,8 @@ clang -c -o umod.o umod.s
ld -r -nostdlib --whole-archive -o goboringcrypto.o libcrypto.a umod.o
echo __umodti3 _goboringcrypto___umodti3 >>renames.txt
objcopy --redefine-syms=renames.txt goboringcrypto.o goboringcrypto2.o
objcopy --remove-section=.llvm_addrsig goboringcrypto.o goboringcrypto1.o # b/179161016
objcopy --redefine-syms=renames.txt goboringcrypto1.o goboringcrypto2.o
objcopy --keep-global-symbols=globals.txt goboringcrypto2.o goboringcrypto_linux_amd64.syso
# Done!