Skip to content

Remove dladdr fallback and implementation #317

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,12 @@ cpp_demangle = { default-features = false, version = "0.2.3", optional = true }

# Optional dependencies enabled through the `gimli-symbolize` feature
addr2line = { version = "0.11.0", optional = true, default-features = false, features = ['std'] }
goblin = { version = "0.2", optional = true, default-features = false, features = ['elf32', 'elf64', 'mach32', 'mach64', 'pe32', 'pe64', 'std'] }

[dependencies.object]
version = "0.19"
optional = true
default-features = false
features = ['read_core', 'elf', 'macho', 'pe']

[target.'cfg(windows)'.dependencies]
winapi = { version = "0.3.3", optional = true }
Expand All @@ -49,7 +54,7 @@ winapi = { version = "0.3.3", optional = true }
# Note that not all features are available on all platforms, so even though a
# feature is enabled some other feature may be used instead.
[features]
default = ["std", "libunwind", "libbacktrace", "dladdr", "dbghelp"]
default = ["std", "libunwind", "libbacktrace", "dbghelp"]

# Include std support.
std = []
Expand Down Expand Up @@ -81,17 +86,13 @@ kernel32 = []
# can also provide filename/line number information if debuginfo is
# compiled in. This library currently only primarily works on unixes that
# are not OSX, however.
# - dladdr: this feature uses the dladdr(3) function (a glibc extension) to
# resolve symbol names. This is fairly unreliable on linux, but works well
# enough on OSX.
# - gimli-symbolize: use the `gimli-rs/addr2line` crate to symbolicate
# addresses into file, line, and name using DWARF debug information. At
# the moment, this is only possible when targetting Linux, since macOS
# splits DWARF out into a separate object file. Enabling this feature
# means one less C dependency.
libbacktrace = ["backtrace-sys/backtrace-sys"]
dladdr = []
gimli-symbolize = ["addr2line", "goblin"]
gimli-symbolize = ["addr2line", "object"]

#=======================================
# Methods of serialization
Expand All @@ -105,6 +106,7 @@ serialize-serde = ["serde"]
#
# Only here for backwards compatibility purposes, they do nothing now.
coresymbolication = []
dladdr = []

#=======================================
# Internal features for testing and such.
Expand Down
3 changes: 0 additions & 3 deletions crates/without_debuginfo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ features = [
'libunwind',
'dbghelp',

# Allow fallback to dladdr
'dladdr',

# Yes, we have `std`
'std',
]
Expand Down
112 changes: 0 additions & 112 deletions src/symbolize/dladdr.rs

This file was deleted.

50 changes: 0 additions & 50 deletions src/symbolize/dladdr_resolve.rs

This file was deleted.

Loading