Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 34 for NReloc (0.12 sec)

  1. src/internal/xcoff/file.go

    			continue
    		}
    		c := saferio.SliceCap[Reloc](uint64(sect.Nreloc))
    		if c < 0 {
    			return nil, fmt.Errorf("too many relocs (%d) for section %d", sect.Nreloc, sectNum)
    		}
    		sect.Relocs = make([]Reloc, 0, c)
    		if _, err := sr.Seek(int64(sect.Relptr), io.SeekStart); err != nil {
    			return nil, err
    		}
    		for i := uint32(0); i < sect.Nreloc; i++ {
    			var reloc Reloc
    			switch f.TargetMachine {
    			case U802TOCMAGIC:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 12 14:42:29 UTC 2024
    - 17.3K bytes
    - Viewed (0)
  2. src/debug/macho/file.go

    	sh.sr = io.NewSectionReader(r, int64(sh.Offset), int64(sh.Size))
    	sh.ReaderAt = sh.sr
    
    	if sh.Nreloc > 0 {
    		reldat, err := saferio.ReadDataAt(r, uint64(sh.Nreloc)*8, int64(sh.Reloff))
    		if err != nil {
    			return err
    		}
    		b := bytes.NewReader(reldat)
    
    		bo := f.ByteOrder
    
    		sh.Relocs = make([]Reloc, sh.Nreloc)
    		for i := range sh.Relocs {
    			rel := &sh.Relocs[i]
    
    			var ri relocInfo
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 18 19:33:30 UTC 2023
    - 17.9K bytes
    - Viewed (0)
  3. src/cmd/link/internal/loadmacho/ldmacho.go

    }
    
    func macholoadrel(m *ldMachoObj, sect *ldMachoSect) int {
    	if sect.rel != nil || sect.nreloc == 0 {
    		return 0
    	}
    	rel := make([]ldMachoRel, sect.nreloc)
    	m.f.MustSeek(m.base+int64(sect.reloff), 0)
    	buf, _, err := m.f.Slice(uint64(sect.nreloc * 8))
    	if err != nil {
    		return -1
    	}
    	for i := uint32(0); i < sect.nreloc; i++ {
    		r := &rel[i]
    		p := buf[i*8:]
    		r.addr = m.e.Uint32(p)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 12 18:45:57 UTC 2022
    - 19.1K bytes
    - Viewed (0)
  4. src/cmd/internal/obj/objfile.go

    	}
    	// TODO: hashedrefs unused/unsupported for now
    
    	// Reloc indexes
    	h.Offsets[goobj.BlkRelocIdx] = w.Offset()
    	nreloc := uint32(0)
    	lists := [][]*LSym{ctxt.defs, ctxt.hashed64defs, ctxt.hasheddefs, ctxt.nonpkgdefs}
    	for _, list := range lists {
    		for _, s := range list {
    			w.Uint32(nreloc)
    			nreloc += uint32(len(s.R))
    		}
    	}
    	w.Uint32(nreloc)
    
    	// Symbol Info indexes
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 19:57:43 UTC 2024
    - 24K bytes
    - Viewed (0)
  5. src/cmd/internal/goobj/objfile.go

    }
    
    // Reloc returns a pointer to the j-th relocation of the i-th symbol.
    func (r *Reader) Reloc(i uint32, j int) *Reloc {
    	off := r.RelocOff(i, j)
    	return (*Reloc)(unsafe.Pointer(&r.b[off]))
    }
    
    // Relocs returns a pointer to the relocations of the i-th symbol.
    func (r *Reader) Relocs(i uint32) []Reloc {
    	off := r.RelocOff(i, 0)
    	n := r.NReloc(i)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 19:57:43 UTC 2024
    - 23.8K bytes
    - Viewed (0)
  6. src/cmd/link/internal/ld/macho.go

    )
    
    type MachoHdr struct {
    	cpu    uint32
    	subcpu uint32
    }
    
    type MachoSect struct {
    	name    string
    	segname string
    	addr    uint64
    	size    uint64
    	off     uint32
    	align   uint32
    	reloc   uint32
    	nreloc  uint32
    	flag    uint32
    	res1    uint32
    	res2    uint32
    }
    
    type MachoSeg struct {
    	name       string
    	vsize      uint64
    	vaddr      uint64
    	fileoffset uint64
    	filesize   uint64
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 15:32:53 UTC 2024
    - 43.9K bytes
    - Viewed (0)
  7. src/cmd/link/internal/ld/macho_combine_dwarf.go

    		if sect.Seg != "__DWARF" {
    			continue
    		}
    
    		// As of writing, there are no relocations in dsymutil's output
    		// so there's no point in worrying about them. Bail out if that
    		// changes.
    		if sect.Nreloc != 0 {
    			return nil, nil, nil
    		}
    
    		data, err := sect.Data()
    		if err != nil {
    			return nil, nil, err
    		}
    
    		compressed, contents, err := machoCompressSection(data)
    		if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 18:45:27 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  8. src/cmd/link/internal/amd64/asm.go

    		if targType != sym.SDYNIMPORT {
    			ldr.Errorf(s, "unexpected GOT reloc for non-dynamic symbol %s", ldr.SymName(targ))
    		}
    		ld.AddGotSym(target, ldr, syms, targ, 0)
    		su := ldr.MakeSymbolUpdater(s)
    		su.SetRelocType(rIdx, objabi.R_PCREL)
    		su.SetRelocSym(rIdx, syms.GOT)
    		su.SetRelocAdd(rIdx, r.Add()+int64(ldr.SymGot(targ)))
    		return true
    	}
    
    	// Reread the reloc to incorporate any changes in type above.
    	relocs := ldr.Relocs(s)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 23 05:58:20 UTC 2023
    - 21K bytes
    - Viewed (0)
  9. src/cmd/link/internal/loader/loader_test.go

    			return false
    		}
    	}
    	return true
    }
    
    type addFunc func(l *Loader, s Sym, s2 Sym) Sym
    
    func mkReloc(l *Loader, typ objabi.RelocType, off int32, siz uint8, add int64, sym Sym) Reloc {
    	r := Reloc{&goobj.Reloc{}, l.extReader, l}
    	r.SetType(typ)
    	r.SetOff(off)
    	r.SetSiz(siz)
    	r.SetAdd(add)
    	r.SetSym(sym)
    	return r
    }
    
    func TestAddDataMethods(t *testing.T) {
    	ldr := mkLoader()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 07 19:08:09 UTC 2024
    - 12K bytes
    - Viewed (0)
  10. src/cmd/link/internal/arm64/asm.go

    		su.SetRelocAdd(rIdx, int64(ldr.SymGot(targ)))
    		return true
    	}
    
    	// Reread the reloc to incorporate any changes in type above.
    	relocs := ldr.Relocs(s)
    	r = relocs.At(rIdx)
    
    	switch r.Type() {
    	case objabi.R_CALLARM64:
    		if targType != sym.SDYNIMPORT {
    			// nothing to do, the relocation will be laid out in reloc
    			return true
    		}
    		if target.IsExternal() {
    			// External linker will do this relocation.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 30 20:09:45 UTC 2024
    - 47K bytes
    - Viewed (0)
Back to top