Skip to content

Commit c06764e

Browse files
committed
print more
1 parent 9f9c5fa commit c06764e

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

ci/run.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ fi
9595
# Look out for duplicated symbols when we include the compiler-rt (C) implementation
9696
update_rlib_paths
9797

98-
9998
for rlib in "${rlib_paths[@]}"; do
10099
set +x
101100
echo "================================================================"

crates/symbol-check/src/main.rs

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// use ar::Archive;
44
use object::read::archive::{ArchiveFile, ArchiveMember};
55
use object::read::elf::FileHeader;
6-
use object::{Object, ObjectSection, ObjectSymbol, Symbol, SymbolKind, SymbolScope};
6+
use object::{Object, ObjectSection, ObjectSymbol, Symbol, SymbolKind, SymbolScope, SymbolSection};
77
use std::collections::{BTreeMap, HashSet};
88
use std::error::Error;
99
use std::fs;
@@ -37,13 +37,18 @@ fn main() {
3737
// Raise an error if the same symbol is present in multiple object files
3838
}
3939

40-
#[derive(Debug, Clone)]
40+
#[derive(Clone, Debug)]
4141
struct SymInfo {
4242
name: String,
4343
kind: SymbolKind,
4444
scope: SymbolScope,
45-
address: u64,
45+
section: SymbolSection,
46+
is_undefined: bool,
47+
is_global: bool,
48+
is_local: bool,
4649
is_weak: bool,
50+
is_common: bool,
51+
address: u64,
4752
object: String,
4853
}
4954

@@ -53,8 +58,13 @@ impl SymInfo {
5358
name: sym.name().expect("missing name").to_owned(),
5459
kind: sym.kind(),
5560
scope: sym.scope(),
56-
address: sym.address(),
61+
section: sym.section(),
62+
is_undefined: sym.is_undefined(),
63+
is_global: sym.is_global(),
64+
is_local: sym.is_local(),
5765
is_weak: sym.is_weak(),
66+
is_common: sym.is_common(),
67+
address: sym.address(),
5868
object: String::from_utf8_lossy(member.name()).into_owned(),
5969
}
6070
}

0 commit comments

Comments
 (0)