mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
loader: use all 24 bits for IniE size
Because ELF files can operate at byte offsets, we must use the full byte-addressible address for sections. Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
829570713f
commit
e1d97d88ca
1 changed files with 1 additions and 3 deletions
|
|
@ -155,9 +155,7 @@ pub struct MiniElfSection {
|
||||||
impl MiniElfSection {
|
impl MiniElfSection {
|
||||||
pub fn len(&self) -> usize {
|
pub fn len(&self) -> usize {
|
||||||
// Strip off the top four bits, which contain the flags.
|
// Strip off the top four bits, which contain the flags.
|
||||||
// Also shift everything up by two bits, since it's in
|
let len = self.size_and_flags & !0xff00_0000;
|
||||||
// units of 32-bit words.
|
|
||||||
let len = (self.size_and_flags << 2) & !0xf000_0000;
|
|
||||||
len as usize
|
len as usize
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue