]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/link: put text at address 0x1000000 on darwin/amd64
authorCherry Zhang <cherryyz@google.com>
Thu, 27 Oct 2016 18:33:58 +0000 (14:33 -0400)
committerCherry Zhang <cherryyz@google.com>
Fri, 28 Oct 2016 20:17:53 +0000 (20:17 +0000)
Apparently on macOS Sierra LLDB thinks /usr/lib/dyld is mapped
at address 0, even if Go code starts at 0x1000, and it looks up
addresses from dyld which shadows Go symbols. Move Go binary at
a higher address to avoid clash.

Fixes #17463. Re-enable TestLldbPython.

Change-Id: I89ca6f3ee48aa6da9862bfa0c2da91477cc93255
Reviewed-on: https://go-review.googlesource.com/32185
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Quentin Smith <quentin@golang.org>
src/cmd/link/internal/amd64/obj.go
src/runtime/runtime-lldb_test.go

index 1b1f4ac771aea12ba91698cfcc205f1cb1865b70..9646b6011502b47eb7b90d38ae7770f7a08dcb9b 100644 (file)
@@ -101,7 +101,7 @@ func archinit(ctxt *ld.Link) {
                        *ld.FlagRound = 4096
                }
                if *ld.FlagTextAddr == -1 {
-                       *ld.FlagTextAddr = 4096 + int64(ld.HEADR)
+                       *ld.FlagTextAddr = 0x1000000 + int64(ld.HEADR)
                }
                if *ld.FlagDataAddr == -1 {
                        *ld.FlagDataAddr = 0
index f222ace1e3da5f672591909e49f21db18402ffde..98bc906666298367ba5f79737b7692714ea3e24d 100644 (file)
@@ -139,7 +139,6 @@ intvar = 42
 `
 
 func TestLldbPython(t *testing.T) {
-       t.Skip("issue 17463")
        testenv.MustHaveGoBuild(t)
        if final := os.Getenv("GOROOT_FINAL"); final != "" && runtime.GOROOT() != final {
                t.Skip("gdb test can fail with GOROOT_FINAL pending")