Change-Id: If04c24d5209cd241e300ce714efdd0e0dde61af2
Reviewed-on: https://go-review.googlesource.com/c/go/+/549456
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
        if got, want := int64(abi.TFlagOff(ptrSize)), Type.OffsetOf("TFlag"); got != want {
                base.Fatalf("abi.TFlagOff() == %d, want %d", got, want)
        }
+       if got, want := int64(abi.ITabTypeOff(ptrSize)), ITab.OffsetOf("Type"); got != want {
+               base.Fatalf("abi.ITabTypeOff() == %d, want %d", got, want)
+       }
 }
 
 // fromReflect translates from a host type to the equivalent target type.
 
 // decodeItabType returns the itab.Type field from an itab.
 func decodeItabType(ldr *loader.Loader, arch *sys.Arch, symIdx loader.Sym) loader.Sym {
        relocs := ldr.Relocs(symIdx)
-       return decodeRelocSym(ldr, symIdx, &relocs, int32(arch.PtrSize))
+       return decodeRelocSym(ldr, symIdx, &relocs, int32(abi.ITabTypeOff(arch.PtrSize)))
 }
 
 
 // TFlagOff returns the offset of Type.TFlag for a compilation target with a given ptrSize
 func TFlagOff(ptrSize int) int { return 2*ptrSize + 4 }
+
+// ITabTypeOff returns the offset of ITab.Type for a compilation target with a given ptrSize
+func ITabTypeOff(ptrSize int) int { return ptrSize }