Skip to content

Commit 15abc01

Browse files
authored
Bump to object 0.25.0 (#426)
1 parent 9756650 commit 15abc01

File tree

5 files changed

+16
-14
lines changed

5 files changed

+16
-14
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ cpp_demangle = { default-features = false, version = "0.3.0", optional = true }
3838
addr2line = { version = "0.15.1", default-features = false }
3939
miniz_oxide = { version = "0.4.0", default-features = false }
4040
[dependencies.object]
41-
version = "0.24"
41+
version = "0.25"
4242
default-features = false
4343
features = ['read_core', 'elf', 'macho', 'pe', 'unaligned', 'archive']
4444

@@ -52,7 +52,7 @@ cc = "1.0.67"
5252

5353
[dev-dependencies]
5454
dylib-dep = { path = "crates/dylib-dep" }
55-
libloading = "0.6"
55+
libloading = "0.7"
5656

5757
[features]
5858
# By default libstd support and gimli-symbolize is used to symbolize addresses.

crates/as-if-std/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ addr2line = { version = "0.15.1", default-features = false }
1919
miniz_oxide = { version = "0.4.0", default-features = false }
2020

2121
[dependencies.object]
22-
version = "0.24"
22+
version = "0.25"
2323
default-features = false
2424
features = ['read_core', 'elf', 'macho', 'pe', 'unaligned', 'archive']
2525

src/symbolize/gimli/libs_macos.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ fn native_library(i: u32) -> Option<Library> {
4747
header as *const _ as *const u8,
4848
mem::size_of_val(header) + header.sizeofcmds.get(endian) as usize,
4949
);
50-
(header.load_commands(endian, data).ok()?, endian)
50+
(header.load_commands(endian, data, 0).ok()?, endian)
5151
}
5252
macho::MH_MAGIC_64 => {
5353
let endian = NativeEndian;
@@ -56,7 +56,7 @@ fn native_library(i: u32) -> Option<Library> {
5656
header as *const _ as *const u8,
5757
mem::size_of_val(header) + header.sizeofcmds.get(endian) as usize,
5858
);
59-
(header.load_commands(endian, data).ok()?, endian)
59+
(header.load_commands(endian, data, 0).ok()?, endian)
6060
}
6161
_ => return None,
6262
}

src/symbolize/gimli/macho.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ impl Mapping {
2222
let map = super::mmap(path)?;
2323
let (macho, data) = find_header(&map)?;
2424
let endian = macho.endian().ok()?;
25-
let uuid = macho.uuid(endian, data).ok()??;
25+
let uuid = macho.uuid(endian, data, 0).ok()??;
2626

2727
// Next we need to look for a `*.dSYM` file. For now we just probe the
2828
// containing directory and look around for something that matches
@@ -75,7 +75,7 @@ impl Mapping {
7575
let candidate = Mapping::mk(map, |data, stash| {
7676
let (macho, data) = find_header(data)?;
7777
let endian = macho.endian().ok()?;
78-
let entry_uuid = macho.uuid(endian, data).ok()??;
78+
let entry_uuid = macho.uuid(endian, data, 0).ok()??;
7979
if entry_uuid != uuid {
8080
return None;
8181
}
@@ -150,7 +150,7 @@ fn find_header(data: &'_ [u8]) -> Option<(&'_ Mach, &'_ [u8])> {
150150
_ => return None,
151151
}
152152

153-
Mach::parse(data.0).ok().map(|h| (h, data.0))
153+
Mach::parse(data.0, 0).ok().map(|h| (h, data.0))
154154
}
155155

156156
// This is used both for executables/libraries and source object files.
@@ -172,7 +172,7 @@ impl<'a> Object<'a> {
172172
let mut dwarf = None;
173173
let mut syms = Vec::new();
174174
let mut syms_sort_by_name = false;
175-
let mut commands = mach.load_commands(endian, data).ok()?;
175+
let mut commands = mach.load_commands(endian, data, 0).ok()?;
176176
let mut object_map = None;
177177
let mut object_mappings = Vec::new();
178178
while let Ok(Some(command)) = commands.next() {

tests/accuracy/main.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,13 @@ fn doit() {
3434
} else {
3535
dir.push("libdylib_dep.so");
3636
}
37-
let lib = libloading::Library::new(&dir).unwrap();
38-
let api = unsafe { lib.get::<extern "C" fn(Pos, fn(Pos, Pos))>(b"foo").unwrap() };
39-
api(pos!(), |a, b| {
40-
check!(a, b);
41-
});
37+
unsafe {
38+
let lib = libloading::Library::new(&dir).unwrap();
39+
let api = lib.get::<extern "C" fn(Pos, fn(Pos, Pos))>(b"foo").unwrap();
40+
api(pos!(), |a, b| {
41+
check!(a, b);
42+
});
43+
}
4244
}
4345

4446
outer(pos!());

0 commit comments

Comments
 (0)