Skip to content

Commit c3b4c70

Browse files
committed
cmd/internal/objfile: don't require runtime.symtab symbol for XCOFF
For some reason (that I didn't look into), externally linked AIX binaries don't have runtime.symtab symbol. Since recent Go releases (Go 1.3 maybe?), that symbol is empty and not necessary anyway. Don't require it. Fixes #40972. Change-Id: I73a1f0142195ea6debdba8a4f6e12cadc3980dc5 Reviewed-on: https://go-review.googlesource.com/c/go/+/279995 Trust: Cherry Zhang <[email protected]> Reviewed-by: Than McIntosh <[email protected]>
1 parent 59bfc18 commit c3b4c70

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

src/cmd/internal/objfile/xcoff.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,7 @@ func (f *xcoffFile) pcln() (textStart uint64, symtab, pclntab []byte, err error)
9494
if pclntab, err = loadXCOFFTable(f.xcoff, "runtime.pclntab", "runtime.epclntab"); err != nil {
9595
return 0, nil, nil, err
9696
}
97-
if symtab, err = loadXCOFFTable(f.xcoff, "runtime.symtab", "runtime.esymtab"); err != nil {
98-
return 0, nil, nil, err
99-
}
97+
symtab, _ = loadXCOFFTable(f.xcoff, "runtime.symtab", "runtime.esymtab") // ignore error, this symbol is not useful anyway
10098
return textStart, symtab, pclntab, nil
10199
}
102100

src/cmd/objdump/objdump_test.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,6 @@ func testGoAndCgoDisasm(t *testing.T, printCode bool, printGnuAsm bool) {
237237
t.Parallel()
238238
testDisasm(t, "fmthello.go", printCode, printGnuAsm)
239239
if build.Default.CgoEnabled {
240-
if runtime.GOOS == "aix" {
241-
return // issue 40972
242-
}
243240
testDisasm(t, "fmthellocgo.go", printCode, printGnuAsm)
244241
}
245242
}
@@ -261,8 +258,6 @@ func TestDisasmExtld(t *testing.T) {
261258
switch runtime.GOOS {
262259
case "plan9", "windows":
263260
t.Skipf("skipping on %s", runtime.GOOS)
264-
case "aix":
265-
t.Skipf("skipping on AIX, see issue 40972")
266261
}
267262
t.Parallel()
268263
testDisasm(t, "fmthello.go", false, false, "-ldflags=-linkmode=external")

0 commit comments

Comments
 (0)