Skip to content

Commit f5f1426

Browse files
ianlancetaylorgopherbot
authored andcommitted
cmd/link: remove misleading comment
The comment suggests that the text section is briefly writable. That is not the case. As the earlier part of the comment explains, part of the text section is mapped twice, once r-x and once rw-. It is never the case that there is writable executable memory. Change-Id: I56841e19a8a08f2515f29752536a5c8f180ac8c9 Reviewed-on: https://go-review.googlesource.com/c/go/+/715622 Auto-Submit: Ian Lance Taylor <iant@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Than McIntosh <thanm@golang.org> Reviewed-by: Michael Pratt <mpratt@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
1 parent 61de3a9 commit f5f1426

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

src/cmd/link/internal/ld/data.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2852,9 +2852,6 @@ func (ctxt *Link) address() []*sym.Segment {
28522852
// will be such that the last page of the text segment will be
28532853
// mapped twice, once r-x and once starting out rw- and, after
28542854
// relocation processing, changed to r--.
2855-
//
2856-
// Ideally the last page of the text segment would not be
2857-
// writable even for this short period.
28582855
va = uint64(Rnd(int64(va), *FlagRound))
28592856

28602857
order = append(order, &Segrodata)

0 commit comments

Comments
 (0)