]> Cypherpunks repositories - gostls13.git/commit
cmd/link: set correct alignment of ELF note section
authorIan Lance Taylor <iant@golang.org>
Thu, 24 Aug 2017 00:44:51 +0000 (17:44 -0700)
committerIan Lance Taylor <iant@golang.org>
Thu, 24 Aug 2017 16:54:18 +0000 (16:54 +0000)
commitcd5c10f040282b1c90109feb155527fe4a2ff4a0
tree64c9a25374bd8517616ec1adcbaf0e067ed66ff8
parent744ebfde0460e1d8fff10672e4d1e8d9ece52556
cmd/link: set correct alignment of ELF note section

Otherwise the default computation in symalign kicked in, setting the
alignment to be too high. This didn't matter with GNU ld, which put
each loadable note into a separate PT_NOTE segment, but it did matter
with gold which accumulated them all into a single PT_NOTE segment,
respecting the requested alignment. In the single PT_NOTE segment
generated by gold, the incorrect section alignment made the notes
unreadable.

Fixes #21564

Change-Id: I15eb408bb04a2566c9fdfb6828e14188d9ef2280
Reviewed-on: https://go-review.googlesource.com/58290
Reviewed-by: Russ Cox <rsc@golang.org>
src/cmd/go/note_test.go
src/cmd/link/internal/ld/elf.go