]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.12] cmd/link: don't fail if multiple ELF sections have the same...
authorIan Lance Taylor <iant@golang.org>
Thu, 18 Apr 2019 05:41:51 +0000 (22:41 -0700)
committerIan Lance Taylor <iant@golang.org>
Thu, 18 Apr 2019 15:46:38 +0000 (15:46 +0000)
commit323ac9c7dabcd4f1fe5f5325b701d368d3e68d2a
tree73a7a44062ffa040441c2311f769ae1a4200d472
parent371a99d256096459f5026bd7f7633bb8de9172c6
[release-branch.go1.12] cmd/link: don't fail if multiple ELF sections have the same name

New versions of clang can generate multiple sections named ".text"
when using vague C++ linkage. This is valid ELF, but would cause the
Go linker to report an error when using internal linking:
    symbol PACKAGEPATH(.text) listed multiple times
Avoid the problem by renaming section symbol names if there is a name
collision.

Change-Id: I41127e95003d5b4554aaf849177b3fe000382c02
Reviewed-on: https://go-review.googlesource.com/c/go/+/172697
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
(cherry picked from commit 3235f7c0720338a160debe6e9c632b8af968b4dd)
Reviewed-on: https://go-review.googlesource.com/c/go/+/172701
src/cmd/link/elf_test.go [new file with mode: 0644]
src/cmd/link/internal/loadelf/ldelf.go