"runtime.noptrdata": "D",
}
+ if runtime.GOOS == "aix" && iscgo {
+ // pclntab is moved to .data section on AIX.
+ runtimeSyms["runtime.epclntab"] = "D"
+ }
+
out, err = exec.Command(testnmpath, exe).CombinedOutput()
if err != nil {
t.Fatalf("go tool nm: %v\n%s", err, string(out))
// On AIX, .data and .bss addresses are changed by the loader.
// Therefore, the values returned by the exec aren't the same
// than the ones inside the symbol table.
+ // In case of cgo, .text symbols are also changed.
switch code {
+ case "T", "t", "R", "r":
+ return iscgo
case "D", "d", "B", "b":
return true
}
if runtime.GOOS == "darwin" || (runtime.GOOS == "windows" && runtime.GOARCH == "386") {
syms = append(syms, symType{"D", "_cgodata", true, false})
syms = append(syms, symType{"T", "_cgofunc", true, false})
+ } else if runtime.GOOS == "aix" {
+ syms = append(syms, symType{"D", "cgodata", true, false})
+ syms = append(syms, symType{"T", ".cgofunc", true, false})
} else {
syms = append(syms, symType{"D", "cgodata", true, false})
syms = append(syms, symType{"T", "cgofunc", true, false})