mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
tools: elf: add comment and dead code for alignment fixing
This issue was spotted when the kernel address was wrong. This fixed the test, but was indicative of something else being wrong. Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
edf723e107
commit
4645816674
1 changed files with 4 additions and 0 deletions
|
|
@ -176,6 +176,10 @@ pub fn read_program<P: AsRef<Path>>(filename: P) -> Result<ProgramDescription, E
|
|||
debug!(" size: {:?}", s.size());
|
||||
debug!(" link: {:?}", s.link());
|
||||
size += s.size();
|
||||
// // Pad the section so it's a multiple of 4 bytes.
|
||||
// // It's unclear if this is necessary, since this seems to indicate
|
||||
// // that something has gone horribly wrong.
|
||||
// size += (4 - (size & 3)) & 3;
|
||||
if size & 3 != 0 {
|
||||
return Err(ElfReadError::SectionNotAligned(name.to_owned(), s.size() as usize));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue