fix(goobj): external package and symbol indices and arm64 pair relocations
Assisted-by: GLM 5.3
This commit is contained in:
@@ -56,8 +56,12 @@ func TestResolveExternalSymbols(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatalf("resolveExternalGOOBJ: %v", err)
|
||||
}
|
||||
if len(pkgIdx) != 1 || pkgIdx["runtime"] != 0 {
|
||||
t.Errorf("pkgIdx = %v, want runtime→0", pkgIdx)
|
||||
if len(pkgIdx) != 1 || pkgIdx["runtime"] != 1 {
|
||||
// Index 0 is the dummy invalid package in the blkPkgIdx table;
|
||||
// the loader's reader loop starts at 1 (cmd/link/internal/
|
||||
// loader/loader.go: "PkgIdx 0 is a dummy invalid package"), so
|
||||
// the first real package must carry index 1.
|
||||
t.Errorf("pkgIdx = %v, want runtime→1", pkgIdx)
|
||||
}
|
||||
if _, ok := symIdx["runtime·g0"]; !ok {
|
||||
t.Errorf("symIdx missing runtime·g0, got %v", symIdx)
|
||||
|
||||
Reference in New Issue
Block a user