Skip to content

Commit

Permalink
Generated TU name adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
encounter committed Aug 8, 2023
1 parent 4680193 commit 5bdffa9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/obj/split.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ fn split_ctors_dtors(obj: &mut ObjInfo, section_start: u32, section_end: u32) ->
.section
.and_then(|idx| obj.sections.get(idx).map(|s| s.name.clone()))
.unwrap_or_else(|| "unknown".to_string());
format!("{}_{}", function_symbol.name, section_name)
format!("{}_{}", function_symbol.name, section_name.trim_start_matches('.'))
});
log::debug!("Adding splits to unit {}", unit);

Expand Down Expand Up @@ -200,7 +200,7 @@ fn split_extabindex(obj: &mut ObjInfo, section_index: usize, section_start: u32)
.section
.and_then(|idx| obj.sections.get(idx).map(|s| s.name.clone()))
.unwrap_or_else(|| "unknown".to_string());
format!("{}_{}", function_symbol.name, section_name)
format!("{}_{}", function_symbol.name, section_name.trim_start_matches('.'))
});
log::debug!("Adding splits to unit {}", unit);

Expand Down Expand Up @@ -316,7 +316,8 @@ fn create_gap_splits(obj: &mut ObjInfo) -> Result<()> {
current_address,
new_split_end
);
let unit = format!("{:08X}_{}", current_address, section.name);
let unit =
format!("{:08X}_{}", current_address, section.name.trim_start_matches('.'));
new_splits.insert(current_address, ObjSplit {
unit: unit.clone(),
end: new_split_end,
Expand Down

0 comments on commit 5bdffa9

Please sign in to comment.