]> Cypherpunks repositories - gostls13.git/commitdiff
ld: make .rodata section read-only
authorGustavo Niemeyer <gustavo@niemeyer.net>
Tue, 14 Jun 2011 18:13:54 +0000 (15:13 -0300)
committerGustavo Niemeyer <gustavo@niemeyer.net>
Tue, 14 Jun 2011 18:13:54 +0000 (15:13 -0300)
Fixes the respective warning from elflint.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4607048

src/cmd/ld/data.c

index cd485072e7b55c57a2bef6ae97249bd1c952bae2..140712b2981cd44cfc3c72fa1be1e698d3ffe8f4 100644 (file)
@@ -781,7 +781,7 @@ dodata(void)
         */
 
        /* read-only data */
-       sect = addsection(&segtext, ".rodata", 06);
+       sect = addsection(&segtext, ".rodata", 04);
        sect->vaddr = 0;
        datsize = 0;
        s = datap;