]> Cypherpunks repositories - gostls13.git/commit
[dev.link] cmd/link: refactor ExtReloc data structures
authorCherry Zhang <cherryyz@google.com>
Wed, 29 Jul 2020 01:35:53 +0000 (21:35 -0400)
committerCherry Zhang <cherryyz@google.com>
Thu, 30 Jul 2020 16:36:25 +0000 (16:36 +0000)
commit317c1ca9f2bc8b52807171020eb47e988699cf6a
treef4a1bcea4998bc0be4d70440a09313dfb61d970b
parent880f43c87f1ed20dbd021fc7cbd946b3f3a5b6e5
[dev.link] cmd/link: refactor ExtReloc data structures

We used to generate all external relocations in memory, then emit
the relocation records at a later pass. The data structures were
chosen so that it takes as little memory as possible. Now we just
stream out external relocations, and ExtReloc is just a local
variable. Change the data structure to avoid repeated read of
some fields. Also get rid of ExtRelocView, as it is no longer
necessary.

Change-Id: I40209bbe4387af231b29788125c3b4ebb0ff4a33
Reviewed-on: https://go-review.googlesource.com/c/go/+/245479
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
16 files changed:
src/cmd/link/internal/amd64/asm.go
src/cmd/link/internal/arm/asm.go
src/cmd/link/internal/arm64/asm.go
src/cmd/link/internal/ld/data.go
src/cmd/link/internal/ld/elf.go
src/cmd/link/internal/ld/lib.go
src/cmd/link/internal/ld/macho.go
src/cmd/link/internal/ld/pe.go
src/cmd/link/internal/ld/xcoff.go
src/cmd/link/internal/loader/loader.go
src/cmd/link/internal/mips/asm.go
src/cmd/link/internal/mips64/asm.go
src/cmd/link/internal/ppc64/asm.go
src/cmd/link/internal/riscv64/asm.go
src/cmd/link/internal/s390x/asm.go
src/cmd/link/internal/x86/asm.go