github.com/shogo82148/std@v1.22.1-0.20240327122250-4e474527810c/cmd/compile/internal/objw/objw.go (about)

     1  // Copyright 2009 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package objw
     6  
     7  import (
     8  	"github.com/shogo82148/std/cmd/compile/internal/bitvec"
     9  	"github.com/shogo82148/std/cmd/internal/obj"
    10  )
    11  
    12  // Uint8 writes an unsigned byte v into s at offset off,
    13  // and returns the next unused offset (i.e., off+1).
    14  func Uint8(s *obj.LSym, off int, v uint8) int
    15  
    16  func Uint16(s *obj.LSym, off int, v uint16) int
    17  
    18  func Uint32(s *obj.LSym, off int, v uint32) int
    19  
    20  func Uintptr(s *obj.LSym, off int, v uint64) int
    21  
    22  // Uvarint writes a varint v into s at offset off,
    23  // and returns the next unused offset.
    24  func Uvarint(s *obj.LSym, off int, v uint64) int
    25  
    26  func Bool(s *obj.LSym, off int, v bool) int
    27  
    28  // UintN writes an unsigned integer v of size wid bytes into s at offset off,
    29  // and returns the next unused offset.
    30  func UintN(s *obj.LSym, off int, v uint64, wid int) int
    31  
    32  func SymPtr(s *obj.LSym, off int, x *obj.LSym, xoff int) int
    33  
    34  func SymPtrWeak(s *obj.LSym, off int, x *obj.LSym, xoff int) int
    35  
    36  func SymPtrOff(s *obj.LSym, off int, x *obj.LSym) int
    37  
    38  func SymPtrWeakOff(s *obj.LSym, off int, x *obj.LSym) int
    39  
    40  func Global(s *obj.LSym, width int32, flags int16)
    41  
    42  // BitVec writes the contents of bv into s as sequence of bytes
    43  // in little-endian order, and returns the next unused offset.
    44  func BitVec(s *obj.LSym, off int, bv bitvec.BitVec) int