File tree Expand file tree Collapse file tree 3 files changed +17
-1
lines changed
Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -236,7 +236,9 @@ fn reloc_eq(
236236 ( Some ( sl) , Some ( sr) ) => {
237237 // Match if section and name or address match
238238 section_name_eq ( left_obj, right_obj, * sl, * sr)
239- && ( symbol_name_matches || address_eq ( left, right) )
239+ && ( symbol_name_matches
240+ || address_eq ( left, right)
241+ || config. relax_shifted_data_diffs )
240242 && ( left. target . kind != ObjSymbolKind :: Object
241243 || right. target . name . starts_with ( "..." )
242244 || left. target . bytes == right. target . bytes )
Original file line number Diff line number Diff line change @@ -160,6 +160,7 @@ const fn default_true() -> bool { true }
160160#[ serde( default ) ]
161161pub struct DiffObjConfig {
162162 pub relax_reloc_diffs : bool ,
163+ pub relax_shifted_data_diffs : bool ,
163164 #[ serde( default = "default_true" ) ]
164165 pub space_between_args : bool ,
165166 pub combine_data_sections : bool ,
@@ -184,6 +185,7 @@ impl Default for DiffObjConfig {
184185 fn default ( ) -> Self {
185186 Self {
186187 relax_reloc_diffs : false ,
188+ relax_shifted_data_diffs : false ,
187189 space_between_args : true ,
188190 combine_data_sections : false ,
189191 symbol_mappings : Default :: default ( ) ,
Original file line number Diff line number Diff line change @@ -740,6 +740,18 @@ impl eframe::App for App {
740740 {
741741 state. queue_reload = true ;
742742 }
743+ if ui
744+ . checkbox (
745+ & mut state. config . diff_obj_config . relax_shifted_data_diffs ,
746+ "Relax shifted data diffs" ,
747+ )
748+ . on_hover_text (
749+ "Ignores differences in addresses for symbols with matching data." ,
750+ )
751+ . changed ( )
752+ {
753+ state. queue_reload = true ;
754+ }
743755 if ui
744756 . checkbox (
745757 & mut state. config . diff_obj_config . space_between_args ,
You can’t perform that action at this time.
0 commit comments