]> Cypherpunks.ru repositories - gostls13.git/commit
[release-branch.go1.21] cmd/internal/obj/ppc64: don't modify runtime.elf_* symbols
authorPaul E. Murphy <murp@ibm.com>
Tue, 12 Mar 2024 20:00:08 +0000 (15:00 -0500)
committerThan McIntosh <thanm@google.com>
Tue, 26 Mar 2024 19:16:20 +0000 (19:16 +0000)
commit0bd1a2289d0e37ec5015ce3c05a5873c3a6da3e5
tree991119f62399c3e4ab5ae628bfe94312ac493bba
parent140b37d659ab7c12f9be655d31690dfa5ff7b3c0
[release-branch.go1.21] cmd/internal/obj/ppc64: don't modify runtime.elf_* symbols

The runtime.elf_* symbols are assembly functions which are used
to support the gcc/llvm -Os option when used with cgo.

When compiling Go for shared code, we attempt to strip out the
TOC regenation code added by the go assembler for these symbols.

This causes the symbol to no longer appear as an assembly
function which causes problems later on when handling other
implicit symbols.

Avoid adding a TOC regeneration prologue to these functions
to avoid this issue.

Fixes #66411

Change-Id: Icbf8e4438d177082a57bb228e39b232e7a0d7ada
Reviewed-on: https://go-review.googlesource.com/c/go/+/571835
Reviewed-by: Than McIntosh <thanm@google.com>
Run-TryBot: Paul Murphy <murp@ibm.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-on: https://go-review.googlesource.com/c/go/+/572876
src/cmd/go/testdata/script/test_ppc64_linker_funcs.txt
src/cmd/internal/obj/ppc64/obj9.go
src/cmd/link/internal/ppc64/asm.go