package attr
import "github.com/mmcloughlin/avo/attr"
Package attr provides attributes for text and data sections.
Index ¶
- type Attribute
- func (a Attribute) Asm() string
- func (a Attribute) ContainsTextFlags() bool
- func (a Attribute) DUPOK() bool
- func (a Attribute) NEEDCTXT() bool
- func (a Attribute) NOFRAME() bool
- func (a Attribute) NOPROF() bool
- func (a Attribute) NOPTR() bool
- func (a Attribute) NOSPLIT() bool
- func (a Attribute) REFLECTMETHOD() bool
- func (a Attribute) RODATA() bool
- func (a Attribute) TLSBSS() bool
- func (a Attribute) TOPFRAME() bool
- func (a Attribute) WRAPPER() bool
Types ¶
type Attribute ¶
type Attribute uint16
Attribute represents TEXT or DATA flags.
const ( // Don't profile the marked routine. This flag is deprecated. NOPROF Attribute = 1 // It is ok for the linker to get multiple of these symbols. It will // pick one of the duplicates to use. DUPOK Attribute = 2 // Don't insert stack check preamble. NOSPLIT Attribute = 4 // Put this data in a read-only section. RODATA Attribute = 8 // This data contains no pointers. NOPTR Attribute = 16 // This is a wrapper function and should not count as disabling 'recover'. WRAPPER Attribute = 32 // This function uses its incoming context register. NEEDCTXT Attribute = 64 // Allocate a word of thread local storage and store the offset from the // thread local base to the thread local storage in this variable. TLSBSS Attribute = 256 // Do not insert instructions to allocate a stack frame for this function. // Only valid on functions that declare a frame size of 0. NOFRAME Attribute = 512 // Function can call reflect.Type.Method or reflect.Type.MethodByName. REFLECTMETHOD Attribute = 1024 // Function is the top of the call stack. Call stack unwinders should stop // at this function. TOPFRAME Attribute = 2048 )
Attribute values defined in textflag.h.
func (Attribute) Asm ¶
Asm returns a representation of the attributes in assembly syntax. This may use macros from "textflags.h"; see ContainsTextFlags() to determine if this header is required.
func (Attribute) ContainsTextFlags ¶
ContainsTextFlags returns whether the Asm() representation requires macros in "textflags.h".
func (Attribute) DUPOK ¶
DUPOK reports whether the DUPOK flag is set.
func (Attribute) NEEDCTXT ¶
NEEDCTXT reports whether the NEEDCTXT flag is set.
func (Attribute) NOFRAME ¶
NOFRAME reports whether the NOFRAME flag is set.
func (Attribute) NOPROF ¶
NOPROF reports whether the NOPROF flag is set.
func (Attribute) NOPTR ¶
NOPTR reports whether the NOPTR flag is set.
func (Attribute) NOSPLIT ¶
NOSPLIT reports whether the NOSPLIT flag is set.
func (Attribute) REFLECTMETHOD ¶
REFLECTMETHOD reports whether the REFLECTMETHOD flag is set.
func (Attribute) RODATA ¶
RODATA reports whether the RODATA flag is set.
func (Attribute) TLSBSS ¶
TLSBSS reports whether the TLSBSS flag is set.
func (Attribute) TOPFRAME ¶
TOPFRAME reports whether the TOPFRAME flag is set.
func (Attribute) WRAPPER ¶
WRAPPER reports whether the WRAPPER flag is set.
Source Files ¶
- Version
- v0.6.0 (latest)
- Published
- Jan 7, 2024
- Platform
- linux/amd64
- Imports
- 3 packages
- Last checked
- 4 weeks ago –
Tools for package owners.