// 1) the PC->func table.
// 2) The entry points in the func objects.
// 3) The funcdata.
-// (1) and (2) are handled in walkPCToFunc. (3) is handled in walkFuncdata.
+// (1) and (2) are handled in writePCToFunc. (3) is handled in writeFuncdata.
//
// After relocations, once we know where to write things in the output buffer,
// we execute the second pass, which is actually writing the data.
}
// Write the data.
- writePcToFunc(ctxt, sb, funcs, startLocations, setAddr, (*loader.SymbolBuilder).SetUint)
+ writePCToFunc(ctxt, sb, funcs, startLocations, setAddr, (*loader.SymbolBuilder).SetUint)
writeFuncs(ctxt, sb, funcs, inlSyms, startLocations, cuOffsets, nameOffsets)
state.writeFuncData(ctxt, sb, funcs, inlSyms, startLocations, setAddr, (*loader.SymbolBuilder).SetUint)
}
setAddr = (*loader.SymbolBuilder).SetAddrPlus
}
setUintNOP := func(*loader.SymbolBuilder, *sys.Arch, int64, uint64) int64 { return 0 }
- writePcToFunc(ctxt, sb, funcs, startLocations, setAddr, setUintNOP)
+ writePCToFunc(ctxt, sb, funcs, startLocations, setAddr, setUintNOP)
if !useSymValue {
// Generate relocations for funcdata when externally linking.
state.writeFuncData(ctxt, sb, funcs, inlSyms, startLocations, setAddr, setUintNOP)
return size, startLocations
}
-// writePcToFunc writes the PC->func lookup table.
+// writePCToFunc writes the PC->func lookup table.
// This function walks the pc->func lookup table, executing callbacks
// to generate relocations and writing the values for the table.
-func writePcToFunc(ctxt *Link, sb *loader.SymbolBuilder, funcs []loader.Sym, startLocations []uint32, setAddr pclnSetAddr, setUint pclnSetUint) {
+func writePCToFunc(ctxt *Link, sb *loader.SymbolBuilder, funcs []loader.Sym, startLocations []uint32, setAddr pclnSetAddr, setUint pclnSetUint) {
ldr := ctxt.loader
var prevFunc loader.Sym
prevSect := ldr.SymSect(funcs[0])
fi.Preload()
}
- // Note we skip the space for the entry value -- that's handled inn
- // walkPCToFunc. We don't write it here, because it might require a
+ // Note we skip the space for the entry value -- that's handled in
+ // writePCToFunc. We don't write it here, because it might require a
// relocation.
off := startLocations[i] + uint32(ctxt.Arch.PtrSize) // entry