Skip to content

Commit

Permalink
chore: remove dl_iterate_phdr_feature
Browse files Browse the repository at this point in the history
fengys1996 committed Aug 23, 2024
1 parent fd0aed5 commit 04105e3
Showing 5 changed files with 6 additions and 79 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 0 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -2,7 +2,6 @@
name = "backtrace"
version = "0.3.73"
authors = ["The Rust Project Developers"]
build = "build.rs"
license = "MIT OR Apache-2.0"
readme = "README.md"
repository = "https://github.com/rust-lang/backtrace-rs"
@@ -49,11 +48,6 @@ version = "0.36.0"
default-features = false
features = ['read_core', 'elf', 'macho', 'pe', 'xcoff', 'unaligned', 'archive']

[build-dependencies]
# Only needed for Android, but cannot be target dependent
# https://github.com/rust-lang/cargo/issues/4932
cc = "1.0.97"

[dev-dependencies]
dylib-dep = { path = "crates/dylib-dep" }
libloading = "0.7"
@@ -74,7 +68,6 @@ serialize-serde = ["serde"]
# purposes. New code should use none of these features.
coresymbolication = []
dbghelp = []
dl_iterate_phdr = []
dladdr = []
kernel32 = []
libunwind = []
55 changes: 0 additions & 55 deletions build.rs

This file was deleted.

8 changes: 0 additions & 8 deletions crates/as-if-std/build.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
// backtrace-rs requires a feature check on Android targets, so
// we need to run its build.rs as well.
#[allow(unused_extern_crates)]
#[path = "../../build.rs"]
mod backtrace_build_rs;

fn main() {
println!("cargo:rustc-cfg=backtrace_in_libstd");

backtrace_build_rs::main();
}
14 changes: 6 additions & 8 deletions src/symbolize/gimli.rs
Original file line number Diff line number Diff line change
@@ -100,7 +100,7 @@ impl Mapping {
// only borrow `map` and `stash` and we're preserving them below.
cx: unsafe { core::mem::transmute::<Context<'_>, Context<'static>>(cx) },
_map: data,
stash: stash,
stash,
})
}
}
@@ -122,13 +122,11 @@ impl<'data> Context<'data> {
if cfg!(not(target_os = "aix")) {
let data = object.section(stash, id.name()).unwrap_or(&[]);
Ok(EndianSlice::new(data, Endian))
} else if let Some(name) = id.xcoff_name() {
let data = object.section(stash, name).unwrap_or(&[]);
Ok(EndianSlice::new(data, Endian))
} else {
if let Some(name) = id.xcoff_name() {
let data = object.section(stash, name).unwrap_or(&[]);
Ok(EndianSlice::new(data, Endian))
} else {
Ok(EndianSlice::new(&[], Endian))
}
Ok(EndianSlice::new(&[], Endian))
}
})
.ok()?;
@@ -226,7 +224,7 @@ cfg_if::cfg_if! {
target_os = "hurd",
target_os = "openbsd",
target_os = "netbsd",
all(target_os = "android", feature = "dl_iterate_phdr"),
target_os = "android",
),
not(target_env = "uclibc"),
))] {

0 comments on commit 04105e3

Please sign in to comment.