]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/obj/x86: On amd64, relocation type for and indirect call is pc-relative.
authorWedson Almeida Filho <wedsonaf@google.com>
Mon, 2 May 2016 23:28:23 +0000 (00:28 +0100)
committerDavid Chase <drchase@google.com>
Sun, 9 Oct 2016 19:50:09 +0000 (19:50 +0000)
commit13c829e5f6c541359c7bb213774ef9bbba9ddb77
tree41fb3240d603c6cf799510a449ad50791bf003f7
parentd5a8b9f57157e64b894ef9a1f48418f45ff7984c
cmd/internal/obj/x86: On amd64, relocation type for and indirect call is pc-relative.

With this change, the code in bug #15609 compiles and runs properly:

0000000000401070 <main.jump>:
  401070: ff 15 aa 7e 06 00     callq  *0x67eaa(%rip)        # 468f20 <main.pointer>
  401076: c3                    retq

0000000000468f20 g     O .rodata 0000000000000008 main.pointer

Fixes #15609

Change-Id: Iebb4d5a9f9fff335b693f4efcc97882fe04eefd7
Reviewed-on: https://go-review.googlesource.com/22950
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
src/cmd/internal/obj/x86/asm6.go
test/fixedbugs/issue15609.dir/call.go [new file with mode: 0644]
test/fixedbugs/issue15609.dir/call_386.s [new file with mode: 0644]
test/fixedbugs/issue15609.dir/call_amd64.s [new file with mode: 0644]
test/fixedbugs/issue15609.dir/call_decl.go [new file with mode: 0644]
test/fixedbugs/issue15609.dir/main.go [new file with mode: 0644]