Skip to content

Commit

Permalink
cmd/link: always set .dynsym info field
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
cuonglm authored and ianlancetaylor committed Sep 1, 2019
1 parent 79669dc commit fa7d40a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cmd/link/internal/ld/elf.go
Expand Up @@ -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")
Expand Down

0 comments on commit fa7d40a

Please sign in to comment.