Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
db482b5c21 | ||
|
|
3e90d7df6d | ||
|
|
1cab6524a4 | ||
|
|
cd8ebab4bf |
Generated
+1
-1
@@ -2165,7 +2165,7 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
|
||||
|
||||
[[package]]
|
||||
name = "lemur"
|
||||
version = "0.8.0"
|
||||
version = "0.8.2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"atoi",
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ description = "An emulator for the Virtual Boy."
|
||||
repository = "https://git.virtual-boy.com/PVB/lemur"
|
||||
publish = false
|
||||
license = "MIT"
|
||||
version = "0.8.0"
|
||||
version = "0.8.2"
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
|
||||
@@ -41,6 +41,7 @@ ENV PATH="/osxcross/bin:$PATH" \
|
||||
SHROOMS_CFLAGS_x86_64-unknown-linux-gnu="-flto" \
|
||||
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS="-Clinker-plugin-lto -Clinker=clang -Clink-arg=-fuse-ld=lld" \
|
||||
SHROOMS_CFLAGS_x86_64-pc-windows-msvc="-flto" \
|
||||
CFLAGS_x86_64-pc-windows-msvc="-I/xwin/crt/include -I/xwin/sdk/include/ucrt -I/xwin/sdk/include/um -I/xwin/sdk/include/shared" \
|
||||
CARGO_TARGET_X86_64_PC_WINDOWS_MSVC_RUSTFLAGS="-Lnative=/xwin/crt/lib/x86_64 -Lnative=/xwin/sdk/lib/um/x86_64 -Lnative=/xwin/sdk/lib/ucrt/x86_64 -Clinker-plugin-lto -Clink-arg=-fuse-ld=lld" \
|
||||
CARGO_TARGET_X86_64_PC_WINDOWS_MSVC_LINKER="lld-link-20" \
|
||||
CARGO_TARGET_X86_64_APPLE_DARWIN_LINKER="o64-clang" \
|
||||
|
||||
@@ -86,12 +86,13 @@ fn parse_elf_program<Elf: object::read::elf::FileHeader<Endian = object::Endiann
|
||||
let mut bytes = vec![];
|
||||
let mut pstart = None;
|
||||
for phdr in header.program_headers(endian, data).ok()? {
|
||||
if phdr.p_filesz(endian).into() == 0 {
|
||||
let pma = phdr.p_paddr(endian).into();
|
||||
if pma < 0x07000000 || phdr.p_filesz(endian).into() == 0 {
|
||||
continue;
|
||||
}
|
||||
let start = pstart.unwrap_or(phdr.p_paddr(endian).into());
|
||||
let start = pstart.unwrap_or(pma);
|
||||
pstart = Some(start);
|
||||
bytes.resize((phdr.p_paddr(endian).into() - start) as usize, 0);
|
||||
bytes.resize((pma - start) as usize, 0);
|
||||
let data = phdr.data(endian, data).ok()?;
|
||||
bytes.extend_from_slice(data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user