I encountered this error while writing a large project with a MEGA2560 that uses a dozen libraries.
This error occurred when I was adding code that uses stof, strtod, toupper etc. It would read like:
"...relocation truncated to fit: R_AVR_13_PCREL against symbol..."
I searched this issue and started to understand it has something to do with compiler using relative jump and call in place of absolute jump and call as a way to optimize code. Some said compiler options help solve the problem and others say adding some PROGMEM array of various size and rearranging code will help. Here are some related webpages and threads:
http://forum.arduino.cc/index.php?topic=311669.0
http://forum.arduino.cc/index.php?topic=299481.0
Good explanation:
I wonder if there is a method to avoid this bug or error using Arduino IDE. I'm not set up to use another IDE (co-developing project so I don't want to go off tangent to chase another IDE that may or may not solve this problem).
Will platform.txt be where I can add some compiler parameters?