]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/internal/goobj: add XCOFF support to TestParseCGOArchive
authorClément Chigot <clement.chigot@atos.net>
Thu, 21 Feb 2019 09:49:22 +0000 (10:49 +0100)
committerIan Lance Taylor <iant@golang.org>
Tue, 19 Mar 2019 14:18:08 +0000 (14:18 +0000)
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>
src/cmd/internal/goobj/goobj_test.go

index 840b45c90885e97e5685835d665b004d31ed54f6..4a4d35a413a533ede04d77cd877908865e8ecc36 100644 (file)
@@ -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)