I\'m writing the startup code for an embedded system -- the code that loads the initial stack pointer before jumping to the main() function -- and I need to tell it how many
I ended up writing a python script to implement τεκ's answer. It's too much code to post here, but can be found on github