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>
/*
* divide-and-conquer list-link
- * sort of LSym* structures.
+ * sort of Symbol* structures.
* Used for the data block.
*/
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
symsSort[i] = dataSortKey{
size: s.Size,
name: s.Name,
- lsym: s,
+ sym: s,
}
switch s.Type {
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
}
// 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")
}
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
// 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]
}
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
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() {
// 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)