]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/link: remove references to LSym (now Symbol)
authorMichael Hudson-Doyle <michael.hudson@canonical.com>
Sun, 21 Aug 2016 22:27:20 +0000 (10:27 +1200)
committerMichael Hudson-Doyle <michael.hudson@canonical.com>
Sun, 21 Aug 2016 22:43:20 +0000 (22:43 +0000)
Mostly comments but some derived names too.

Change-Id: I1e01dccca98de6688e1426c7a9309f6fd6a1e368
Reviewed-on: https://go-review.googlesource.com/27415
Run-TryBot: Michael Hudson-Doyle <michael.hudson@canonical.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/cmd/link/internal/ld/data.go
src/cmd/link/internal/ld/elf.go
src/cmd/link/internal/ld/link.go
src/cmd/link/internal/ld/objfile.go
src/cmd/link/internal/ld/sym.go
src/cmd/link/internal/ld/symtab.go

index b5780c6135133855792f12cdf55aff606d1ef684..2f93e1ad51a16f410e7f82b63d4171084fa1d725 100644 (file)
@@ -239,7 +239,7 @@ func addaddrplus4(ctxt *Link, s *Symbol, t *Symbol, add int64) int64 {
 
 /*
  * divide-and-conquer list-link
- * sort of LSym* structures.
+ * sort of Symbol* structures.
  * Used for the data block.
  */
 
@@ -1161,12 +1161,12 @@ func (p *GCProg) AddSym(s *Symbol) {
        p.w.Append(prog[4:], nptr)
 }
 
-// dataSortKey is used to sort a slice of data symbol *LSym pointers.
+// dataSortKey is used to sort a slice of data symbol *Symbol pointers.
 // The sort keys are kept inline to improve cache behaviour while sorting.
 type dataSortKey struct {
        size int64
        name string
-       lsym *Symbol
+       sym  *Symbol
 }
 
 type bySizeAndName []dataSortKey
@@ -1786,7 +1786,7 @@ func dodataSect(ctxt *Link, symn int, syms []*Symbol) (result []*Symbol, maxAlig
                symsSort[i] = dataSortKey{
                        size: s.Size,
                        name: s.Name,
-                       lsym: s,
+                       sym:  s,
                }
 
                switch s.Type {
@@ -1806,8 +1806,8 @@ func dodataSect(ctxt *Link, symn int, syms []*Symbol) (result []*Symbol, maxAlig
        sort.Sort(bySizeAndName(symsSort))
 
        for i, symSort := range symsSort {
-               syms[i] = symSort.lsym
-               align := symalign(symSort.lsym)
+               syms[i] = symSort.sym
+               align := symalign(symSort.sym)
                if maxAlign < align {
                        maxAlign = align
                }
index 3b9732362107811afa363c9c892ee1045595675e..0d2115c5a5a530ca90d929fc1e28ef9f4d0115dc 100644 (file)
@@ -1640,7 +1640,7 @@ func elfshbits(ctxt *Link, sect *Section) *ElfShdr {
                        // in a loadable segment (e.g. the abihash note) but not for
                        // notes that we do not want to be mapped (e.g. the package
                        // list note). The real fix is probably to define new values
-                       // for LSym.Type corresponding to mapped and unmapped notes
+                       // for Symbol.Type corresponding to mapped and unmapped notes
                        // and handle them in dodata().
                        ctxt.Diag("sh.type_ == SHT_NOTE in elfshbits when linking internally")
                }
index 57cf8e7c4f2533e158ec173a4f4d7ac34790ffef..1988b91d18aa2735dbbc328633835e327abcf491 100644 (file)
@@ -177,12 +177,12 @@ type Link struct {
        Shlibs    []Shlib
        Tlsoffset int
 
-       Cursym     *Symbol
-       Version    int
-       Textp      []*Symbol
-       Filesyms   []*Symbol
-       Moduledata *Symbol
-       LSymBatch  []Symbol
+       Cursym      *Symbol
+       Version     int
+       Textp       []*Symbol
+       Filesyms    []*Symbol
+       Moduledata  *Symbol
+       SymbolBatch []Symbol
 }
 
 // The smallest possible offset from the hardware stack pointer to a local
index ad9e96c35be20e12a4493dae2b46dd36282411a1..cb77fb5536dddd8550ad7db4366ea4b962bfbe29 100644 (file)
@@ -44,11 +44,11 @@ package ld
 // A symbol reference is a string name followed by a version.
 //
 // A symbol points to other symbols using an index into the symbol
-// reference sequence. Index 0 corresponds to a nil LSym* pointer.
+// reference sequence. Index 0 corresponds to a nil Object* pointer.
 // In the symbol layout described below "symref index" stands for this
 // index.
 //
-// Each symbol is laid out as the following fields (taken from LSym*):
+// Each symbol is laid out as the following fields (taken from Object*):
 //
 //     - byte 0xfe (sanity check for synchronization)
 //     - type [int]
index 707ba81d946f5fa819e2657ca1f4f09642f03deb..163d5b07a629223406d5fa14adacbea999e781ec 100644 (file)
@@ -161,12 +161,12 @@ func linknew(arch *sys.Arch) *Link {
 }
 
 func linknewsym(ctxt *Link, name string, v int) *Symbol {
-       batch := ctxt.LSymBatch
+       batch := ctxt.SymbolBatch
        if len(batch) == 0 {
                batch = make([]Symbol, 1000)
        }
        s := &batch[0]
-       ctxt.LSymBatch = batch[1:]
+       ctxt.SymbolBatch = batch[1:]
 
        s.Dynid = -1
        s.Plt = -1
index 90888e3ee03c497006487f7fc1689352d7a69df5..2bad21ba6596befad09dca9f89d00344952bd8d2 100644 (file)
@@ -46,7 +46,7 @@ func putelfstr(s string) int {
                putelfstr("")
        }
 
-       // When dynamically linking, we create LSym's by reading the names from
+       // When dynamically linking, we create Symbols by reading the names from
        // the symbol tables of the shared libraries and so the names need to
        // match exactly. Tools like DTrace will have to wait for now.
        if !DynlinkingGo() {
@@ -168,7 +168,7 @@ func putelfsym(ctxt *Link, x *Symbol, s string, t int, addr int64, size int64, v
                // PLT. We force this by writing an additional local symbol for every
                // global function symbol and making all relocations against the
                // global symbol refer to this local symbol instead (see
-               // (*LSym).ElfsymForReloc). This is approximately equivalent to the
+               // (*Symbol).ElfsymForReloc). This is approximately equivalent to the
                // ELF linker -Bsymbolic-functions option, but that is buggy on
                // several platforms.
                putelfsyment(putelfstr("local."+s), addr, size, STB_LOCAL<<4|type_&0xf, elfshnum, other)