Skip to content

Avoid eagerly doing unnecessary string formatting #73

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 2 commits into from
Nov 21, 2024
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
1 change: 1 addition & 0 deletions .github/workflows/dep_rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ jobs:
os: [self-hosted, Linux, X64, "1ES.Pool=hld-mshv-amd"]
hypervisor: mshv
config: release
arch: amd
- build: windows-2022-debug-intel
os: [self-hosted, Windows, X64, "1ES.Pool=hld-win2022-intel"]
hypervisor: hyperv
Expand Down
5 changes: 4 additions & 1 deletion src/hyperlight_host/src/mem/elf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,10 @@ impl ElfInfo {
.copy_from_slice(&self.payload[payload_offset..payload_offset + payload_len]);
target[start_va + payload_len..start_va + phdr.p_memsz as usize].fill(0);
}
let get_addend = |name, r: &Reloc| r.r_addend.ok_or(new_error!("{} missing addend", name));
let get_addend = |name, r: &Reloc| {
r.r_addend
.ok_or_else(|| new_error!("{} missing addend", name))
};
for r in self.relocs.iter() {
#[cfg(target_arch = "aarch64")]
match r.r_type {
Expand Down
Loading