33// use ar::Archive;
44use object:: read:: archive:: { ArchiveFile , ArchiveMember } ;
55use object:: read:: elf:: FileHeader ;
6- use object:: { Object , ObjectSection , ObjectSymbol , Symbol , SymbolKind , SymbolScope } ;
6+ use object:: { Object , ObjectSection , ObjectSymbol , Symbol , SymbolKind , SymbolScope , SymbolSection } ;
77use std:: collections:: { BTreeMap , HashSet } ;
88use std:: error:: Error ;
99use 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 ) ]
4141struct 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