Commit f29e53d6 authored by Than McIntosh's avatar Than McIntosh
Browse files

cmd/link: fix bug with -newobj and "ld -r" ELF host objects

When the ELF host object loader encounters a static/hidden symbol, it
creates a sym.Symbol for it but does not enter it into the sym.Symbols
lookup table. Under -newobj mode, this was not happening correctly; we
were adding the sym via loader.LookupOrCreate, which resulted in
collisions when it encountered symbols with the same name + version +
section (this can happen for "ld -r" objects).

Fixes #35779.

Change-Id: I36d40fc1efc03fc1cd8ae6b76cb6a0d2a957389c
Reviewed-on: https://go-review.googlesource.com/c/go/+/208479


Run-TryBot: Than McIntosh <thanm@google.com>
Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
parent 6ba1bf39
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment