Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for SetABI (0.13 sec)

  1. src/cmd/internal/goobj/objfile_test.go

    func TestReadWrite(t *testing.T) {
    	// Test that we get the same data in a write-read roundtrip.
    
    	// Write a symbol, a relocation, and an aux info.
    	var buf bytes.Buffer
    	w := dummyWriter(&buf)
    
    	var s Sym
    	s.SetABI(1)
    	s.SetType(uint8(objabi.STEXT))
    	s.SetFlag(0x12)
    	s.SetSiz(12345)
    	s.SetAlign(8)
    	s.Write(w)
    
    	var r Reloc
    	r.SetOff(12)
    	r.SetSiz(4)
    	r.SetType(uint16(objabi.R_ADDR))
    	r.SetAdd(54321)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 15 20:22:12 UTC 2022
    - 3K bytes
    - Viewed (0)
  2. src/cmd/internal/obj/sym.go

    	case ABI0:
    		hash = ctxt.hash
    	case ABIInternal:
    		hash = ctxt.funchash
    	default:
    		panic("unknown ABI")
    	}
    
    	ctxt.hashmu.Lock()
    	s := hash[name]
    	if s == nil {
    		s = &LSym{Name: name}
    		s.SetABI(abi)
    		hash[name] = s
    		if init != nil {
    			init(s)
    		}
    	}
    	ctxt.hashmu.Unlock()
    	return s
    }
    
    // Lookup looks up the symbol with name name.
    // If it does not exist, it creates it.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 14:41:10 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  3. src/cmd/internal/obj/link.go

    			v &^= flag
    		}
    		if atomic.CompareAndSwapUint32((*uint32)(a), uint32(v0), uint32(v)) {
    			break
    		}
    	}
    }
    
    func (a *Attribute) ABI() ABI { return ABI(a.load() / attrABIBase) }
    func (a *Attribute) SetABI(abi ABI) {
    	const mask = 1 // Only one ABI bit for now.
    	for {
    		v0 := a.load()
    		v := (v0 &^ (mask * attrABIBase)) | Attribute(abi)*attrABIBase
    		if atomic.CompareAndSwapUint32((*uint32)(a), uint32(v0), uint32(v)) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 19:57:43 UTC 2024
    - 33.1K bytes
    - Viewed (0)
  4. src/cmd/internal/obj/objfile.go

    			default:
    				align = 1
    			}
    		}
    	}
    	if s.Size > cutoff {
    		w.ctxt.Diag("%s: symbol too large (%d bytes > %d bytes)", s.Name, s.Size, cutoff)
    	}
    	o := &w.tmpSym
    	o.SetName(name, w.Writer)
    	o.SetABI(abi)
    	o.SetType(uint8(s.Type))
    	o.SetFlag(flag)
    	o.SetFlag2(flag2)
    	o.SetSiz(uint32(s.Size))
    	o.SetAlign(align)
    	o.Write(w.Writer)
    }
    
    func (w *writer) Hash64(s *LSym) {
    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

    func (s *Sym) SetName(x string, w *Writer) {
    	binary.LittleEndian.PutUint32(s[:], uint32(len(x)))
    	binary.LittleEndian.PutUint32(s[4:], w.stringOff(x))
    }
    
    func (s *Sym) SetABI(x uint16)   { binary.LittleEndian.PutUint16(s[8:], x) }
    func (s *Sym) SetType(x uint8)   { s[10] = x }
    func (s *Sym) SetFlag(x uint8)   { s[11] = x }
    func (s *Sym) SetFlag2(x uint8)  { s[12] = x }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 19:57:43 UTC 2024
    - 23.8K bytes
    - Viewed (0)
Back to top