@@ -41,6 +41,7 @@ fn map_symbol(
4141 symbol : & object:: Symbol ,
4242 section_indices : & [ usize ] ,
4343 split_meta : Option < & SplitMeta > ,
44+ diff_config : & DiffObjConfig
4445) -> Result < Symbol > {
4546 let mut name = symbol. name ( ) . context ( "Failed to process symbol name" ) ?. to_string ( ) ;
4647 let mut size = symbol. size ( ) ;
@@ -57,7 +58,7 @@ fn map_symbol(
5758 size = 0 ;
5859 }
5960
60- let mut flags = arch. extra_symbol_flags ( symbol) ;
61+ let mut flags = arch. extra_symbol_flags ( symbol, diff_config ) ;
6162 if symbol. is_global ( ) {
6263 flags |= SymbolFlag :: Global ;
6364 }
@@ -108,6 +109,7 @@ fn map_symbols(
108109 sections : & [ Section ] ,
109110 section_indices : & [ usize ] ,
110111 split_meta : Option < & SplitMeta > ,
112+ diff_config : & DiffObjConfig ,
111113) -> Result < ( Vec < Symbol > , Vec < usize > ) > {
112114 let symbol_count = obj_file. symbols ( ) . count ( ) ;
113115 let mut symbols = Vec :: < Symbol > :: with_capacity ( symbol_count) ;
@@ -116,7 +118,7 @@ fn map_symbols(
116118 if symbol_indices. len ( ) <= obj_symbol. index ( ) . 0 {
117119 symbol_indices. resize ( obj_symbol. index ( ) . 0 + 1 , usize:: MAX ) ;
118120 }
119- let symbol = map_symbol ( arch, obj_file, & obj_symbol, section_indices, split_meta) ?;
121+ let symbol = map_symbol ( arch, obj_file, & obj_symbol, section_indices, split_meta, diff_config ) ?;
120122 symbol_indices[ obj_symbol. index ( ) . 0 ] = symbols. len ( ) ;
121123 symbols. push ( symbol) ;
122124 }
@@ -936,7 +938,7 @@ pub fn parse(data: &[u8], config: &DiffObjConfig) -> Result<Object> {
936938 let ( mut sections, section_indices) =
937939 map_sections ( arch. as_ref ( ) , & obj_file, split_meta. as_ref ( ) ) ?;
938940 let ( mut symbols, symbol_indices) =
939- map_symbols ( arch. as_ref ( ) , & obj_file, & sections, & section_indices, split_meta. as_ref ( ) ) ?;
941+ map_symbols ( arch. as_ref ( ) , & obj_file, & sections, & section_indices, split_meta. as_ref ( ) , config ) ?;
940942 map_relocations ( arch. as_ref ( ) , & obj_file, & mut sections, & section_indices, & symbol_indices) ?;
941943 parse_line_info ( & obj_file, & mut sections, & section_indices, data) ?;
942944 if config. combine_data_sections || config. combine_text_sections {
0 commit comments