]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/link/internal/ld: unexport ReadOnly and RelROMap
authorMichael Hudson-Doyle <michael.hudson@canonical.com>
Thu, 27 Apr 2017 20:11:21 +0000 (08:11 +1200)
committerMichael Hudson-Doyle <michael.hudson@canonical.com>
Fri, 28 Apr 2017 20:02:50 +0000 (20:02 +0000)
Change-Id: I08e33b92dd8a22e28ec15aa5753904aa8e1c71f5
Reviewed-on: https://go-review.googlesource.com/42031
Run-TryBot: Michael Hudson-Doyle <michael.hudson@canonical.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/link/internal/ld/data.go
src/cmd/link/internal/ld/symkind.go

index 5d3323ba92ce1491d37fba26a91ab2cf6b717255..8aa6cde60376a5aa3a6af60bc66e0cc8ec6c9874 100644 (file)
@@ -1361,8 +1361,8 @@ func (ctxt *Link) dodata() {
                // "read only" data with relocations needs to go in its own section
                // when building a shared library. We do this by boosting objects of
                // type SXXX with relocations to type SXXXRELRO.
-               for _, symnro := range ReadOnly {
-                       symnrelro := RelROMap[symnro]
+               for _, symnro := range readOnly {
+                       symnrelro := relROMap[symnro]
 
                        ro := []*Symbol{}
                        relro := data[symnrelro]
@@ -1640,14 +1640,14 @@ func (ctxt *Link) dodata() {
                ctxt.Syms.Lookup("runtime.types", 0).Sect = sect
                ctxt.Syms.Lookup("runtime.etypes", 0).Sect = sect
        }
-       for _, symn := range ReadOnly {
+       for _, symn := range readOnly {
                align := dataMaxAlign[symn]
                if sect.Align < align {
                        sect.Align = align
                }
        }
        datsize = Rnd(datsize, int64(sect.Align))
-       for _, symn := range ReadOnly {
+       for _, symn := range readOnly {
                for _, s := range data[symn] {
                        datsize = aligndatsize(datsize, s)
                        s.Sect = sect
@@ -1720,16 +1720,16 @@ func (ctxt *Link) dodata() {
                sect.Vaddr = 0
                ctxt.Syms.Lookup("runtime.types", 0).Sect = sect
                ctxt.Syms.Lookup("runtime.etypes", 0).Sect = sect
-               for _, symnro := range ReadOnly {
-                       symn := RelROMap[symnro]
+               for _, symnro := range readOnly {
+                       symn := relROMap[symnro]
                        align := dataMaxAlign[symn]
                        if sect.Align < align {
                                sect.Align = align
                        }
                }
                datsize = Rnd(datsize, int64(sect.Align))
-               for _, symnro := range ReadOnly {
-                       symn := RelROMap[symnro]
+               for _, symnro := range readOnly {
+                       symn := relROMap[symnro]
                        for _, s := range data[symn] {
                                datsize = aligndatsize(datsize, s)
                                if s.Outer != nil && s.Outer.Sect != nil && s.Outer.Sect != sect {
index 1d10ce235c059a4847b55d641f948b24e539c8ab..1f95f8afa8b1bca9b15a027e88c9d826233f1962 100644 (file)
@@ -124,10 +124,10 @@ var abiSymKindToSymKind = [...]SymKind{
        SDWARFINFO,
 }
 
-// ReadOnly are the symbol kinds that form read-only sections. In some
+// readOnly are the symbol kinds that form read-only sections. In some
 // cases, if they will require relocations, they are transformed into
-// rel-ro sections using RelROMap.
-var ReadOnly = []SymKind{
+// rel-ro sections using relROMap.
+var readOnly = []SymKind{
        STYPE,
        SSTRING,
        SGOSTRING,
@@ -137,9 +137,9 @@ var ReadOnly = []SymKind{
        SFUNCTAB,
 }
 
-// RelROMap describes the transformation of read-only symbols to rel-ro
+// relROMap describes the transformation of read-only symbols to rel-ro
 // symbols.
-var RelROMap = map[SymKind]SymKind{
+var relROMap = map[SymKind]SymKind{
        STYPE:     STYPERELRO,
        SSTRING:   SSTRINGRELRO,
        SGOSTRING: SGOSTRINGRELRO,