Asking here because ArduPilot is close to 128k.
I'm getting linker errors with a modified ArduPilot because code has gone past 128k
how do I get link flags passed by the IDE?
I'm not sure if it will work, but supposedly..
edit: Ok I did some more digging, and there is a modified Arduino IDE hanging around where you can pass extra flags in preferences.txt to the linker, for pretty much the same reason:
If you push past 128k code then you can't get working projects without building outside the stock IDE eg with Make or eclipse.
Download a modified version 22 IDE, discussed here http://aeroquad.com/showthread.php?2061-ArduinoIDE-with-external-AVR-toolchain-and-compiler-options. from here http://www.mostlysoftware.com/files/ArduinoIDE/
and add new linker options to preferences.txt as per the readme
and voila. you can build code past the 128k level on the mega hardware without linker "internal error" messages.