Skip to content

Some test scripts for correctly building libtock-c apps

Notifications You must be signed in to change notification settings

labbott/libtock-c_building

Repository files navigation

= What is this

Tock application binaries require applications to be linked at a very specific address. This turns out to be pretty fragile since it requires guessing/figuring out what addresses to use and then hoping nothing changes to throw it off. This is a proof of concept/pile of hacks to show what reliable linking might look like

The step are roughly:

  • Build the app with a guess of what addresses we should be using
  • Parse the output of elf2tab to get the (correct) size of the header
  • Check the associated kernel binary to see where the app memory actually starts- Substitutes those values back into the linker script
  • Build the app again, hopefully linked at the correct address.

This at least prevents problems like the binary no longer working if the app name changes but there's certainly room for improvement.

About

Some test scripts for correctly building libtock-c apps

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published