Skip to content
Snippets Groups Projects
Unverified Commit 0bc0f59d authored by Andrej Shadura's avatar Andrej Shadura
Browse files

Update gimli to 0.27 and object to 0.30

parent 969dcf84
No related branches found
No related tags found
No related merge requests found
......@@ -7,9 +7,9 @@ Build-Depends: debhelper-compat (= 12),
dh-cargo,
librust-anyhow-1-dev,
librust-fallible-iterator-0-dev,
librust-gimli-0+default-dev (>= 0.26),
librust-gimli-0+default-dev (>= 0.27),
librust-memmap-0-dev (>= 0.7),
librust-object-0+default-dev (>= 0.29),
librust-object-0+default-dev (>= 0.30),
librust-serde-1+derive-dev,
librust-serde-json-1-dev,
librust-structopt-0+default-dev (>= 0.3),
......
......@@ -4,13 +4,13 @@
anyhow = "1.0"
serde = { version = "1", features = ["derive"] }
serde_json = "1.0"
-gimli = "0.26"
-gimli = "0.27"
-fallible-iterator = "0.2"
+gimli = ">= 0.26"
+gimli = ">= 0.27"
+fallible-iterator = "0"
memmap = "0.7"
-object = { version = "0.29", features = [ "std", "compression" ] }
+object = { version = ">= 0.29", features = [ "std", "compression" ] }
-object = { version = "0.30", features = [ "std", "compression" ] }
+object = { version = ">= 0.30", features = [ "std", "compression" ] }
typed-arena = "2"
-structopt = "0.3"
+structopt = ">= 0.3"
update-gimli+object-bookworm.patch
relax-deps.patch
From: Andrej Shadura <andrew.shadura@collabora.co.uk>
Date: Sun, 1 Jan 2023 00:40:08 +0100
Subject: Update gimli to 0.26 and object to 0.29
Object 0.18 removed section_data_by_name.
Bug-Debian: https://bugs.debian.org/998306
Signed-off-by: Andrej Shadura <andrew.shadura@collabora.co.uk>
---
Cargo.toml | 4 ++--
src/main.rs | 5 +++--
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/Cargo.toml b/Cargo.toml
index 4bab46a..f0700c0 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -9,9 +9,9 @@ edition = "2018"
anyhow = "1.0"
serde = { version = "1", features = ["derive"] }
serde_json = "1.0"
-gimli = "0.19"
+gimli = "0.26"
fallible-iterator = "0.2"
memmap = "0.7"
-object = { version = "0.12", features = [ "std", "compression" ] }
+object = { version = "0.29", features = [ "std", "compression" ] }
typed-arena = "2"
structopt = "0.3"
diff --git a/src/main.rs b/src/main.rs
index b370e4e..e89c157 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -2,7 +2,7 @@
use anyhow::{anyhow, Error, Result};
use fallible_iterator::{convert, FallibleIterator};
use gimli::{AttributeValue, Endianity, Reader};
-use object::Object;
+use object::{Object, ObjectSection};
use serde::ser::SerializeMap;
use serde::{Serialize, Serializer};
use std::borrow::{Borrow, Cow};
@@ -26,7 +26,8 @@ fn list_file<E: Endianity>(file: &object::File, endian: E) -> Result<Vec<Unit>>
'a: 'file,
{
let data = file
- .section_data_by_name(S::section_name())
+ .section_by_name(S::section_name())
+ .and_then(|section| section.uncompressed_data().ok())
.unwrap_or(Cow::Borrowed(&[]));
let data_ref = (*arena.alloc(data)).borrow();
S::from(gimli::EndianSlice::new(data_ref, endian))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment