Skip to content

Conversation

@dreamliner787-9
Copy link
Contributor

Emit an empty strtab when serialising ELF. To fix this issue when converting the tool outputted ELF back into a binary:

% riscv64-unknown-elf-objcopy -O binary loader.elf loader.bin
riscv64-unknown-elf-objcopy: warning: loader.elf has a corrupt string table index
riscv64-unknown-elf-objcopy: unable to modify 'loader.elf' due to errors

Signed-off-by: Bill Nguyen <bill.nguyen@student.unsw.edu.au>
// data_off_watermark += 1;
// Have to comment out to keep clippy happy, else:
// "warning: value assigned to `data_off_watermark` is never read", or if we try to allow with `#[allow(unused_assignments)]`:
// "error[E0658]: attributes on expressions are experimental"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or just remove these commented lines entirely?

@Ivan-Velickovic
Copy link
Collaborator

I was able to get the objcopy working with the segment having zero size so maybe we should just remove the fake data part.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants