mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/internal/goobj: add XCOFF support to TestParseCGOArchive
Change-Id: I9d14142977b4f2e8cb7ed33582249d0448bae023 Reviewed-on: https://go-review.googlesource.com/c/go/+/164016 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
b2453c0588
commit
faa7fa03b1
1 changed files with 19 additions and 0 deletions
|
|
@ -10,6 +10,7 @@ import (
|
|||
"debug/pe"
|
||||
"fmt"
|
||||
"internal/testenv"
|
||||
"internal/xcoff"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
|
|
@ -292,6 +293,24 @@ func TestParseCGOArchive(t *testing.T) {
|
|||
}
|
||||
}
|
||||
}
|
||||
case "aix":
|
||||
c1 = "." + c1
|
||||
c2 = "." + c2
|
||||
for _, obj := range p.Native {
|
||||
xf, err := xcoff.NewFile(obj)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
for _, s := range xf.Symbols {
|
||||
switch s.Name {
|
||||
case c1:
|
||||
found1 = true
|
||||
case c2:
|
||||
found2 = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
default:
|
||||
for _, obj := range p.Native {
|
||||
ef, err := elf.NewFile(obj)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue