]> Cypherpunks repositories - gostls13.git/commit
cmd/link: handle absolute address relocation in C objects for internal linking PIE
authorCherry Zhang <cherryyz@google.com>
Sun, 9 Feb 2020 22:00:27 +0000 (17:00 -0500)
committerCherry Zhang <cherryyz@google.com>
Fri, 21 Feb 2020 21:33:57 +0000 (21:33 +0000)
commitbaea3cd7c9e7ae27f7e5d44874a9afd249458df5
treea188af8949042e4e7cc9faf609e4bf6a110a83d3
parentbc5fc6d48ff4e8612c2f41d06e94578291b595d6
cmd/link: handle absolute address relocation in C objects for internal linking PIE

For an absolute address relocation in C objects (e.g.
R_X86_64_64), we turn it into an R_ADDR relocation and handle it
the same way. For internal linking PIE, this R_ADDR relocation
cannot be resolved statically. We need to generate a dynamic
relocation for it. This CL makes it so.

This fixes internal linking PIE on the dev.boringcrypto branch.
Test will be enabled in the next CL.

Change-Id: I9bdd6517ccd79cbbe9c64844a31536bf3da37616
Reviewed-on: https://go-review.googlesource.com/c/go/+/218837
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/link/internal/amd64/asm.go
src/cmd/link/internal/arm64/asm.go