We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3b8603a commit f24c017Copy full SHA for f24c017
1 file changed
objdiff-core/src/obj/read.rs
@@ -874,8 +874,12 @@ fn combine_sections(
874
let mut data_sections = BTreeMap::<String, Vec<usize>>::new();
875
let mut text_sections = BTreeMap::<String, Vec<usize>>::new();
876
for (i, section) in sections.iter().enumerate() {
877
- let base_name =
878
- if let Some(i) = section.name.rfind('$') { §ion.name[..i] } else { §ion.name };
+ let base_name = section
+ .name
879
+ .get(1..)
880
+ .and_then(|s| s.rfind(['$', '.']))
881
+ .and_then(|i| section.name.get(..i + 1))
882
+ .unwrap_or(§ion.name);
883
match section.kind {
884
SectionKind::Data | SectionKind::Bss => {
885
data_sections.entry(base_name.to_string()).or_default().push(i);
0 commit comments