Struct llvm_link::Object
[−]
[src]
pub struct Object { /* fields omitted */ }
Link Time Optimization Object
Object that is fully loaded into memory. This contains its own buffer as the LLVM is quickly free its memory after generating an Object File.
Methods
impl Object
[src]
fn from_vec(obj: Vec<u8>) -> Result<Object, String>
Builds a new object file.
fn from_slice(obj: &[u8]) -> Result<Object, String>
Builds a new object file
But clones the underlying buffer to ensure ownership
fn get_buffer(&mut self, v: &mut Vec<u8>)
Internal method to steal inner buffer.
Swaps v
with own internal buffer. Be warned THE LLVM HAS POINTERS TO THIS
if v
is free'd before self
this can cause memory errors
Trait Implementations
impl Drop for Object
[src]
impl LinkerObject for Object
[src]
fn as_object(&self) -> lto_module_t
Exposes internal C-binding poitner
fn get_num_symbols(&self) -> u32
Get the number of symbols in an object file
fn get_symbol_name(&self, index: u32) -> Result<String, String>
Get the name of a symbol at a certain index
fn get_target_triple(&self) -> Result<String, String>
Get the target triple an object file was compiled for