aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/api
diff options
context:
space:
mode:
authorAlex Brainman <alex.brainman@gmail.com>2018-06-16 16:23:52 +1000
committerAlex Brainman <alex.brainman@gmail.com>2018-10-05 08:54:24 +0000
commit8256bcdae0da68644db1e33c0db86f5ac4395c4b (patch)
tree537013ac2182b04015cb1d258f46eea2126ab48f /src/cmd/api
parent48e22da1d24dc5b038bd83a78553173af5474e76 (diff)
downloadgo-8256bcdae0da68644db1e33c0db86f5ac4395c4b.tar.xz
cmd/link: move .rel symbol from .rdata into .text
.rel symbol type is sym.SELFROSECT, and that makes .rel written into .rdata section. But .rel stores code - jump table used for external C functions. So we have to mark whole .rdata section as executable (IMAGE_SCN_MEM_EXECUTE), because of .rel presence in it. Move .rel into .text section, and make .rdata section non executable. I also had to move code that adjusted the size of .rel symbol before calling textaddress, otherwise textaddress would not calculate size of .text section correctly. Fixes #25926 Change-Id: I4962f5de7b367410154c8709adfcd8472de9ac1a Reviewed-on: https://go-review.googlesource.com/c/125455 Run-TryBot: Alex Brainman <alex.brainman@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/cmd/api')
0 files changed, 0 insertions, 0 deletions