prusa3d / Prusa-Firmware-MMU

Other
32 stars 15 forks source link

build: Set -mrelax to remove trampolines while linking #220

Closed wavexx closed 1 year ago

wavexx commented 1 year ago

Avr GCC automatically marks all indirect calls for trampoline generation irregardless of the target.

This can be avoided by forcing -mshort-calls or using -mrelax that removes the trampoline at link time (after the call location has been proven to be reachable).

This saves 510 bytes on the current build (the trampolines section is now empty as expected).