@@ -41,6 +41,7 @@ fn map_symbol(
41
41
symbol : & object:: Symbol ,
42
42
section_indices : & [ usize ] ,
43
43
split_meta : Option < & SplitMeta > ,
44
+ diff_config : & DiffObjConfig
44
45
) -> Result < Symbol > {
45
46
let mut name = symbol. name ( ) . context ( "Failed to process symbol name" ) ?. to_string ( ) ;
46
47
let mut size = symbol. size ( ) ;
@@ -57,7 +58,7 @@ fn map_symbol(
57
58
size = 0 ;
58
59
}
59
60
60
- let mut flags = arch. extra_symbol_flags ( symbol) ;
61
+ let mut flags = arch. extra_symbol_flags ( symbol, diff_config ) ;
61
62
if symbol. is_global ( ) {
62
63
flags |= SymbolFlag :: Global ;
63
64
}
@@ -108,6 +109,7 @@ fn map_symbols(
108
109
sections : & [ Section ] ,
109
110
section_indices : & [ usize ] ,
110
111
split_meta : Option < & SplitMeta > ,
112
+ diff_config : & DiffObjConfig ,
111
113
) -> Result < ( Vec < Symbol > , Vec < usize > ) > {
112
114
let symbol_count = obj_file. symbols ( ) . count ( ) ;
113
115
let mut symbols = Vec :: < Symbol > :: with_capacity ( symbol_count) ;
@@ -116,7 +118,7 @@ fn map_symbols(
116
118
if symbol_indices. len ( ) <= obj_symbol. index ( ) . 0 {
117
119
symbol_indices. resize ( obj_symbol. index ( ) . 0 + 1 , usize:: MAX ) ;
118
120
}
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 ) ?;
120
122
symbol_indices[ obj_symbol. index ( ) . 0 ] = symbols. len ( ) ;
121
123
symbols. push ( symbol) ;
122
124
}
@@ -936,7 +938,7 @@ pub fn parse(data: &[u8], config: &DiffObjConfig) -> Result<Object> {
936
938
let ( mut sections, section_indices) =
937
939
map_sections ( arch. as_ref ( ) , & obj_file, split_meta. as_ref ( ) ) ?;
938
940
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 ) ?;
940
942
map_relocations ( arch. as_ref ( ) , & obj_file, & mut sections, & section_indices, & symbol_indices) ?;
941
943
parse_line_info ( & obj_file, & mut sections, & section_indices, data) ?;
942
944
if config. combine_data_sections || config. combine_text_sections {
0 commit comments