Skip to content

Commit

Permalink
cmd/link: mangle function name with ABI on XCOFF
Browse files Browse the repository at this point in the history
This is like CL 304432 and CL 307229, for XCOFF.

With this, GOEXPERIMENT=regabi works on AIX/PPC64.

Change-Id: I8cf00681df5c93f397913febd78f38099d91e7c8
Reviewed-on: https://go-review.googlesource.com/c/go/+/353972
Trust: Cherry Mui <[email protected]>
Run-TryBot: Cherry Mui <[email protected]>
TryBot-Result: Go Bot <[email protected]>
Reviewed-by: Than McIntosh <[email protected]>
  • Loading branch information
cherrymui committed Oct 5, 2021
1 parent 017ffcd commit f1f626d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/cmd/link/internal/ld/xcoff.go
Original file line number Diff line number Diff line change
Expand Up @@ -822,9 +822,12 @@ func (f *xcoffFile) writeSymbolFunc(ctxt *Link, x loader.Sym) []xcoffSym {
}
}

name = ldr.SymExtname(x)
name = mangleABIName(ctxt, ldr, x, name)

s := &XcoffSymEnt64{
Nsclass: C_EXT,
Noffset: uint32(xfile.stringTable.add(ldr.SymExtname(x))),
Noffset: uint32(xfile.stringTable.add(name)),
Nvalue: uint64(ldr.SymValue(x)),
Nscnum: f.getXCOFFscnum(ldr.SymSect(x)),
Ntype: SYM_TYPE_FUNC,
Expand Down

0 comments on commit f1f626d

Please sign in to comment.