Skip to content

Commit

Permalink
Merge #241
Browse files Browse the repository at this point in the history
241: BootInfo: Add tls_align r=stlankes a=mkroening

See

* hermit-os/kernel#311

Co-authored-by: Martin Kröning <[email protected]>
  • Loading branch information
bors[bot] and mkroening authored Dec 4, 2021
2 parents 80c3af5 + 0103fed commit 1c136df
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/vm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ pub struct BootInfo {
pub hcip: [u8; 4],
pub hcgateway: [u8; 4],
pub hcmask: [u8; 4],
pub tls_align: u64,
}

impl BootInfo {
Expand Down Expand Up @@ -84,6 +85,7 @@ impl BootInfo {
hcip: [255, 255, 255, 255],
hcgateway: [255, 255, 255, 255],
hcmask: [255, 255, 255, 0],
tls_align: 0,
}
}
}
Expand Down Expand Up @@ -668,6 +670,7 @@ pub trait Vm {
write(&mut (*boot_info).tls_start, tls_start);
write(&mut (*boot_info).tls_filesz, program_header.p_filesz);
write(&mut (*boot_info).tls_memsz, program_header.p_memsz);
write(&mut (*boot_info).tls_align, program_header.p_align);

Ok(())
}
Expand Down

0 comments on commit 1c136df

Please sign in to comment.