rocm.bindings.llvm.c.object#
2026-09-24
13 min read time
Advanced Micro Devices, Inc.
Attributes#
Classes#
(No short description) |
|
(No short description) |
|
(No short description) |
|
(No short description) |
|
(No short description) |
Functions#
|
|
|
Create a binary file from the given memory buffer. |
Dispose of a binary file. |
|
Retrieves a copy of the memory buffer associated with this object file. |
|
Retrieve the specific type of a binary. |
|
|
For a Mach-O universal binary file, retrieves the object file corresponding |
Retrieve a copy of the section iterator for this object file. |
|
Returns whether the given section iterator is at the end. |
|
Retrieve a copy of the symbol iterator for this object file. |
|
Returns whether the given symbol iterator is at the end. |
|
Returns whether the given symbol iterator is at the end. |
|
Returns whether the given symbol iterator is at the end. |
|
|
Returns whether the given symbol iterator is at the end. |
// ObjectFile Symbol iterators |
|
// ObjectFile Symbol iterators |
|
// SectionRef accessors |
|
// SectionRef accessors |
|
// SectionRef accessors |
|
// SectionRef accessors |
|
|
// SectionRef accessors |
|
// Section Relocation iterators |
// Section Relocation iterators |
|
|
// Section Relocation iterators |
// Section Relocation iterators |
|
// SymbolRef accessors |
|
// SymbolRef accessors |
|
// SymbolRef accessors |
|
// RelocationRef accessors |
|
// RelocationRef accessors |
|
// RelocationRef accessors |
|
// following functions. |
|
// following functions. |
|
|
Deprecated: Use LLVMCreateBinary instead. |
|
Deprecated: Use LLVMDisposeBinary instead. |
|
Deprecated: Use LLVMObjectFileCopySectionIterator instead. |
|
Deprecated: Use LLVMObjectFileIsSectionIteratorAtEnd instead. |
|
Deprecated: Use LLVMObjectFileCopySymbolIterator instead. |
|
Deprecated: Use LLVMObjectFileIsSymbolIteratorAtEnd instead. |
Module Contents#
- class rocm.bindings.llvm.c.object.LLVMOpaqueSectionIterator(*args, **kwargs)#
Bases:
rocm.bindings.util.types.Pointer(No short description)
- rocm.bindings.llvm.c.object.LLVMSectionIteratorRef#
- class rocm.bindings.llvm.c.object.LLVMOpaqueSymbolIterator(*args, **kwargs)#
Bases:
rocm.bindings.util.types.Pointer(No short description)
- rocm.bindings.llvm.c.object.LLVMSymbolIteratorRef#
- class rocm.bindings.llvm.c.object.LLVMOpaqueRelocationIterator(*args, **kwargs)#
Bases:
rocm.bindings.util.types.Pointer(No short description)
- rocm.bindings.llvm.c.object.LLVMRelocationIteratorRef#
- class rocm.bindings.llvm.c.object.LLVMBinaryType#
Bases:
enum.IntEnum(No short description)
- rocm.bindings.llvm.c.object.LLVMCreateBinary(MemBuf, Context, ErrorMessage)#
Create a binary file from the given memory buffer.
The exact type of the binary file will be inferred automatically, and the appropriate implementation selected. The context may be NULL except if the resulting file is an LLVM IR file.
The memory buffer is not consumed by this function. It is the responsibility of the caller to free it with
LLVMDisposeMemoryBuffer.If NULL is returned, the
ErrorMessageparameter is populated with the error’s description. It is then the caller’s responsibility to free this message by callingLLVMDisposeMessage.- See:
llvm::object::createBinary
- Args:
- Returns:
None: (undocumented)
C signature
LLVMBinaryRef LLVMCreateBinary(LLVMMemoryBufferRef MemBuf, LLVMContextRef Context, char ** ErrorMessage)
- rocm.bindings.llvm.c.object.LLVMDisposeBinary(BR)#
Dispose of a binary file.
The binary file does not own its backing buffer. It is the responsibility of the caller to free it with
LLVMDisposeMemoryBuffer.C signature
void LLVMDisposeBinary(LLVMBinaryRef BR)
- rocm.bindings.llvm.c.object.LLVMBinaryCopyMemoryBuffer(BR)#
Retrieves a copy of the memory buffer associated with this object file.
The returned buffer is merely a shallow copy and does not own the actual backing buffer of the binary. Nevertheless, it is the responsibility of the caller to free it with
LLVMDisposeMemoryBuffer.- See:
llvm::object::getMemoryBufferRef
- Args:
- Returns:
None: (undocumented)
C signature
LLVMMemoryBufferRef LLVMBinaryCopyMemoryBuffer(LLVMBinaryRef BR)
- rocm.bindings.llvm.c.object.LLVMBinaryGetType(BR)#
Retrieve the specific type of a binary.
- See:
llvm::object::Binary::getType
- Args:
- Returns:
LLVMBinaryType: (undocumented)
C signature
LLVMBinaryType LLVMBinaryGetType(LLVMBinaryRef BR)
- rocm.bindings.llvm.c.object.LLVMMachOUniversalBinaryCopyObjectForArch(BR, Arch, ArchLen, ErrorMessage)#
For a Mach-O universal binary file, retrieves the object file corresponding to the given architecture if it is present as a slice.
If NULL is returned, the
ErrorMessageparameter is populated with the error’s description. It is then the caller’s responsibility to free this message by callingLLVMDisposeMessage.It is the responsiblity of the caller to free the returned object file by calling
LLVMDisposeBinary.- Args:
- Returns:
None: (undocumented)
C signature
LLVMBinaryRef LLVMMachOUniversalBinaryCopyObjectForArch(LLVMBinaryRef BR, const char * Arch, size_t ArchLen, char ** ErrorMessage)
- rocm.bindings.llvm.c.object.LLVMObjectFileCopySectionIterator(BR)#
Retrieve a copy of the section iterator for this object file.
If there are no sections, the result is NULL.
The returned iterator is merely a shallow copy. Nevertheless, it is the responsibility of the caller to free it with
LLVMDisposeSectionIterator.C signature
LLVMSectionIteratorRef LLVMObjectFileCopySectionIterator(LLVMBinaryRef BR)
- rocm.bindings.llvm.c.object.LLVMObjectFileIsSectionIteratorAtEnd(BR, SI)#
Returns whether the given section iterator is at the end.
- See:
llvm::object::section_end
- Args:
- BR (
Pointer/object): (undocumented)
- SI (
LLVMOpaqueSectionIterator/object): (undocumented)
- BR (
- Returns:
int: (undocumented)
C signature
LLVMBool LLVMObjectFileIsSectionIteratorAtEnd(LLVMBinaryRef BR, LLVMSectionIteratorRef SI)
- rocm.bindings.llvm.c.object.LLVMObjectFileCopySymbolIterator(BR)#
Retrieve a copy of the symbol iterator for this object file.
If there are no symbols, the result is NULL.
The returned iterator is merely a shallow copy. Nevertheless, it is the responsibility of the caller to free it with
LLVMDisposeSymbolIterator.C signature
LLVMSymbolIteratorRef LLVMObjectFileCopySymbolIterator(LLVMBinaryRef BR)
- rocm.bindings.llvm.c.object.LLVMObjectFileIsSymbolIteratorAtEnd(BR, SI)#
Returns whether the given symbol iterator is at the end.
- See:
llvm::object::symbol_end
- Args:
- BR (
Pointer/object): (undocumented)
- SI (
LLVMOpaqueSymbolIterator/object): (undocumented)
- BR (
- Returns:
int: (undocumented)
C signature
LLVMBool LLVMObjectFileIsSymbolIteratorAtEnd(LLVMBinaryRef BR, LLVMSymbolIteratorRef SI)
- rocm.bindings.llvm.c.object.LLVMDisposeSectionIterator(SI)#
Returns whether the given symbol iterator is at the end.
- See:
llvm::object::symbol_end
- Args:
- SI (
LLVMOpaqueSectionIterator/object): (undocumented)
- SI (
C signature
void LLVMDisposeSectionIterator(LLVMSectionIteratorRef SI)
- rocm.bindings.llvm.c.object.LLVMMoveToNextSection(SI)#
Returns whether the given symbol iterator is at the end.
- See:
llvm::object::symbol_end
- Args:
- SI (
LLVMOpaqueSectionIterator/object): (undocumented)
- SI (
C signature
void LLVMMoveToNextSection(LLVMSectionIteratorRef SI)
- rocm.bindings.llvm.c.object.LLVMMoveToContainingSection(Sect, Sym)#
Returns whether the given symbol iterator is at the end.
- See:
llvm::object::symbol_end
- Args:
- Sect (
LLVMOpaqueSectionIterator/object): (undocumented)
- Sym (
LLVMOpaqueSymbolIterator/object): (undocumented)
- Sect (
C signature
void LLVMMoveToContainingSection(LLVMSectionIteratorRef Sect, LLVMSymbolIteratorRef Sym)
- rocm.bindings.llvm.c.object.LLVMDisposeSymbolIterator(SI)#
// ObjectFile Symbol iterators
- Args:
- SI (
LLVMOpaqueSymbolIterator/object): (undocumented)
- SI (
C signature
void LLVMDisposeSymbolIterator(LLVMSymbolIteratorRef SI)
- rocm.bindings.llvm.c.object.LLVMMoveToNextSymbol(SI)#
// ObjectFile Symbol iterators
- Args:
- SI (
LLVMOpaqueSymbolIterator/object): (undocumented)
- SI (
C signature
void LLVMMoveToNextSymbol(LLVMSymbolIteratorRef SI)
- rocm.bindings.llvm.c.object.LLVMGetSectionName(SI)#
// SectionRef accessors
- Args:
- SI (
LLVMOpaqueSectionIterator/object): (undocumented)
- SI (
- Returns:
bytes: (undocumented)
C signature
const char * LLVMGetSectionName(LLVMSectionIteratorRef SI)
- rocm.bindings.llvm.c.object.LLVMGetSectionSize(SI)#
// SectionRef accessors
- Args:
- SI (
LLVMOpaqueSectionIterator/object): (undocumented)
- SI (
- Returns:
int: (undocumented)
C signature
uint64_t LLVMGetSectionSize(LLVMSectionIteratorRef SI)
- rocm.bindings.llvm.c.object.LLVMGetSectionContents(SI)#
// SectionRef accessors
- Args:
- SI (
LLVMOpaqueSectionIterator/object): (undocumented)
- SI (
- Returns:
bytes: (undocumented)
C signature
const char * LLVMGetSectionContents(LLVMSectionIteratorRef SI)
- rocm.bindings.llvm.c.object.LLVMGetSectionAddress(SI)#
// SectionRef accessors
- Args:
- SI (
LLVMOpaqueSectionIterator/object): (undocumented)
- SI (
- Returns:
int: (undocumented)
C signature
uint64_t LLVMGetSectionAddress(LLVMSectionIteratorRef SI)
- rocm.bindings.llvm.c.object.LLVMGetSectionContainsSymbol(SI, Sym)#
// SectionRef accessors
- Args:
- SI (
LLVMOpaqueSectionIterator/object): (undocumented)
- Sym (
LLVMOpaqueSymbolIterator/object): (undocumented)
- SI (
- Returns:
int: (undocumented)
C signature
LLVMBool LLVMGetSectionContainsSymbol(LLVMSectionIteratorRef SI, LLVMSymbolIteratorRef Sym)
- rocm.bindings.llvm.c.object.LLVMGetRelocations(Section)#
// Section Relocation iterators
- Args:
- Section (
LLVMOpaqueSectionIterator/object): (undocumented)
- Section (
- Returns:
None: (undocumented)
C signature
LLVMRelocationIteratorRef LLVMGetRelocations(LLVMSectionIteratorRef Section)
- rocm.bindings.llvm.c.object.LLVMDisposeRelocationIterator(RI)#
// Section Relocation iterators
- Args:
- RI (
LLVMOpaqueRelocationIterator/object): (undocumented)
- RI (
C signature
void LLVMDisposeRelocationIterator(LLVMRelocationIteratorRef RI)
- rocm.bindings.llvm.c.object.LLVMIsRelocationIteratorAtEnd(Section, RI)#
// Section Relocation iterators
- Args:
- Section (
LLVMOpaqueSectionIterator/object): (undocumented)
- RI (
LLVMOpaqueRelocationIterator/object): (undocumented)
- Section (
- Returns:
int: (undocumented)
C signature
LLVMBool LLVMIsRelocationIteratorAtEnd(LLVMSectionIteratorRef Section, LLVMRelocationIteratorRef RI)
- rocm.bindings.llvm.c.object.LLVMMoveToNextRelocation(RI)#
// Section Relocation iterators
- Args:
- RI (
LLVMOpaqueRelocationIterator/object): (undocumented)
- RI (
C signature
void LLVMMoveToNextRelocation(LLVMRelocationIteratorRef RI)
- rocm.bindings.llvm.c.object.LLVMGetSymbolName(SI)#
// SymbolRef accessors
- Args:
- SI (
LLVMOpaqueSymbolIterator/object): (undocumented)
- SI (
- Returns:
bytes: (undocumented)
C signature
const char * LLVMGetSymbolName(LLVMSymbolIteratorRef SI)
- rocm.bindings.llvm.c.object.LLVMGetSymbolAddress(SI)#
// SymbolRef accessors
- Args:
- SI (
LLVMOpaqueSymbolIterator/object): (undocumented)
- SI (
- Returns:
int: (undocumented)
C signature
uint64_t LLVMGetSymbolAddress(LLVMSymbolIteratorRef SI)
- rocm.bindings.llvm.c.object.LLVMGetSymbolSize(SI)#
// SymbolRef accessors
- Args:
- SI (
LLVMOpaqueSymbolIterator/object): (undocumented)
- SI (
- Returns:
int: (undocumented)
C signature
uint64_t LLVMGetSymbolSize(LLVMSymbolIteratorRef SI)
- rocm.bindings.llvm.c.object.LLVMGetRelocationOffset(RI)#
// RelocationRef accessors
- Args:
- RI (
LLVMOpaqueRelocationIterator/object): (undocumented)
- RI (
- Returns:
int: (undocumented)
C signature
uint64_t LLVMGetRelocationOffset(LLVMRelocationIteratorRef RI)
- rocm.bindings.llvm.c.object.LLVMGetRelocationSymbol(RI)#
// RelocationRef accessors
- Args:
- RI (
LLVMOpaqueRelocationIterator/object): (undocumented)
- RI (
- Returns:
None: (undocumented)
C signature
LLVMSymbolIteratorRef LLVMGetRelocationSymbol(LLVMRelocationIteratorRef RI)
- rocm.bindings.llvm.c.object.LLVMGetRelocationType(RI)#
// RelocationRef accessors
- Args:
- RI (
LLVMOpaqueRelocationIterator/object): (undocumented)
- RI (
- Returns:
int: (undocumented)
C signature
uint64_t LLVMGetRelocationType(LLVMRelocationIteratorRef RI)
- rocm.bindings.llvm.c.object.LLVMGetRelocationTypeName(RI)#
// following functions.
- Args:
- RI (
LLVMOpaqueRelocationIterator/object): (undocumented)
- RI (
- Returns:
bytes: (undocumented)
C signature
const char * LLVMGetRelocationTypeName(LLVMRelocationIteratorRef RI)
- rocm.bindings.llvm.c.object.LLVMGetRelocationValueString(RI)#
// following functions.
- Args:
- RI (
LLVMOpaqueRelocationIterator/object): (undocumented)
- RI (
- Returns:
bytes: (undocumented)
C signature
const char * LLVMGetRelocationValueString(LLVMRelocationIteratorRef RI)
- class rocm.bindings.llvm.c.object.LLVMOpaqueObjectFile(*args, **kwargs)#
Bases:
rocm.bindings.util.types.Pointer(No short description)
- rocm.bindings.llvm.c.object.LLVMObjectFileRef#
- rocm.bindings.llvm.c.object.LLVMCreateObjectFile(MemBuf)#
Deprecated: Use LLVMCreateBinary instead.
C signature
LLVMObjectFileRef LLVMCreateObjectFile(LLVMMemoryBufferRef MemBuf)
- rocm.bindings.llvm.c.object.LLVMDisposeObjectFile(ObjectFile)#
Deprecated: Use LLVMDisposeBinary instead.
- Args:
- ObjectFile (
LLVMOpaqueObjectFile/object): (undocumented)
- ObjectFile (
C signature
void LLVMDisposeObjectFile(LLVMObjectFileRef ObjectFile)
- rocm.bindings.llvm.c.object.LLVMGetSections(ObjectFile)#
Deprecated: Use LLVMObjectFileCopySectionIterator instead.
- Args:
- ObjectFile (
LLVMOpaqueObjectFile/object): (undocumented)
- ObjectFile (
- Returns:
None: (undocumented)
C signature
LLVMSectionIteratorRef LLVMGetSections(LLVMObjectFileRef ObjectFile)
- rocm.bindings.llvm.c.object.LLVMIsSectionIteratorAtEnd(ObjectFile, SI)#
Deprecated: Use LLVMObjectFileIsSectionIteratorAtEnd instead.
- Args:
- ObjectFile (
LLVMOpaqueObjectFile/object): (undocumented)
- SI (
LLVMOpaqueSectionIterator/object): (undocumented)
- ObjectFile (
- Returns:
int: (undocumented)
C signature
LLVMBool LLVMIsSectionIteratorAtEnd(LLVMObjectFileRef ObjectFile, LLVMSectionIteratorRef SI)
- rocm.bindings.llvm.c.object.LLVMGetSymbols(ObjectFile)#
Deprecated: Use LLVMObjectFileCopySymbolIterator instead.
- Args:
- ObjectFile (
LLVMOpaqueObjectFile/object): (undocumented)
- ObjectFile (
- Returns:
None: (undocumented)
C signature
LLVMSymbolIteratorRef LLVMGetSymbols(LLVMObjectFileRef ObjectFile)
- rocm.bindings.llvm.c.object.LLVMIsSymbolIteratorAtEnd(ObjectFile, SI)#
Deprecated: Use LLVMObjectFileIsSymbolIteratorAtEnd instead.
- Args:
- ObjectFile (
LLVMOpaqueObjectFile/object): (undocumented)
- SI (
LLVMOpaqueSymbolIterator/object): (undocumented)
- ObjectFile (
- Returns:
int: (undocumented)
C signature
LLVMBool LLVMIsSymbolIteratorAtEnd(LLVMObjectFileRef ObjectFile, LLVMSymbolIteratorRef SI)