]> Cypherpunks.ru repositories - gostls13.git/commit
[dev.regabi] cmd/link: resolve symbol ABI in shared linkage
authorCherry Zhang <cherryyz@google.com>
Wed, 3 Feb 2021 20:07:33 +0000 (15:07 -0500)
committerCherry Zhang <cherryyz@google.com>
Mon, 8 Feb 2021 15:50:35 +0000 (15:50 +0000)
commita21de9ec73b8a433cafd336448dc8111a4e4571e
tree67a9542a53493dd2752fd8d110318792c4a4fe14
parent8fa84772ba035b74975572fbc9df0330523cc388
[dev.regabi] cmd/link: resolve symbol ABI in shared linkage

In shared build mode and linkage, currently we assume all
function symbols are ABI0 (except for generated type algorithm
functions), and alias them to ABIInternal. When the two ABIs
actually differ (as it is now), this is not actually correct.
This CL resolves symbol ABI based on their mangled names.
If the symbol's name has a ".abi0" or ".abiinternal" suffix, it
is of the corresponding ABI. The symbol without the suffix is
the other ABI. For functions without ABI wrapper generated,
only one ABI exists but we don't know what it is, so we still
use alias (for now).

Change-Id: I2165f149bc83d513e81eb1eb4ee95464335b0e75
Reviewed-on: https://go-review.googlesource.com/c/go/+/289289
Trust: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
src/cmd/link/internal/ld/lib.go