Closed dylanmckay closed 8 years ago
After doing a lot of the work for this, I realised that this is why AVR-GCC never resolves branch fixups during compilation time and instead promotes them all to ELF relocations in the object file.
This means that the linker will be able to make this decision. I believe this is what we should also do.
The way I implemented this was also tricky because there wasn't really any information about where the code will be in memory at this stage in the pipeline. This is inevitably a solution that should be done in the linker.
promotes them all to ELF relocations in the object file.
be done in the linker.
Does the linker then understand that certain instructions have limits, but that it's optimal to use them when it can? Or will everything become a branch to a jump?
Does the linker then understand that certain instructions have limits, but that it's optimal to use them when it can? Or will everything become a branch to a jump?
It understands the limits, and only turn branches into trampolines if they are out of bounds.
Will fix #209.