]> Cypherpunks repositories - gostls13.git/commit
[dev.link] cmd/link: set symbol alignments after dynreloc2
authorCherry Zhang <cherryyz@google.com>
Sun, 26 Apr 2020 18:56:19 +0000 (14:56 -0400)
committerCherry Zhang <cherryyz@google.com>
Mon, 27 Apr 2020 13:56:05 +0000 (13:56 +0000)
commitf8b74eafd5d2019a7a0fcfc21e037ba5f2f84732
tree1e736493766f538668d48da4291c7cb9057522fb
parente77639f3a4ab27e2b6520ca54ee192953be00186
[dev.link] cmd/link: set symbol alignments after dynreloc2

The symbol alignment is set based on its size. In dynreloc2
symbol size may change (e.g. elfdynhash2). So the alignment must
be set after dynreloc2.

Noticed this while debugging nondeterministic build on Solaris.

Idx Name          Size      VMA               LMA               File off  Algn
  8 .hash         000000c8  000000000048add2  000000000048add2  0008add2  2**3
                  CONTENTS, ALLOC, LOAD, READONLY, DATA

This doesn't look right, as the section address is not a multiple
of its alignment.

Change-Id: I23534cbc59695b7bc241838173fcc71dde95b195
Reviewed-on: https://go-review.googlesource.com/c/go/+/230278
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
src/cmd/link/internal/ld/data.go