aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/dwarfgen
diff options
context:
space:
mode:
authorMatthew Dempsky <mdempsky@google.com>2021-01-17 02:38:41 -0800
committerMatthew Dempsky <mdempsky@google.com>2021-01-19 02:41:42 +0000
commit4a4212c0e59dee4458be2f5c85262e54f127c500 (patch)
tree77ec7dd6539ebd89c751fbcc8278812b9e1922e1 /src/cmd/compile/internal/dwarfgen
parent4f5c603c0f4375d7612feedfd4d5bef41a4060ee (diff)
downloadgo-4a4212c0e59dee4458be2f5c85262e54f127c500.tar.gz
go-4a4212c0e59dee4458be2f5c85262e54f127c500.zip
[dev.regabi] cmd/compile: refactor Linksym creation
Currently there's a lot of logic within package types for creating Linksyms. This CL pulls it out into base, where it can be more easily reused by other compiler code that shouldn't need to depend on package types. Package base probably isn't the best place for this, but it's convenient because it's a package that types already depends on. It's also where the Ctxt object lives, which these functions depend upon. Passes toolstash -cmp w/ -gcflags=all=-abiwrap. Change-Id: I50d8b7e4596955205036969eab24d7dab053b363 Reviewed-on: https://go-review.googlesource.com/c/go/+/284231 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com> Trust: Matthew Dempsky <mdempsky@google.com>
Diffstat (limited to 'src/cmd/compile/internal/dwarfgen')
-rw-r--r--src/cmd/compile/internal/dwarfgen/dwarf.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/dwarfgen/dwarf.go b/src/cmd/compile/internal/dwarfgen/dwarf.go
index 2440e3c8d3..bf039c8fbb 100644
--- a/src/cmd/compile/internal/dwarfgen/dwarf.go
+++ b/src/cmd/compile/internal/dwarfgen/dwarf.go
@@ -28,7 +28,7 @@ func Info(fnsym *obj.LSym, infosym *obj.LSym, curfn interface{}) ([]dwarf.Scope,
if fn.Nname != nil {
expect := fn.Linksym()
if fnsym.ABI() == obj.ABI0 {
- expect = fn.Sym().LinksymABI0()
+ expect = fn.LinksymABI(obj.ABI0)
}
if fnsym != expect {
base.Fatalf("unexpected fnsym: %v != %v", fnsym, expect)