diff options
| author | Jes Cok <xigua67damn@gmail.com> | 2025-10-19 19:53:27 +0000 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2025-10-21 08:13:08 -0700 |
| commit | a5a249d6a64508376320bc48546a6a43aebecda7 (patch) | |
| tree | 707720726df7c69b68536f55154a5fb0c2704763 /src/cmd/link/internal/ld | |
| parent | 694182d77b1a0e3676214ad0e361bdbdafde33a1 (diff) | |
| download | go-a5a249d6a64508376320bc48546a6a43aebecda7.tar.xz | |
all: eliminate unnecessary type conversions
Found by github.com/mdempsky/unconvert
Change-Id: I88ce10390a49ba768a4deaa0df9057c93c1164de
GitHub-Last-Rev: 3b0f7e8f74f58340637f33287c238765856b2483
GitHub-Pull-Request: golang/go#75974
Reviewed-on: https://go-review.googlesource.com/c/go/+/712940
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@golang.org>
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: David Chase <drchase@google.com>
Diffstat (limited to 'src/cmd/link/internal/ld')
| -rw-r--r-- | src/cmd/link/internal/ld/data.go | 10 | ||||
| -rw-r--r-- | src/cmd/link/internal/ld/dwarf.go | 40 | ||||
| -rw-r--r-- | src/cmd/link/internal/ld/elf.go | 22 | ||||
| -rw-r--r-- | src/cmd/link/internal/ld/macho.go | 6 | ||||
| -rw-r--r-- | src/cmd/link/internal/ld/pcln.go | 8 | ||||
| -rw-r--r-- | src/cmd/link/internal/ld/pe.go | 4 | ||||
| -rw-r--r-- | src/cmd/link/internal/ld/xcoff.go | 18 |
7 files changed, 54 insertions, 54 deletions
diff --git a/src/cmd/link/internal/ld/data.go b/src/cmd/link/internal/ld/data.go index a49cae0d95..dfb1d7bafb 100644 --- a/src/cmd/link/internal/ld/data.go +++ b/src/cmd/link/internal/ld/data.go @@ -427,7 +427,7 @@ func (st *relocSymState) relocsym(s loader.Sym, P []byte) { } case objabi.R_DWTXTADDR_U1, objabi.R_DWTXTADDR_U2, objabi.R_DWTXTADDR_U3, objabi.R_DWTXTADDR_U4: unit := ldr.SymUnit(rs) - if idx, ok := unit.Addrs[sym.LoaderSym(rs)]; ok { + if idx, ok := unit.Addrs[rs]; ok { o = int64(idx) } else { st.err.Errorf(s, "missing .debug_addr index relocation target %s", ldr.SymName(rs)) @@ -512,7 +512,7 @@ func (st *relocSymState) relocsym(s loader.Sym, P []byte) { case objabi.R_ADDRCUOFF: // debug_range and debug_loc elements use this relocation type to get an // offset from the start of the compile unit. - o = ldr.SymValue(rs) + r.Add() - ldr.SymValue(loader.Sym(ldr.SymUnit(rs).Textp[0])) + o = ldr.SymValue(rs) + r.Add() - ldr.SymValue(ldr.SymUnit(rs).Textp[0]) // r.Sym() can be 0 when CALL $(constant) is transformed from absolute PC to relative PC call. case objabi.R_GOTPCREL: @@ -560,7 +560,7 @@ func (st *relocSymState) relocsym(s loader.Sym, P []byte) { if rst != sym.SHOSTOBJ { o += int64(uint64(ldr.SymValue(rs)) - ldr.SymSect(rs).Vaddr) } - o -= int64(off) // relative to section offset, not symbol + o -= off // relative to section offset, not symbol } } else { o += int64(siz) @@ -698,7 +698,7 @@ func extreloc(ctxt *Link, ldr *loader.Loader, s loader.Sym, r loader.Reloc) (loa return rr, false } rs := r.Sym() - rr.Xsym = loader.Sym(ldr.SymSect(rs).Sym) + rr.Xsym = ldr.SymSect(rs).Sym rr.Xadd = r.Add() + ldr.SymValue(rs) - int64(ldr.SymSect(rs).Vaddr) // r.Sym() can be 0 when CALL $(constant) is transformed from absolute PC to relative PC call. @@ -2268,7 +2268,7 @@ func (state *dodataState) allocateDwarfSections(ctxt *Link) { s := dwarfp[i].secSym() sect := state.allocateNamedDataSection(&Segdwarf, ldr.SymName(s), []sym.SymKind{}, 04) ldr.SetSymSect(s, sect) - sect.Sym = sym.LoaderSym(s) + sect.Sym = s curType := ldr.SymType(s) state.setSymType(s, sym.SRODATA) ldr.SetSymValue(s, int64(uint64(state.datsize)-sect.Vaddr)) diff --git a/src/cmd/link/internal/ld/dwarf.go b/src/cmd/link/internal/ld/dwarf.go index 0003938ef2..222e712ede 100644 --- a/src/cmd/link/internal/ld/dwarf.go +++ b/src/cmd/link/internal/ld/dwarf.go @@ -1011,7 +1011,7 @@ func (d *dwctxt) addDwarfAddrRef(sb *loader.SymbolBuilder, t loader.Sym) { func (d *dwctxt) calcCompUnitRanges() { var prevUnit *sym.CompilationUnit for _, s := range d.linkctxt.Textp { - sym := loader.Sym(s) + sym := s fi := d.ldr.FuncInfo(sym) if !fi.Valid() { @@ -1033,7 +1033,7 @@ func (d *dwctxt) calcCompUnitRanges() { // only create boundaries between symbols from // different units. sval := d.ldr.SymValue(sym) - u0val := d.ldr.SymValue(loader.Sym(unit.Textp[0])) + u0val := d.ldr.SymValue(unit.Textp[0]) if prevUnit != unit { unit.PCs = append(unit.PCs, dwarf.Range{Start: sval - u0val}) prevUnit = unit @@ -1339,7 +1339,7 @@ func (d *dwctxt) writelines(unit *sym.CompilationUnit, lineProlog loader.Sym) [] // Output the state machine for each function remaining. for _, s := range unit.Textp { - fnSym := loader.Sym(s) + fnSym := s _, _, _, lines := d.ldr.GetFuncDwarfAuxSyms(fnSym) // Chain the line symbol onto the list. @@ -1399,7 +1399,7 @@ func (d *dwctxt) writepcranges(unit *sym.CompilationUnit, base loader.Sym, pcs [ // Collect up the ranges for functions in the unit. rsize := uint64(rsu.Size()) for _, ls := range unit.RangeSyms { - s := loader.Sym(ls) + s := ls syms = append(syms, s) rsize += uint64(d.ldr.SymSize(s)) } @@ -1501,7 +1501,7 @@ func (d *dwctxt) writeframes(fs loader.Sym) dwarfSecInfo { var deltaBuf []byte pcsp := obj.NewPCIter(uint32(d.arch.MinLC)) for _, s := range d.linkctxt.Textp { - fn := loader.Sym(s) + fn := s fi := d.ldr.FuncInfo(fn) if !fi.Valid() { continue @@ -1646,7 +1646,7 @@ func (d *dwctxt) writeUnitInfo(u *sym.CompilationUnit, abbrevsym loader.Sym, add cu = append(cu, u.AbsFnDIEs...) cu = append(cu, u.FuncDIEs...) if u.Consts != 0 { - cu = append(cu, loader.Sym(u.Consts)) + cu = append(cu, u.Consts) } cu = append(cu, u.VarDIEs...) var cusize int64 @@ -1772,7 +1772,7 @@ func (d *dwctxt) assignDebugAddrSlot(unit *sym.CompilationUnit, fnsym loader.Sym if unit.Addrs == nil { unit.Addrs = make(map[sym.LoaderSym]uint32) } - if _, ok := unit.Addrs[sym.LoaderSym(rsym)]; ok { + if _, ok := unit.Addrs[rsym]; ok { // already present, no work needed } else { sl := len(unit.Addrs) @@ -1781,7 +1781,7 @@ func (d *dwctxt) assignDebugAddrSlot(unit *sym.CompilationUnit, fnsym loader.Sym if sl > lim { log.Fatalf("internal error: %s relocation overflow on infosym for %s", rt.String(), d.ldr.SymName(fnsym)) } - unit.Addrs[sym.LoaderSym(rsym)] = uint32(sl) + unit.Addrs[rsym] = uint32(sl) sb.AddAddrPlus(d.arch, rsym, 0) data := sb.Data() if d.arch.PtrSize == 4 { @@ -1805,11 +1805,11 @@ func (d *dwctxt) dwarfVisitFunction(fnSym loader.Sym, unit *sym.CompilationUnit) } d.ldr.SetAttrNotInSymbolTable(infosym, true) d.ldr.SetAttrReachable(infosym, true) - unit.FuncDIEs = append(unit.FuncDIEs, sym.LoaderSym(infosym)) + unit.FuncDIEs = append(unit.FuncDIEs, infosym) if rangesym != 0 { d.ldr.SetAttrNotInSymbolTable(rangesym, true) d.ldr.SetAttrReachable(rangesym, true) - unit.RangeSyms = append(unit.RangeSyms, sym.LoaderSym(rangesym)) + unit.RangeSyms = append(unit.RangeSyms, rangesym) } // Walk the relocations of the subprogram DIE symbol to discover @@ -1836,7 +1836,7 @@ func (d *dwctxt) dwarfVisitFunction(fnSym loader.Sym, unit *sym.CompilationUnit) if !d.ldr.AttrOnList(rsym) { // abstract function d.ldr.SetAttrOnList(rsym, true) - unit.AbsFnDIEs = append(unit.AbsFnDIEs, sym.LoaderSym(rsym)) + unit.AbsFnDIEs = append(unit.AbsFnDIEs, rsym) d.importInfoSymbol(rsym) } continue @@ -1942,7 +1942,7 @@ func dwarfGenerateDebugInfo(ctxt *Link) { for _, unit := range lib.Units { // We drop the constants into the first CU. if consts != 0 { - unit.Consts = sym.LoaderSym(consts) + unit.Consts = consts d.importInfoSymbol(consts) consts = 0 } @@ -2008,7 +2008,7 @@ func dwarfGenerateDebugInfo(ctxt *Link) { // abstract functions, visit range symbols. Note that // Textp has been dead-code-eliminated already. for _, s := range unit.Textp { - d.dwarfVisitFunction(loader.Sym(s), unit) + d.dwarfVisitFunction(s, unit) } } } @@ -2073,7 +2073,7 @@ func dwarfGenerateDebugInfo(ctxt *Link) { if varDIE != 0 { unit := d.ldr.SymUnit(idx) d.defgotype(gt) - unit.VarDIEs = append(unit.VarDIEs, sym.LoaderSym(varDIE)) + unit.VarDIEs = append(unit.VarDIEs, varDIE) } } @@ -2125,7 +2125,7 @@ type dwUnitSyms struct { func (d *dwctxt) dwUnitPortion(u *sym.CompilationUnit, abbrevsym loader.Sym, us *dwUnitSyms) { if u.DWInfo.Abbrev != dwarf.DW_ABRV_COMPUNIT_TEXTLESS { us.linesyms = d.writelines(u, us.lineProlog) - base := loader.Sym(u.Textp[0]) + base := u.Textp[0] if buildcfg.Experiment.Dwarf5 { d.writedebugaddr(u, us.addrsym) } @@ -2145,7 +2145,7 @@ func (d *dwctxt) writedebugaddr(unit *sym.CompilationUnit, debugaddr loader.Sym) var dsyms []loader.Sym for _, s := range unit.Textp { - fnSym := loader.Sym(s) + fnSym := s // NB: this looks at SDWARFFCN; it will need to also look // at range and loc when they get there. infosym, locsym, rangessym, _ := d.ldr.GetFuncDwarfAuxSyms(fnSym) @@ -2305,8 +2305,8 @@ func (d *dwctxt) dwarfGenerateDebugSyms() { len += uint64(d.ldr.SymSize(hdrsym)) su := d.ldr.MakeSymbolUpdater(hdrsym) if isDwarf64(d.linkctxt) { - len -= 12 // sub size of length field - su.SetUint(d.arch, 4, uint64(len)) // 4 because of 0XFFFFFFFF + len -= 12 // sub size of length field + su.SetUint(d.arch, 4, len) // 4 because of 0XFFFFFFFF } else { len -= 4 // subtract size of length field su.SetUint32(d.arch, 0, uint32(len)) @@ -2377,7 +2377,7 @@ func (d *dwctxt) dwarfGenerateDebugSyms() { func (d *dwctxt) collectUnitLocs(u *sym.CompilationUnit) []loader.Sym { syms := []loader.Sym{} for _, fn := range u.FuncDIEs { - relocs := d.ldr.Relocs(loader.Sym(fn)) + relocs := d.ldr.Relocs(fn) for i := 0; i < relocs.Count(); i++ { reloc := relocs.At(i) if reloc.Type() != objabi.R_DWARFSECREF { @@ -2510,7 +2510,7 @@ func dwarfcompress(ctxt *Link) { ldr.SetSymValue(s, int64(pos)) sect := ldr.SymSect(s) if sect != prevSect { - sect.Vaddr = uint64(pos) + sect.Vaddr = pos prevSect = sect } if ldr.SubSym(s) != 0 { diff --git a/src/cmd/link/internal/ld/elf.go b/src/cmd/link/internal/ld/elf.go index 6ff1d94383..ed215d7fe5 100644 --- a/src/cmd/link/internal/ld/elf.go +++ b/src/cmd/link/internal/ld/elf.go @@ -343,8 +343,8 @@ func elf32phdr(out *OutBuf, e *ElfPhdr) { func elf64shdr(out *OutBuf, e *ElfShdr) { out.Write32(e.Name) - out.Write32(uint32(e.Type)) - out.Write64(uint64(e.Flags)) + out.Write32(e.Type) + out.Write64(e.Flags) out.Write64(e.Addr) out.Write64(e.Off) out.Write64(e.Size) @@ -356,7 +356,7 @@ func elf64shdr(out *OutBuf, e *ElfShdr) { func elf32shdr(out *OutBuf, e *ElfShdr) { out.Write32(e.Name) - out.Write32(uint32(e.Type)) + out.Write32(e.Type) out.Write32(uint32(e.Flags)) out.Write32(uint32(e.Addr)) out.Write32(uint32(e.Off)) @@ -442,9 +442,9 @@ func getElfEhdr() *ElfEhdr { func elf64writehdr(out *OutBuf) uint32 { out.Write(ehdr.Ident[:]) - out.Write16(uint16(ehdr.Type)) - out.Write16(uint16(ehdr.Machine)) - out.Write32(uint32(ehdr.Version)) + out.Write16(ehdr.Type) + out.Write16(ehdr.Machine) + out.Write32(ehdr.Version) out.Write64(ehdr.Entry) out.Write64(ehdr.Phoff) out.Write64(ehdr.Shoff) @@ -460,9 +460,9 @@ func elf64writehdr(out *OutBuf) uint32 { func elf32writehdr(out *OutBuf) uint32 { out.Write(ehdr.Ident[:]) - out.Write16(uint16(ehdr.Type)) - out.Write16(uint16(ehdr.Machine)) - out.Write32(uint32(ehdr.Version)) + out.Write16(ehdr.Type) + out.Write16(ehdr.Machine) + out.Write32(ehdr.Version) out.Write32(uint32(ehdr.Entry)) out.Write32(uint32(ehdr.Phoff)) out.Write32(uint32(ehdr.Shoff)) @@ -1379,7 +1379,7 @@ func elfEmitReloc(ctxt *Link) { for i := 0; i < len(Segdwarf.Sections); i++ { sect := Segdwarf.Sections[i] si := dwarfp[i] - if si.secSym() != loader.Sym(sect.Sym) || + if si.secSym() != sect.Sym || ctxt.loader.SymSect(si.secSym()) != sect { panic("inconsistency between dwarfp and Segdwarf") } @@ -1426,7 +1426,7 @@ func (ctxt *Link) doelf() { shstrtabAddstring := func(s string) { off := addshstr(s) - elfsetstring(ctxt, 0, s, int(off)) + elfsetstring(ctxt, 0, s, off) } shstrtabAddstring("") diff --git a/src/cmd/link/internal/ld/macho.go b/src/cmd/link/internal/ld/macho.go index c262634666..8e059f299f 100644 --- a/src/cmd/link/internal/ld/macho.go +++ b/src/cmd/link/internal/ld/macho.go @@ -1254,7 +1254,7 @@ func machoEmitReloc(ctxt *Link) { for i := 0; i < len(Segdwarf.Sections); i++ { sect := Segdwarf.Sections[i] si := dwarfp[i] - if si.secSym() != loader.Sym(sect.Sym) || + if si.secSym() != sect.Sym || ctxt.loader.SymSect(si.secSym()) != sect { panic("inconsistency between dwarfp and Segdwarf") } @@ -1535,11 +1535,11 @@ func machoCodeSign(ctxt *Link, fname string) error { // Uodate the __LINKEDIT segment. segSz := sigOff + sz - int64(linkeditSeg.Offset) mf.ByteOrder.PutUint64(tmp[:8], uint64(segSz)) - _, err = f.WriteAt(tmp[:8], int64(linkeditOff)+int64(unsafe.Offsetof(macho.Segment64{}.Memsz))) + _, err = f.WriteAt(tmp[:8], linkeditOff+int64(unsafe.Offsetof(macho.Segment64{}.Memsz))) if err != nil { return err } - _, err = f.WriteAt(tmp[:8], int64(linkeditOff)+int64(unsafe.Offsetof(macho.Segment64{}.Filesz))) + _, err = f.WriteAt(tmp[:8], linkeditOff+int64(unsafe.Offsetof(macho.Segment64{}.Filesz))) if err != nil { return err } diff --git a/src/cmd/link/internal/ld/pcln.go b/src/cmd/link/internal/ld/pcln.go index 9532b33a9b..2b3687c37e 100644 --- a/src/cmd/link/internal/ld/pcln.go +++ b/src/cmd/link/internal/ld/pcln.go @@ -216,7 +216,7 @@ func genInlTreeSym(ctxt *Link, cu *sym.CompilationUnit, fi loader.FuncInfo, arch const size = 16 inlTreeSym.SetUint8(arch, int64(i*size+0), uint8(funcID)) // Bytes 1-3 are unused. - inlTreeSym.SetUint32(arch, int64(i*size+4), uint32(nameOff)) + inlTreeSym.SetUint32(arch, int64(i*size+4), nameOff) inlTreeSym.SetUint32(arch, int64(i*size+8), uint32(call.ParentPC)) inlTreeSym.SetUint32(arch, int64(i*size+12), uint32(startLine)) } @@ -683,14 +683,14 @@ func writeFuncs(ctxt *Link, sb *loader.SymbolBuilder, funcs []loader.Sym, inlSym off := int64(startLocations[i]) // entryOff uint32 (offset of func entry PC from textStart) entryOff := textOff(ctxt, s, textStart) - off = sb.SetUint32(ctxt.Arch, off, uint32(entryOff)) + off = sb.SetUint32(ctxt.Arch, off, entryOff) // nameOff int32 nameOff, ok := nameOffsets[s] if !ok { panic("couldn't find function name offset") } - off = sb.SetUint32(ctxt.Arch, off, uint32(nameOff)) + off = sb.SetUint32(ctxt.Arch, off, nameOff) // args int32 // TODO: Move into funcinfo. @@ -712,7 +712,7 @@ func writeFuncs(ctxt *Link, sb *loader.SymbolBuilder, funcs []loader.Sym, inlSym } else { off += 12 } - off = sb.SetUint32(ctxt.Arch, off, uint32(numPCData(ldr, s, fi))) + off = sb.SetUint32(ctxt.Arch, off, numPCData(ldr, s, fi)) // Store the offset to compilation unit's file table. cuIdx := ^uint32(0) diff --git a/src/cmd/link/internal/ld/pe.go b/src/cmd/link/internal/ld/pe.go index e0186f46b0..f5b7580fda 100644 --- a/src/cmd/link/internal/ld/pe.go +++ b/src/cmd/link/internal/ld/pe.go @@ -653,7 +653,7 @@ dwarfLoop: for i := 0; i < len(Segdwarf.Sections); i++ { sect := Segdwarf.Sections[i] si := dwarfp[i] - if si.secSym() != loader.Sym(sect.Sym) || + if si.secSym() != sect.Sym || ldr.SymSect(si.secSym()) != sect { panic("inconsistency between dwarfp and Segdwarf") } @@ -1506,7 +1506,7 @@ func (rt *peBaseRelocTable) addentry(ldr *loader.Loader, s loader.Sym, r *loader const pageSize = 0x1000 const pageMask = pageSize - 1 - addr := ldr.SymValue(s) + int64(r.Off()) - int64(PEBASE) + addr := ldr.SymValue(s) + int64(r.Off()) - PEBASE page := uint32(addr &^ pageMask) off := uint32(addr & pageMask) diff --git a/src/cmd/link/internal/ld/xcoff.go b/src/cmd/link/internal/ld/xcoff.go index da728e2545..fdc16ac48f 100644 --- a/src/cmd/link/internal/ld/xcoff.go +++ b/src/cmd/link/internal/ld/xcoff.go @@ -677,7 +677,7 @@ func (f *xcoffFile) writeSymbolNewFile(ctxt *Link, name string, firstEntry uint6 dwsize = getDwsectCUSize(sect.Name, name) // .debug_abbrev is common to all packages and not found with the previous function if sect.Name == ".debug_abbrev" { - dwsize = uint64(ldr.SymSize(loader.Sym(sect.Sym))) + dwsize = uint64(ldr.SymSize(sect.Sym)) } } else { @@ -699,7 +699,7 @@ func (f *xcoffFile) writeSymbolNewFile(ctxt *Link, name string, firstEntry uint6 // Dwarf relocations need the symbol number of .dw* symbols. // It doesn't need to know it for each package, one is enough. // currSymSrcFile.csectAux == nil means first package. - ldr.SetSymDynid(loader.Sym(sect.Sym), int32(f.symbolCount)) + ldr.SetSymDynid(sect.Sym, int32(f.symbolCount)) if sect.Name == ".debug_frame" && ctxt.LinkMode != LinkExternal { // CIE size must be added to the first package. @@ -865,7 +865,7 @@ func (f *xcoffFile) writeSymbolFunc(ctxt *Link, x loader.Sym) []xcoffSym { Xsmtyp: XTY_LD, // label definition (based on C) Xauxtype: _AUX_CSECT, } - a4.Xsmtyp |= uint8(xcoffAlign(ldr, x, TextSym) << 3) + a4.Xsmtyp |= xcoffAlign(ldr, x, TextSym) << 3 syms = append(syms, a4) return syms @@ -915,7 +915,7 @@ func putaixsym(ctxt *Link, x loader.Sym, t SymbolType) { Xsmclas: XMC_PR, Xsmtyp: XTY_SD, } - a4.Xsmtyp |= uint8(xcoffAlign(ldr, x, TextSym) << 3) + a4.Xsmtyp |= xcoffAlign(ldr, x, TextSym) << 3 syms = append(syms, a4) } @@ -976,7 +976,7 @@ func putaixsym(ctxt *Link, x loader.Sym, t SymbolType) { a4.Xsmtyp |= XTY_CM } - a4.Xsmtyp |= uint8(xcoffAlign(ldr, x, t) << 3) + a4.Xsmtyp |= xcoffAlign(ldr, x, t) << 3 syms = append(syms, a4) @@ -1375,7 +1375,7 @@ func (f *xcoffFile) writeLdrScn(ctxt *Link, globalOff uint64) { /* Symbol table */ for _, s := range f.loaderSymbols { lds := &XcoffLdSym64{ - Loffset: uint32(stlen + 2), + Loffset: stlen + 2, Lsmtype: s.smtype, Lsmclas: s.smclas, } @@ -1580,7 +1580,7 @@ func xcoffwrite(ctxt *Link) { func asmbXcoff(ctxt *Link) { ctxt.Out.SeekSet(0) fileoff := int64(Segdwarf.Fileoff + Segdwarf.Filelen) - fileoff = int64(Rnd(int64(fileoff), *FlagRound)) + fileoff = Rnd(fileoff, *FlagRound) xfile.sectNameToScnum = make(map[string]int16) @@ -1693,7 +1693,7 @@ func (f *xcoffFile) emitRelocations(ctxt *Link, fileoff int64) { if !ldr.AttrReachable(s) { continue } - if ldr.SymValue(s) >= int64(eaddr) { + if ldr.SymValue(s) >= eaddr { break } @@ -1755,7 +1755,7 @@ dwarfLoop: for i := 0; i < len(Segdwarf.Sections); i++ { sect := Segdwarf.Sections[i] si := dwarfp[i] - if si.secSym() != loader.Sym(sect.Sym) || + if si.secSym() != sect.Sym || ldr.SymSect(si.secSym()) != sect { panic("inconsistency between dwarfp and Segdwarf") } |
