mirror of
https://github.com/golang/go.git
synced 2026-02-07 02:09:55 +00:00
cmd/link: adjust symkind comparisons in XCOFF code
This XCOFF symkind comparison broke when STYPE moved in CL 723580. These comparisons are unmaintainable, but at least the new code is no worse than the old code. Change-Id: I1be9de6afdf1814aaadcd2105e6247a4b66b46fe Reviewed-on: https://go-review.googlesource.com/c/go/+/740200 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Auto-Submit: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
baa6b1f2bf
commit
5593ea4634
1 changed files with 1 additions and 1 deletions
|
|
@ -952,7 +952,7 @@ func putaixsym(ctxt *Link, x loader.Sym, t SymbolType) {
|
|||
Xscnlenhi: uint32(size >> 32),
|
||||
}
|
||||
|
||||
if ty := ldr.SymType(x); ty >= sym.STYPE && ty <= sym.SPCLNTAB {
|
||||
if ty := ldr.SymType(x); ty >= sym.SSTRING && ty <= sym.STYPELINK {
|
||||
if ctxt.IsExternal() && strings.HasPrefix(ldr.SymSect(x).Name, ".data.rel.ro") {
|
||||
// During external linking, read-only datas with relocation
|
||||
// must be in .data.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue