]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/link: mark ELF PLT sections executable
authorCherry Zhang <cherryyz@google.com>
Thu, 3 Sep 2020 21:51:01 +0000 (17:51 -0400)
committerCherry Zhang <cherryyz@google.com>
Tue, 8 Sep 2020 17:19:24 +0000 (17:19 +0000)
Change-Id: Ie0316a06c30485f783c2175590d7e9fc4fa3e0cd
Reviewed-on: https://go-review.googlesource.com/c/go/+/253021
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
src/cmd/link/internal/ld/data.go

index 85ce7d8fb797576288e175644f464fa757ab7a06..8324a98a26e4beecaa0a290bf85f8f4d9e2a658a 100644 (file)
@@ -1786,7 +1786,7 @@ func (state *dodataState) allocateDataSections(ctxt *Link) {
                culprit := ldr.SymName(state.data[sym.STEXT][0])
                Errorf(nil, "dodata found an sym.STEXT symbol: %s", culprit)
        }
-       state.allocateSingleSymSections(&Segtext, sym.SELFRXSECT, sym.SRODATA, 04)
+       state.allocateSingleSymSections(&Segtext, sym.SELFRXSECT, sym.SRODATA, 05)
        state.allocateSingleSymSections(&Segtext, sym.SMACHOPLT, sym.SRODATA, 05)
 
        /* read-only data */