Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 95 for relocfn (0.17 sec)

  1. src/cmd/link/internal/ld/pe.go

    			// to stream out.
    			relocs := ldr.Relocs(s)
    			for ri := 0; ri < relocs.Count(); ri++ {
    				r := relocs.At(ri)
    				rr, ok := extreloc(ctxt, ldr, s, r)
    				if !ok {
    					continue
    				}
    				if rr.Xsym == 0 {
    					ctxt.Errorf(s, "missing xsym in relocation")
    					continue
    				}
    				if ldr.SymDynid(rr.Xsym) < 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 09 19:01:27 UTC 2023
    - 48.8K bytes
    - Viewed (0)
  2. src/internal/pkgbits/decoder.go

    	}
    
    	r.Data.Reset(pr.DataIdx(k, idx))
    	r.Sync(SyncRelocs)
    	l := r.Len()
    	if cap(pr.scratchRelocEnt) >= l {
    		r.Relocs = pr.scratchRelocEnt[:l]
    		pr.scratchRelocEnt = nil
    	} else {
    		r.Relocs = make([]RelocEnt, l)
    	}
    	for i := range r.Relocs {
    		r.Sync(SyncReloc)
    		r.Relocs[i] = RelocEnt{RelocKind(r.Len()), Index(r.Len())}
    	}
    
    	return r
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 27 20:58:46 UTC 2022
    - 13.2K bytes
    - Viewed (0)
  3. src/internal/pkgbits/reloc.go

    type RelocKind int32
    
    // An Index represents a bitstream element index within a particular
    // section.
    type Index int32
    
    // A relocEnt (relocation entry) is an entry in an element's local
    // reference table.
    //
    // TODO(mdempsky): Rename this too.
    type RelocEnt struct {
    	Kind RelocKind
    	Idx  Index
    }
    
    // Reserved indices within the meta relocation section.
    const (
    	PublicRootIdx  Index = 0
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 10 22:22:48 UTC 2022
    - 835 bytes
    - Viewed (0)
  4. src/internal/pkgbits/encoder.go

    	w.rawUvarint(ux)
    }
    
    func (w *Encoder) rawReloc(r RelocKind, idx Index) int {
    	e := RelocEnt{r, idx}
    	if w.RelocMap != nil {
    		if i, ok := w.RelocMap[e]; ok {
    			return int(i)
    		}
    	} else {
    		w.RelocMap = make(map[RelocEnt]uint32)
    	}
    
    	i := len(w.Relocs)
    	w.RelocMap[e] = uint32(i)
    	w.Relocs = append(w.Relocs, e)
    	return i
    }
    
    func (w *Encoder) Sync(m SyncMarker) {
    	if !w.p.SyncMarkers() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 10 23:26:58 UTC 2022
    - 9.6K bytes
    - Viewed (0)
  5. src/internal/xcoff/file.go

    				rel := new(Reloc32)
    				if err := binary.Read(sr, binary.BigEndian, rel); err != nil {
    					return nil, err
    				}
    				reloc.VirtualAddress = uint64(rel.Rvaddr)
    				reloc.Symbol = idxToSym[int(rel.Rsymndx)]
    				reloc.Type = rel.Rtype
    				reloc.Length = rel.Rsize&0x3F + 1
    
    				if rel.Rsize&0x80 != 0 {
    					reloc.Signed = true
    				}
    				if rel.Rsize&0x40 != 0 {
    					reloc.InstructionFixed = true
    				}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 12 14:42:29 UTC 2024
    - 17.3K bytes
    - Viewed (0)
  6. src/cmd/internal/goobj/objfile.go

    	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)
    	return (*[huge]Reloc)(unsafe.Pointer(&r.b[off]))[:n:n]
    }
    
    // NAux returns the number of aux symbols of the i-th symbol.
    func (r *Reader) NAux(i uint32) int {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 19:57:43 UTC 2024
    - 23.8K bytes
    - Viewed (0)
  7. src/debug/macho/file.go

    	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
    			if err := binary.Read(b, bo, &ri); err != nil {
    				return err
    			}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 18 19:33:30 UTC 2023
    - 17.9K bytes
    - Viewed (0)
  8. src/cmd/link/internal/loader/loader.go

    	}
    }
    
    func (relocs *Relocs) Count() int { return len(relocs.rs) }
    
    // At returns the j-th reloc for a global symbol.
    func (relocs *Relocs) At(j int) Reloc {
    	if relocs.l.isExtReader(relocs.r) {
    		return Reloc{&relocs.rs[j], relocs.r, relocs.l}
    	}
    	return Reloc{&relocs.rs[j], relocs.r, relocs.l}
    }
    
    // Relocs returns a Relocs object for the given global sym.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 20:26:10 UTC 2024
    - 81.5K bytes
    - Viewed (0)
  9. src/debug/pe/section.go

    	if err != nil {
    		return nil, fmt.Errorf("fail to seek to %q section relocations: %v", sh.Name, err)
    	}
    	relocs := make([]Reloc, sh.NumberOfRelocations)
    	err = binary.Read(r, binary.LittleEndian, relocs)
    	if err != nil {
    		return nil, fmt.Errorf("fail to read section relocations: %v", err)
    	}
    	return relocs, nil
    }
    
    // SectionHeader is similar to [SectionHeader32] with Name
    // field replaced by Go string.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 18 19:33:30 UTC 2023
    - 3.5K bytes
    - Viewed (0)
  10. src/cmd/link/internal/riscv64/asm.go

    func findHI20Reloc(ldr *loader.Loader, s loader.Sym, val int64) *loader.Reloc {
    	outer := ldr.OuterSym(s)
    	if outer == 0 {
    		return nil
    	}
    	relocs := ldr.Relocs(outer)
    	start := sort.Search(relocs.Count(), func(i int) bool { return ldr.SymValue(outer)+int64(relocs.At(i).Off()) >= val })
    	for idx := start; idx < relocs.Count(); idx++ {
    		r := relocs.At(idx)
    		if ldr.SymValue(outer)+int64(r.Off()) != val {
    			break
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 01 08:06:08 UTC 2024
    - 22.8K bytes
    - Viewed (0)
Back to top