Skip to content

Commit 5c7d774

Browse files
committed
cmd/link: propagate FromAssembly attribute when cloning symbols to external
When a symbol is cloned to external (in order to edit it), propagate the FromAssembly attribute, so the linker knows it is (originally) an assembly symbol, and can treat it specially (e.g. for stack maps). This should fix the Linux/RISCV64 builder. Change-Id: Icc956bcc43b79f328983a60835b05fd50f22326a Reviewed-on: https://go-review.googlesource.com/c/go/+/587926 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Than McIntosh <[email protected]>
1 parent 23778fc commit 5c7d774

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/cmd/link/internal/loader/loader.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -763,6 +763,11 @@ func (l *Loader) IsFileLocal(i Sym) bool {
763763
// object file generated by the Go assembler.
764764
func (l *Loader) IsFromAssembly(i Sym) bool {
765765
if l.IsExternal(i) {
766+
pp := l.getPayload(i)
767+
if pp.objidx != 0 {
768+
r := l.objs[pp.objidx]
769+
return r.FromAssembly()
770+
}
766771
return false
767772
}
768773
r, _ := l.toLocal(i)

0 commit comments

Comments
 (0)