tock / elf2tab

Tool to create Tock Application Bundles from ELF files.
MIT License
15 stars 33 forks source link

Padding between sections only < 100 #54

Closed bincsh closed 2 years ago

bincsh commented 2 years ago

Padding is important to maintain the correct addresses when PIC is not in place. Currently, elf2tab only pads up to 99 bytes. It must pad between sections always, and to panic if it doesn't (maybe warning, if section is not .text).

Found it when building an app using a library that has .rodata aligned to 1024 bytes. This section (.rodata) gets linked in .text for Tock Apps. I've fixed this problem by increasing the number to 4096 bytes.

hudson-ayers commented 2 years ago

Fixed by https://github.com/tock/elf2tab/pull/55