Skip to content

Commit

Permalink
[dev.boringcrypto] crypto/internal/boring: remove .llvm_addrsig section
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
FiloSottile committed Feb 7, 2021
1 parent 325e03a commit 0d34d85
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/crypto/internal/boring/build.sh
Expand Up @@ -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!
Expand Down
Binary file modified src/crypto/internal/boring/goboringcrypto_linux_amd64.syso
Binary file not shown.

0 comments on commit 0d34d85

Please sign in to comment.