-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCargo.toml
112 lines (94 loc) · 2.88 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
[package]
name = "dlopen-rs"
version = "0.5.0"
edition = "2021"
authors = ["wzhao <1207410841@qq.com>"]
readme = "README.md"
repository = "https://github.com/weizhiao/dlopen-rs"
keywords = ["dlopen", "elf", "unix", "loader"]
categories = ["no-std", "os", "embedded"]
license = "Apache-2.0"
description = "A library for loading elf dynamic libraries from memory and files"
exclude = [".gitignore", "/test", "/example-dylib", "check.sh"]
[workspace]
members = ["example-dylib"]
resolver = "2"
[dependencies.spin]
version = "0.9.8"
default-features = false
features = ["rwlock", "lazy", "mutex", "spin_mutex"]
[dependencies.unwinding]
version = "0.2.4"
default-features = false
features = ["fde-custom", "unwinder"]
optional = true
[dependencies.gimli]
version = "0.30"
default-features = false
features = ["read-core"]
optional = true
[dependencies.hashbrown]
version = '0.14'
default-features = false
features = ['ahash', 'inline-more']
[dependencies.libc]
version = "0.2.162"
default-features = false
optional = true
[dependencies.phf]
version = '0.11'
default-features = false
features = ['macros']
[dependencies.elf_loader]
version = "0.3.0"
default-features = false
[dependencies]
bitflags = "2.6.0"
cfg-if = '1.0'
[features]
default = ["tls", "ldso", "libgcc", "mmap"]
# allows dynamic libraries to be loaded using system dynamic loaders(ldso)
ldso = ["std", "dep:libc"]
# enable this when you want to use gdb/lldb to debug the loaded dynamic libraries
debug = ["std"]
# enable std
std = ["dep:libc", "elf_loader/std"]
# enable default implementation on devices with mmap
mmap = ["dep:libc", "std", "elf_loader/mmap"]
# enable this when you need to use thread local storage
tls = ["std", "dep:libc", "elf_loader/tls"]
# activate specific versions of symbols for dynamic library loading
version = ["elf_loader/version"]
# enable this when you want to use the exception handling mechanism provided by dlopen-rs
unwinding = ["dep:unwinding"]
# enable this when program uses libgcc to handle exceptions
libgcc = ["dep:gimli"]
# enable this when program uses libunwind to handle exceptions
libunwind = ["dep:gimli"]
# see https://github.com/nbdd0121/unwinding/#unwinder
fde-phdr-dl = ["unwinding?/fde-phdr-dl"]
# see https://github.com/nbdd0121/unwinding/#baremetal
fde-static = ["unwinding?/fde-static"]
# see https://github.com/nbdd0121/unwinding/#baremetal
fde-gnu-eh-frame-hdr = ["unwinding?/fde-gnu-eh-frame-hdr"]
[dev-dependencies]
criterion = "0.5.1"
libloading = "0.8.5"
[[bench]]
name = "my_benchmark"
harness = false
[[example]]
name = "from_file"
required-features = ["ldso", "tls", "libgcc"]
[[example]]
name = "from_binary"
required-features = ["ldso", "libgcc", "tls"]
[[example]]
name = "relocate_with"
required-features = ["std", "tls", "libgcc"]
[[example]]
name = "unwinding"
required-features = ["tls", "unwinding", "ldso", "fde-phdr-dl"]
[[example]]
name = "dlopen"
required-features = ["ldso", "libgcc", "tls"]