diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3bed8b77b..ed36d125e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,8 @@
+Unreleased
+----------
+- Added `size` member to `symbolize::Sym` type
+
+
0.2.0-alpha.6
-------------
- Fixed potential panic when normalizing an APK ELF file using the C APIs
diff --git a/src/dwarf/resolver.rs b/src/dwarf/resolver.rs
index cb26afa50..fc5516c5e 100644
--- a/src/dwarf/resolver.rs
+++ b/src/dwarf/resolver.rs
@@ -142,9 +142,13 @@ impl DwarfResolver {
.range
.map(|range| range.begin as usize)
.unwrap_or(0);
+ let size = function
+ .range
+ .map(|range| usize::try_from(range.end - range.begin).unwrap_or(usize::MAX));
let sym = IntSym {
name,
addr,
+ size,
lang: language.into(),
};
Ok(vec![sym])
@@ -191,7 +195,7 @@ impl DwarfResolver {
.range
.as_ref()
.and_then(|range| range.end.checked_sub(range.begin))
- .map(|size| size as usize)
+ .map(|size| usize::try_from(size).unwrap_or(usize::MAX))
.unwrap_or(0);
let info = SymInfo {
name,
diff --git a/src/elf/parser.rs b/src/elf/parser.rs
index 1e1c1db35..ca23aeb2c 100644
--- a/src/elf/parser.rs
+++ b/src/elf/parser.rs
@@ -46,7 +46,7 @@ fn find_sym<'mmap>(
strtab: &'mmap [u8],
addr: Addr,
st_type: u8,
-) -> Result