]> Cypherpunks repositories - gostls13.git/commit
[dev.link] cmd/internal/obj: make integer/float constant symbols content-addressable
authorCherry Zhang <cherryyz@google.com>
Sun, 12 Jul 2020 21:57:11 +0000 (17:57 -0400)
committerCherry Zhang <cherryyz@google.com>
Thu, 16 Jul 2020 18:44:36 +0000 (18:44 +0000)
commit3c54069907de8470b7ffa1cba8eae48e446feced
tree0547ff555df3e37885b8b2eed155960afa41b22b
parent17344d55d61b10f2145a95958ca2796846159dd0
[dev.link] cmd/internal/obj: make integer/float constant symbols content-addressable

Fill in the data at compile time, and get rid of the preprocess
function in the linker.

We need to be careful with symbol alignment: data symbols are
generally naturally aligned, except for string symbols which are
not aligned. When deduplicating two symbols with same content but
different alignments, we need to keep the biggest alignment.

Change-Id: I4bd96adfdc5f704b5bf3a0e723457c9bfe16a684
Reviewed-on: https://go-review.googlesource.com/c/go/+/242081
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
src/cmd/internal/obj/link.go
src/cmd/internal/obj/objfile2.go
src/cmd/internal/obj/sym.go
src/cmd/link/internal/loader/loader.go
src/cmd/link/internal/loader/loader_test.go