• Cherry Zhang's avatar
    cmd/link: apply relocations later · f957a7e3
    Cherry Zhang authored
    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: default avatarAustin Clements <austin@google.com>
    f957a7e3
outbuf.go 4.08 KB