]> Cypherpunks repositories - gostls13.git/commit
[dev.link] cmd/link: remove holes from global index space
authorCherry Zhang <cherryyz@google.com>
Mon, 3 Feb 2020 17:37:35 +0000 (12:37 -0500)
committerCherry Zhang <cherryyz@google.com>
Wed, 5 Feb 2020 20:53:18 +0000 (20:53 +0000)
commit2f22143cd5a22b1faba9223115514432f145d15c
tree408b4618587d8d097337b80ae22e02071f694279
parent7cf907606d7e2c86abad6180a0467fb4a3797268
[dev.link] cmd/link: remove holes from global index space

In CL 217064, we made symbol's global index unique, but we still
reserve index space for each object file, which means we may
leave holes in the index space if the symbol is a dup or is
overwritten. In this CL, we stop reserving index spaces. Instead,
symbols are added one at a time, and only added if it does not
already exist. There is no more holes in the index space.

Change-Id: I3c4e67163c556ba1198e13065706510dac4692fb
Reviewed-on: https://go-review.googlesource.com/c/go/+/217519
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
src/cmd/link/internal/ld/deadcode2.go
src/cmd/link/internal/loader/loader.go
src/cmd/link/internal/loader/loader_test.go