Bump to object 0.18

epel9
Josh Stone 5 years ago
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

@ -6,13 +6,17 @@
Name: rust-%{crate} Name: rust-%{crate}
Version: 0.11.0 Version: 0.11.0
Release: 1%{?dist} Release: 2%{?dist}
Summary: Cross-platform symbolication library written in Rust, using `gimli` Summary: Cross-platform symbolication library written in Rust, using `gimli`
# Upstream license specification: Apache-2.0/MIT # Upstream license specification: Apache-2.0/MIT
License: ASL 2.0 or MIT License: ASL 2.0 or MIT
URL: https://crates.io/crates/addr2line URL: https://crates.io/crates/addr2line
Source: %{crates_source} Source: %{crates_source}
# Initial patched metadata
# * Bump to object 0.18, https://github.com/gimli-rs/addr2line/pull/159/commits/203fe1e00d5d751763e0aaec75f4abe670271b81
Patch0: addr2line-fix-metadata.diff
Patch1: 0001-Update-object.patch
ExclusiveArch: %{rust_arches} ExclusiveArch: %{rust_arches}
%if %{__cargo_skip_build} %if %{__cargo_skip_build}
@ -132,6 +136,9 @@ which use "std-object" feature of "%{crate}" crate.
%endif %endif
%changelog %changelog
* Tue May 05 2020 Josh Stone <jistone@redhat.com> - 0.11.0-2
- Bump to object 0.18
* Wed Feb 19 2020 Josh Stone <jistone@redhat.com> - 0.11.0-1 * Wed Feb 19 2020 Josh Stone <jistone@redhat.com> - 0.11.0-1
- Update to 0.11.0 - Update to 0.11.0

Loading…
Cancel
Save