1 parent 7c424a7 commit bdbb293Copy full SHA for bdbb293
2 files changed
objdiff-core/src/obj/mod.rs
@@ -70,6 +70,7 @@ pub struct Section {
70
pub id: String,
71
pub name: String,
72
pub address: u64,
73
+ pub offset: Option<u64>,
74
pub size: u64,
75
pub kind: SectionKind,
76
pub data: SectionData,
@@ -414,6 +415,7 @@ static DUMMY_SECTION: Section = Section {
414
415
id: String::new(),
416
name: String::new(),
417
address: 0,
418
+ offset: None,
419
size: 0,
420
kind: SectionKind::Unknown,
421
data: SectionData(Vec::new()),
objdiff-core/src/obj/read.rs
@@ -273,6 +273,7 @@ fn map_sections(
273
id,
274
name: name.to_string(),
275
address: section.address(),
276
+ offset: section.file_range().map(|(start, _)| start),
277
size: section.size(),
278
kind,
279
data: SectionData(data),
0 commit comments