]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/link: always set .dynsym info field
authorLE Manh Cuong <cuong.manhle.vn@gmail.com>
Sun, 1 Sep 2019 05:47:49 +0000 (12:47 +0700)
committerIan Lance Taylor <iant@golang.org>
Sun, 1 Sep 2019 23:59:23 +0000 (23:59 +0000)
CL 187979 added set .dynsym info field, but it won't when
there are no global symbols. This CL sets that field
unconditionally.

Fixes #34000

Change-Id: Icc2f8bc74afdade88a377793e6760912b03686ba
Reviewed-on: https://go-review.googlesource.com/c/go/+/192600
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/link/internal/ld/elf.go

index 1fdba930f5796fceb0f5d73093608c6005a631a3..ef8804cf5f5e3fd4a3570d35fe712ff659bb149f 100644 (file)
@@ -1948,10 +1948,10 @@ func Asmbelf(ctxt *Link, symo int64) {
                for sub := s; sub != nil; sub = sub.Sub {
                        i++
                        if !sub.Attr.Local() {
-                               sh.info = i
                                break
                        }
                }
+               sh.info = i
                shsym(sh, s)
 
                sh = elfshname(".dynstr")