]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/link: sort the pclntab relocations
authorRuss Cox <rsc@golang.org>
Wed, 14 Apr 2021 16:30:36 +0000 (12:30 -0400)
committerRuss Cox <rsc@golang.org>
Fri, 23 Apr 2021 21:42:58 +0000 (21:42 +0000)
commit9f7079c44e670532df68ab78a1869cb99531c864
treeb74f95ef650be163aa8429f40395321c306381db
parentc0e1301b8c137d4b9f93067469b9608c252f2cea
cmd/link: sort the pclntab relocations

llvm-mingw's lld produces an invalid windows/arm64 executable
when presented with relocations that are out of order
(the relocation for each function is emitted for two different
locations, so we end up with two sorted streams roughly
interlaced, not one sorted stream).

Sorting should not break other systems, so sort always.

Change-Id: Ic9a95e7145881db5984cbda442f27b0cc24748fb
Reviewed-on: https://go-review.googlesource.com/c/go/+/312033
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/cmd/link/internal/ld/pcln.go