parent
9c827d8293
commit
08d0028061
@ -0,0 +1,31 @@
|
|||||||
|
From 203fe1e00d5d751763e0aaec75f4abe670271b81 Mon Sep 17 00:00:00 2001
|
||||||
|
From: bjorn3 <bjorn3@users.noreply.github.com>
|
||||||
|
Date: Thu, 30 Apr 2020 12:16:46 +0200
|
||||||
|
Subject: [PATCH] Update object
|
||||||
|
|
||||||
|
---
|
||||||
|
src/lib.rs | 7 +++++--
|
||||||
|
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/lib.rs b/src/lib.rs
|
||||||
|
index c72dffbd036b..0173a26418bc 100644
|
||||||
|
--- a/src/lib.rs
|
||||||
|
+++ b/src/lib.rs
|
||||||
|
@@ -99,9 +99,12 @@ impl Context<gimli::EndianRcSlice<gimli::RunTimeEndian>> {
|
||||||
|
S: gimli::Section<gimli::EndianRcSlice<Endian>>,
|
||||||
|
Endian: gimli::Endianity,
|
||||||
|
{
|
||||||
|
+ use object::ObjectSection;
|
||||||
|
+
|
||||||
|
let data = file
|
||||||
|
- .section_data_by_name(S::section_name())
|
||||||
|
- .unwrap_or(Cow::Borrowed(&[]));
|
||||||
|
+ .section_by_name(S::section_name())
|
||||||
|
+ .and_then(|section| section.data().ok())
|
||||||
|
+ .unwrap_or(&[]);
|
||||||
|
S::from(gimli::EndianRcSlice::new(Rc::from(&*data), endian))
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.26.2
|
||||||
|
|
@ -0,0 +1,11 @@
|
|||||||
|
--- addr2line-0.11.0/Cargo.toml 1970-01-01T00:00:00+00:00
|
||||||
|
+++ addr2line-0.11.0/Cargo.toml 2020-05-05T21:44:40.646878+00:00
|
||||||
|
@@ -63,7 +63,7 @@
|
||||||
|
version = "1"
|
||||||
|
|
||||||
|
[dependencies.object]
|
||||||
|
-version = "0.17"
|
||||||
|
+version = "0.18"
|
||||||
|
features = ["read"]
|
||||||
|
optional = true
|
||||||
|
default-features = false
|
Loading…
Reference in new issue