Skip to content

Commit

Permalink
goversion: handle -buildmode=pie binaries
Browse files Browse the repository at this point in the history
Fixes rsc#5.
  • Loading branch information
rsc committed Apr 4, 2018
1 parent 38f6ce4 commit 597212e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions version/asm.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ var amd64Matcher = matcher{
0xb8, pWild | pAddr, pWild, pWild, pWild,
0xff, 0xe0,
},
{opMaybe | opAnchor,
// main:
// JMP runtime.rt0_go(SB)
0xe9, pWild | pAddr, pWild, pWild, pWild | pEnd, 0xcc, 0xcc, 0xcc,
},
{opMust | opAnchor,
// rt0_go:
// mov %rdi, %rax
Expand Down

0 comments on commit 597212e

Please sign in to comment.