]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/obj: don't dedup symbols in WriteObjFile
authorAustin Clements <austin@google.com>
Mon, 29 Oct 2018 22:27:51 +0000 (18:27 -0400)
committerAustin Clements <austin@google.com>
Sat, 3 Nov 2018 15:12:58 +0000 (15:12 +0000)
commitc0281afd870f15f117ad1bcb2c46a3a3c3fffb0b
treee05161cf2021014f8612b5db77d4bc274af1e94d
parent15265ec4217f8d9497d8d5079ac8996302dfd007
cmd/internal/obj: don't dedup symbols in WriteObjFile

Currently, WriteObjFile deduplicates symbols by name. This is a
strange and unexpected place to do this. But, worse, there's no
checking that it's reasonable to deduplicate two symbols, so this
makes it incredibly easy to mask errors involving duplicate symbols.
Dealing with duplicate symbols is better left to the linker. We're
also about to introduce multiple symbols with the same name but
different ABIs/versions, which would make this deduplication more
complicated. We just removed the only part of the compiler that
actually depended on this behavior.

This CL removes symbol deduplication from WriteObjFile, since it is no
longer needed.

For #27539.

Change-Id: I650c550e46e83f95c67cb6c6646f9b2f7f10df30
Reviewed-on: https://go-review.googlesource.com/c/146558
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/cmd/compile/internal/gc/obj.go
src/cmd/internal/obj/objfile.go