Skip to content

Commit

Permalink
Merge pull request #587 from messense/update-deps
Browse files Browse the repository at this point in the history
Update goblin and cargo_metadata
  • Loading branch information
messense authored Jul 10, 2021
2 parents 8468715 + bc67b69 commit a63b315
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 53 deletions.
62 changes: 18 additions & 44 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ anyhow = "1.0.39"
base64 = "0.13.0"
bytesize = "1.0.1"
glob = "0.3.0"
cargo_metadata = "0.13.1"
cargo_metadata = "0.14.0"
cbindgen = { version = "0.19.0", default-features = false }
flate2 = "1.0.18"
goblin = "0.4.0"
Expand Down
11 changes: 3 additions & 8 deletions src/auditwheel/audit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,11 @@ fn find_versioned_libraries(
.gread::<GnuVersionNeedAux>(&mut offset)
.map_err(goblin::error::Error::Scroll)
.map_err(AuditWheelError::GoblinError)?;
if let Some(aux_name) = strtab.get(ver_aux.name as usize) {
let aux_name = aux_name.map_err(AuditWheelError::GoblinError)?;
if let Some(aux_name) = strtab.get_at(ver_aux.name as usize) {
versions.insert(aux_name.to_string());
}
}
if let Some(name) = strtab.get(ver.file as usize) {
let name = name.map_err(AuditWheelError::GoblinError)?;
if let Some(name) = strtab.get_at(ver.file as usize) {
// Skip dynamic linker/loader
if name.starts_with("ld-linux") || name == "ld64.so.2" || name == "ld64.so.1" {
continue;
Expand All @@ -149,10 +147,7 @@ fn find_incompliant_symbols(
let strtab = &elf.strtab;
for sym in &elf.syms {
if sym.st_type() == STT_FUNC {
let name = strtab
.get(sym.st_name)
.unwrap_or(Ok("BAD NAME"))
.map_err(AuditWheelError::GoblinError)?;
let name = strtab.get_at(sym.st_name).unwrap_or("BAD NAME");
for symbol_version in symbol_versions {
if name.ends_with(&format!("@{}", symbol_version)) {
symbols.push(name.to_string());
Expand Down

0 comments on commit a63b315

Please sign in to comment.