aboutsummaryrefslogtreecommitdiff
path: root/src/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd')
-rw-r--r--src/cmd/internal/objfile/macho.go3
-rw-r--r--src/cmd/pprof/pprof_test.go3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/cmd/internal/objfile/macho.go b/src/cmd/internal/objfile/macho.go
index 1d6963f7c4..c92497527a 100644
--- a/src/cmd/internal/objfile/macho.go
+++ b/src/cmd/internal/objfile/macho.go
@@ -128,6 +128,9 @@ func (x uint64s) Swap(i, j int) { x[i], x[j] = x[j], x[i] }
func (x uint64s) Less(i, j int) bool { return x[i] < x[j] }
func (f *machoFile) loadAddress() (uint64, error) {
+ if seg := f.macho.Segment("__TEXT"); seg != nil {
+ return seg.Addr, nil
+ }
return 0, fmt.Errorf("unknown load address")
}
diff --git a/src/cmd/pprof/pprof_test.go b/src/cmd/pprof/pprof_test.go
index 2a651dda5f..494cd8f24c 100644
--- a/src/cmd/pprof/pprof_test.go
+++ b/src/cmd/pprof/pprof_test.go
@@ -76,8 +76,7 @@ func mustHaveDisasm(t *testing.T) {
// pprof can only disassemble PIE on some platforms.
// Skip the ones it can't handle yet.
- if (runtime.GOOS == "darwin" && runtime.GOARCH == "arm64") ||
- (runtime.GOOS == "android" && runtime.GOARCH == "arm") {
+ if runtime.GOOS == "android" && runtime.GOARCH == "arm" {
t.Skipf("skipping on %s/%s, issue 46639", runtime.GOOS, runtime.GOARCH)
}
}