Struct thorin::DwarfPackage
source · pub struct DwarfPackage<'output, 'session: 'output, Sess: Session<HashMap<usize, Relocation>>> { /* private fields */ }
Expand description
Builder for DWARF packages, add input objects/packages with add_input_object
or input objects
referenced by an executable with add_executable
before accessing the completed object with
finish
.
Implementations§
source§impl<'output, 'session: 'output, Sess> DwarfPackage<'output, 'session, Sess>where
Sess: Session<HashMap<usize, Relocation>>,
impl<'output, 'session: 'output, Sess> DwarfPackage<'output, 'session, Sess>where Sess: Session<HashMap<usize, Relocation>>,
sourcepub fn new(sess: &'session Sess) -> Self
pub fn new(sess: &'session Sess) -> Self
Create a new DwarfPackage
with the provided Session
implementation.
sourcepub fn add_executable(
&mut self,
path: &Path,
missing_behaviour: MissingReferencedObjectBehaviour
) -> Result<(), Error>
pub fn add_executable( &mut self, path: &Path, missing_behaviour: MissingReferencedObjectBehaviour ) -> Result<(), Error>
Add input objects referenced by executable to the DWARF package.
sourcepub fn add_input_object(&mut self, path: &Path) -> Result<(), Error>
pub fn add_input_object(&mut self, path: &Path) -> Result<(), Error>
Add an input object to the DWARF package.
Input object must be an archive or an elf object.
sourcepub fn finish(self) -> Result<WritableObject<'output>, Error>
pub fn finish(self) -> Result<WritableObject<'output>, Error>
Returns the object::write::Object
containing the created DWARF package.
Returns an Error::MissingReferencedUnit
if DWARF objects referenced by executables were
not subsequently found.
Returns an Error::NoOutputObjectCreated
if no input objects or executables were provided.
Trait Implementations§
Auto Trait Implementations§
impl<'output, 'session, Sess> RefUnwindSafe for DwarfPackage<'output, 'session, Sess>where Sess: RefUnwindSafe,
impl<'output, 'session, Sess> Send for DwarfPackage<'output, 'session, Sess>where Sess: Sync,
impl<'output, 'session, Sess> Sync for DwarfPackage<'output, 'session, Sess>where Sess: Sync,
impl<'output, 'session, Sess> Unpin for DwarfPackage<'output, 'session, Sess>
impl<'output, 'session, Sess> UnwindSafe for DwarfPackage<'output, 'session, Sess>where Sess: RefUnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more