}
if exe == nil {
- fmt.Fprintf(os.Stderr, "could not open %s", exePath)
+ fmt.Fprintf(os.Stderr, "could not open %s\n", exePath)
os.Exit(1)
}
data, err := exe.DWARF()
if err != nil {
- fmt.Fprintf(os.Stderr, "error opening DWARF: %v", err)
+ fmt.Fprintf(os.Stderr, "%s: error opening DWARF: %v\n", exePath, err)
os.Exit(1)
}
for {
e, err := rdr.Next()
if err != nil {
- fmt.Fprintf(os.Stderr, "error reading DWARF: %v", err)
+ fmt.Fprintf(os.Stderr, "%s: error reading DWARF: %v\n", exePath, err)
os.Exit(1)
}
if e == nil {
}
}
- fmt.Fprintf(os.Stderr, "no entry with a name ending in %q was found", dieSuffix)
+ fmt.Fprintf(os.Stderr, "%s: no entry with a name ending in %q was found\n", exePath, dieSuffix)
os.Exit(1)
}
GOPATH=$(pwd) go build -gcflags "$GO_GCFLAGS" host
# test that DWARF sections are emitted for plugins and programs importing "plugin"
-go run src/checkdwarf/main.go plugin2.so plugin2.UnexportedNameReuse
+if [ $GOOS != "darwin" ]; then
+ # On macOS, for some reason, the linker doesn't add debug sections to .so,
+ # see issue #27502.
+ go run src/checkdwarf/main.go plugin2.so plugin2.UnexportedNameReuse
+fi
go run src/checkdwarf/main.go host main.main
LD_LIBRARY_PATH=$(pwd) ./host