Skip to content

Commit

Permalink
Support getting the SONAME from program headers.
Browse files Browse the repository at this point in the history
  • Loading branch information
afranchuk committed Apr 30, 2024
1 parent f0b4480 commit 0c2a2e8
Show file tree
Hide file tree
Showing 3 changed files with 230 additions and 58 deletions.
15 changes: 13 additions & 2 deletions src/linux/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +266,11 @@ pub enum ModuleReaderError {
NoStrTab,
#[error("no build id note sections")]
NoSectionNote,
#[error("the ELF file contains no sections")]
#[error("the ELF data contains no program headers")]
NoProgramHeaders,
#[error("the ELF data contains no sections")]
NoSections,
#[error("the ELF file does not have a .text section from which to generate a build id")]
#[error("the ELF data does not have a .text section from which to generate a build id")]
NoTextSection,
#[error(
"failed to calculate build id\n\
Expand All @@ -289,4 +291,13 @@ pub enum ModuleReaderError {
NoSoNameEntry,
#[error("no dynamic linking information section")]
NoDynamicSection,
#[error(
"failed to retrieve soname\n\
... from program headers: {program_headers}\n\
... from sections: {section}"
)]
NoSoName {
program_headers: Box<Self>,
section: Box<Self>,
},
}
Loading

0 comments on commit 0c2a2e8

Please sign in to comment.