]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/link: set correct flags in .dynamic for PIE buildmode
authorThan McIntosh <thanm@google.com>
Tue, 15 Jun 2021 12:01:54 +0000 (08:01 -0400)
committerThan McIntosh <thanm@google.com>
Tue, 15 Jun 2021 18:09:44 +0000 (18:09 +0000)
commit723f199edd8619c8eedc1c4e8df1e5f96599d51a
treed2cbc2a2a6b3ab963f3de1f219e3730a5260dcfe
parent4d2d89ff42ca07eac5e600a3f5bba8fb137b6e99
cmd/link: set correct flags in .dynamic for PIE buildmode

For internal linking, when generating a PIE binary, set the proper
.dynamic section flags to mark the binary as position-independent.

Fixes #46747.

Change-Id: I2b899148c6d06f92c9d12257a9761278b4236dfc
Reviewed-on: https://go-review.googlesource.com/c/go/+/328089
Run-TryBot: Than McIntosh <thanm@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Trust: Than McIntosh <thanm@google.com>
src/cmd/link/internal/ld/elf.go