]> Cypherpunks repositories - gostls13.git/commit
cmd/link: apply relocations later
authorCherry Zhang <cherryyz@google.com>
Thu, 4 Apr 2019 03:35:44 +0000 (23:35 -0400)
committerCherry Zhang <cherryyz@google.com>
Fri, 19 Apr 2019 18:25:33 +0000 (18:25 +0000)
commitf957a7e3572435c7d7031df8c58f63ebb633ecf7
tree372191817728e4eae706ab45290c64b0bf94d60c
parent248444d5eb91a26fa0b050172b22fc2cf7c72936
cmd/link: apply relocations later

Move the phase of applying relocations later, after the sections
and segments are written to the mmap'd output region. Then apply
relocations directly in the output region, instead of the input.
So the input slices we read in don't need to be modified.

This is in preparation for mmap'ing input files read-only.

Change-Id: If9c80657b4469da36aec5a9ab6acf664f5af8fa0
Reviewed-on: https://go-review.googlesource.com/c/go/+/170739
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
src/cmd/link/internal/ld/data.go
src/cmd/link/internal/ld/main.go
src/cmd/link/internal/ld/outbuf.go