]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/link: add DT_NEEDED for all 64-bit ELF dynimplib
authorByoungchan Lee <daniel.l@hpcnt.com>
Thu, 25 Nov 2021 11:40:21 +0000 (20:40 +0900)
committerThan McIntosh <thanm@google.com>
Tue, 22 Mar 2022 10:00:16 +0000 (10:00 +0000)
Also change the relevant test to be tested on the linux-arm64 platform
as well.

Fixes #49789

Change-Id: Id2eac7a45279f037957442862f8ed63838b8e929
Reviewed-on: https://go-review.googlesource.com/c/go/+/366855
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Trust: Than McIntosh <thanm@google.com>
Run-TryBot: Than McIntosh <thanm@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

AUTHORS
CONTRIBUTORS
src/cmd/link/internal/ld/elf.go
src/cmd/link/internal/ld/elf_test.go

diff --git a/AUTHORS b/AUTHORS
index bffd52275d716d6a8e546fd5ec4846748f3c76ce..383524389689351c10f6fd58f531ea50bdb90ade 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -570,6 +570,7 @@ Hootsuite Inc.
 Hsin-Ho Yeh <yhh92u@gmail.com>
 Hu Keping <hukeping@huawei.com>
 Hugues Bruant <hugues.bruant@gmail.com>
+HyperConnect Inc.
 Ian Gudger <ian@loosescre.ws>
 Ian Kent <iankent85@gmail.com>
 IBM
index e6ac7bda21d54b1c287d92d30d5c5811c6d93886..7c0531cd6fd019d8e2839d984b146e8d75f8e366 100644 (file)
@@ -451,6 +451,7 @@ Bryan Ford <brynosaurus@gmail.com>
 Bryan Heden <b.heden@gmail.com>
 Bulat Gaifullin <gaifullinbf@gmail.com>
 Burak Guven <bguven@gmail.com>
+Byoungchan Lee <daniel.l@hpcnt.com>
 Caine Tighe <arctanofyourface@gmail.com>
 Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
 Caleb Martinez <accounts@calebmartinez.com>
index 7f45a8fce5ee8d4707a450f5ee1e2e68a1a259fb..cb094a373a2447d367d6c27b775eb2afa946165e 100644 (file)
@@ -2258,7 +2258,7 @@ func elfadddynsym(ldr *loader.Loader, target *Target, syms *ArchSyms, s loader.S
 
                dil := ldr.SymDynimplib(s)
 
-               if target.Arch.Family == sys.AMD64 && !cgoeDynamic && dil != "" && !seenlib[dil] {
+               if !cgoeDynamic && dil != "" && !seenlib[dil] {
                        du := ldr.MakeSymbolUpdater(syms.Dynamic)
                        Elfwritedynent(target.Arch, du, elf.DT_NEEDED, uint64(dstru.Addstring(dil)))
                        seenlib[dil] = true
index d86ebb89e041a16e06fd0d741c1955cb5cb9dbe8..15eaa1388b443a1cc4c8d7cf3f6478daf475609d 100644 (file)
@@ -86,7 +86,7 @@ func TestNoDuplicateNeededEntries(t *testing.T) {
        // across the board given the nature of the test).
        pair := runtime.GOOS + "-" + runtime.GOARCH
        switch pair {
-       case "linux-amd64", "freebsd-amd64", "openbsd-amd64":
+       case "linux-amd64", "linux-arm64", "freebsd-amd64", "openbsd-amd64":
        default:
                t.Skip("no need for test on " + pair)
        }