package xcoff
Import Path
internal/xcoff (on go.dev)
Dependency Relation
imports 9 packages, and imported by 2 packages
Involved Source Files
ar.go
Package xcoff implements access to XCOFF (Extended Common Object File Format) files.
xcoff.go
Package-Level Type Names (total 31)
Archive represents an open AIX big archive.
ArchiveHeader ArchiveHeader
Members []*Member
Close closes the Archive.
If the Archive was created using NewArchive directly instead of OpenArchive,
Close has no effect.
GetFile returns the XCOFF file defined by member name.
FIXME: This doesn't work if an archive has two members with the same
name which can occur if an archive has both 32-bits and 64-bits files.
*Archive : io.Closer
func NewArchive(r io.ReaderAt) (*Archive, error)
func OpenArchive(name string) (*Archive, error)
ArchiveHeader holds information about a big archive file header
csect Auxiliary Entry.
// Offset of parameter type-check string
// Length or symbol table index
// Storage-mapping class
// Symbol alignment and type
// .typchk section number
// Reserved
// Reserved
// Type of auxiliary entry
// Unused
// Offset of parameter type-check string
// Upper 4 bytes of length or symbol table index
// Lower 4 bytes of length or symbol table index
// Storage-mapping class
// Symbol alignment and type
// .typchk section number
Function Auxiliary Entry
// Symbol table index of next entry
// File offset to exception table entry
// Size of function in bytes
// File pointer to line number
// Unused
// Type of auxiliary entry
// Symbol table index of next entry
// Size of function in bytes
// File pointer to line number
// Unused
File Auxiliary Entry
// Type of auxiliary entry
// Name or offset inside string table
// Source file string type
AuxiliaryCSect holds information about an XCOFF symbol in an AUX_CSECT entry.
Length int64
StorageMappingClass int
SymbolType int
// Type of auxiliary entry
// Num RLDs
// section length
A File represents an open XCOFF file.
FileHeader FileHeader
FileHeader.TargetMachine uint16
LibraryPaths []string
Sections []*Section
StringTable []byte
Symbols []*Symbol
CSect reads and returns the contents of a csect.
Close closes the File.
If the File was created using NewFile directly instead of Open,
Close has no effect.
(*File) DWARF() (*dwarf.Data, error)
ImportedLibraries returns the names of all libraries
referred to by the binary f that are expected to be
linked with the binary at dynamic link time.
ImportedSymbols returns the names of all symbols
referred to by the binary f that are expected to be
satisfied by other libraries at dynamic load time.
It does not return weak symbols.
Section returns the first section with the given name, or nil if no such
section exists.
Xcoff have section's name limited to 8 bytes. Some sections like .gosymtab
can be trunked but this method will still find them.
SectionByType returns the first section in f with the
given type, or nil if there is no such section.
*File : io.Closer
func NewFile(r io.ReaderAt) (*File, error)
func Open(name string) (*File, error)
func (*Archive).GetFile(name string) (*File, error)
FileHeader holds information about an XCOFF file header.
TargetMachine uint16
File Header.
// Flags
// Target machine
// Number of sections
// Number of entries in symbol table
// Number of bytes in optional header
// Byte offset to symbol table start
// Time and date of file creation
// Flags
// Target machine
// Number of sections
// Number of entries in symbol table
// Number of bytes in optional header
// Byte offset to symbol table start
// Time and date of file creation
ImportedSymbol holds information about an imported XCOFF symbol.
Library string
Name string
func (*File).ImportedSymbols() ([]ImportedSymbol, error)
Loader Header.
// Offset to start of import file IDs
// Length of import file ID string table
// Number of import file IDs
// Number of relocation table entries
// Number of symbol table entries
// Length of string table
// Offset to start of string table
// Loader section version number
// Offset to start of import file IDs
// Length of import file ID string table
// Number of import file IDs
// Number of relocation table entries
// Number of symbol table entries
// Offset to start of relocation entries
// Length of string table
// Offset to start of string table
// Offset to start of symbol table
// Loader section version number
Loader Symbol.
// Import file ID; ordinal of import file IDs
// Symbol name or byte offset into string table
// Parameter type-check field
// Section number containing symbol
// Symbol storage class
// Symbol type, export, import flags
// Address field
// Import file ID; ordinal of import file IDs
// Byte offset into string table of symbol name
// Parameter type-check field
// Section number containing symbol
// Symbol storage class
// Symbol type, export, import flags
// Address field
Member represents a member of an AIX big archive.
MemberHeader MemberHeader
MemberHeader.Name string
MemberHeader.Size uint64
// Sign and reloc bit len
// Index into symbol table
// Toc relocation type
// (virtual) address of reference
// Sign and reloc bit len
// Index into symbol table
// Toc relocation type
// (virtual) address of reference
ReaderAt io.ReaderAt
Relocs []Reloc
SectionHeader SectionHeader
SectionHeader.Name string
SectionHeader.Nreloc uint32
SectionHeader.Relptr uint64
SectionHeader.Size uint64
SectionHeader.Type uint32
SectionHeader.VirtualAddress uint64
Data reads and returns the contents of the XCOFF section s.
( Section) ReadAt(p []byte, off int64) (n int, err error)
Section : io.ReaderAt
func (*File).Section(name string) *Section
func (*File).SectionByType(typ uint32) *Section
SectionHeader holds information about an XCOFF section header.
Name string
Nreloc uint32
Relptr uint64
Size uint64
Type uint32
VirtualAddress uint64
Section Header.
// Flags to define the section type
// Offset in file to line number entries for section
// Section name
// Number of line number entries
// Number of relocation entries
// Physical address
// Offset in file to relocation entries for section
// Offset in file to raw data for section
// Section size
// Virtual address
// Flags to define the section type
// Offset in file to line number entries for section
// Section name
// Number of line number entries
// Number of relocation entries
// Needs to be 72 bytes long
// Physical address
// Offset in file to relocation entries for section
// Offset in file to raw data for section
// Section size
// Virtual address
AuxCSect AuxiliaryCSect
AuxFcn AuxiliaryFcn
Name string
SectionNumber int
StorageClass int
Value uint64
Symbol Table Entry.
// Symbol name
// Number of auxiliary entries
// Storage class of symbol
// Section number of symbol
// Basic and derived type specification
// Symbol value
// Number of auxiliary entries
// Offset of the name in string table or .debug section
// Storage class of symbol
// Section number of symbol
// Basic and derived type specification
// Symbol value
Package-Level Functions (total 4)
NewArchive creates a new Archive for accessing an AIX big archive in an underlying reader.
NewFile creates a new File for accessing an XCOFF binary in an underlying reader.
Open opens the named file using os.Open and prepares it for use as an XCOFF binary.
OpenArchive opens the named archive using os.Open and prepares it for use
as an AIX big archive.
Package-Level Constants (total 131)
const AIAFMAG = "`\n" const AIAMAG = "\n" const AIAMAGBIG = "\n" const AR_HSZ_BIG = 112
Storage Class.
Storage Class.
Storage Class.
Storage Class.
Storage Class.
Storage Class.
Storage Class.
Storage Class.
Storage Class.
Storage Class.
Storage Class.
Storage Class.
Storage Class.
Storage Class.
Storage Class.
Storage Class.
Storage Class.
Storage Class.
Storage Class.
Storage Class.
Storage Class.
Storage Class.
Storage Class.
Storage Class.
Storage Class.
Storage Class.
Storage Class.
Flags that describe the type of the object file.
Flags that describe the type of the object file.
Flags that describe the type of the object file.
Flags that describe the type of the object file.
Flags that describe the type of the object file.
Flags that describe the type of the object file.
Flags that describe the type of the object file.
Flags that describe the type of the object file.
Flags that describe the type of the object file.
Flags that describe the type of the object file.
const FILHSZ_32 = 20 const FILHSZ_64 = 24
Sizeof
const LDHDRSZ_32 = 32 const LDHDRSZ_64 = 56 const N_ABS = -1
Nscnum
const N_UNDEF = 0 const R_BA = 8 // A(sym) Branch absolute. Cannot modify instruction const R_BR = 10 // A(sym-*) Branch rel to self. non modifiable const R_GL = 5 // A(external TOC of sym) Global Linkage const R_NEG = 1 // -A(sym) Negative Relocation const R_POS = 0 // A(sym) Positive Relocation const R_RBA = 24 // A(sym) Branch absolute. modifiable instruction const R_RBR = 26 // A(sym-*) Branch rel to self. modifiable instr const R_REF = 15 // AL0(sym) Non relocating ref. No garbage collect const R_REL = 2 // A(sym-*) Relative to self const R_RL = 12 // A(sym) Pos indirect load. modifiable instruction const R_RLA = 13 // A(sym) Pos Load Address. modifiable instruction const R_TCL = 6 // A(local TOC of sym) Local object TOC address const R_TLS = 32 // General-dynamic reference to TLS symbol const R_TLS_IE = 33 // Initial-exec reference to TLS symbol const R_TLS_LD = 34 // Local-dynamic reference to TLS symbol const R_TLS_LE = 35 // Local-exec reference to TLS symbol const R_TLSM = 36 // Module reference to TLS symbol const R_TLSML = 37 // Module reference to local (own) module const R_TOC = 3 // A(sym-TOC) Relative to TOC const R_TOCL = 49 // Relative to TOC - low order bits const R_TOCU = 48 // Relative to TOC - high order bits const R_TRL = 18 // A(sym-TOC) TOC Relative indirect load. const R_TRLA = 19 // A(sym-TOC) TOC Rel load address. modifiable inst const SAIAMAG = 8 const SSUBTYP_DWABREV = 393216 // DWARF abbreviation section const SSUBTYP_DWARNGE = 327680 // DWARF aranges section const SSUBTYP_DWFRAME = 655360 // DWARF frames section const SSUBTYP_DWINFO = 65536 // DWARF info section const SSUBTYP_DWLINE = 131072 // DWARF line-number section const SSUBTYP_DWLOC = 589824 // DWARF location lists section const SSUBTYP_DWMAC = 720896 // DWARF macros section const SSUBTYP_DWPBNMS = 196608 // DWARF public names section const SSUBTYP_DWPBTYP = 262144 // DWARF public types section const SSUBTYP_DWRNGES = 524288 // DWARF ranges section const SSUBTYP_DWSTR = 458752 // DWARF strings section
Flags defining the section type.
Flags defining the section type.
Flags defining the section type.
Flags defining the section type.
Flags defining the section type.
Flags defining the section type.
Flags defining the section type.
Flags defining the section type.
Flags defining the section type.
Flags defining the section type.
Flags defining the section type.
Flags defining the section type.
const SYM_TYPE_FUNC = 32 // is function const SYM_V_EXPORTED = 16384 const SYM_V_HIDDEN = 8192
Ntype
const SYM_V_PROTECTED = 12288 const SYMESZ = 18 const U64_TOCMAGIC = 503 // AIX 64-bit XCOFF const U802TOCMAGIC = 479 // AIX 32-bit XCOFF
Defines for File auxiliary definitions: x_ftype field of x_file
Defines for File auxiliary definitions: x_ftype field of x_file
Defines for File auxiliary definitions: x_ftype field of x_file
Defines for File auxiliary definitions: x_ftype field of x_file
Storage-mapping class.
Storage-mapping class.
Storage-mapping class.
Storage-mapping class.
Storage-mapping class.
Storage-mapping class.
Storage-mapping class.
Storage-mapping class.
Storage-mapping class.
Storage-mapping class.
Storage-mapping class.
Storage-mapping class.
Storage-mapping class.
Storage-mapping class.
Storage-mapping class.
Storage-mapping class.
Storage-mapping class.
Storage-mapping class.
Storage-mapping class.
Symbol type field.
Symbol type field.
Symbol type field.
Symbol type field.
The pages are generated with Golds v0.7.0-preview. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |