So yeah, I have been trying to compile programs for an attiny84, and low and behold if the sketch is over 4kB, the mysterious PCREL error shows its ugly head.
arduino-1.0.1/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/lib/avr25/crttn85.o:(.init9+0x2): relocation truncated to fit: R_AVR_13_PCREL against symbol `exit' defined in .fini9 section in /arduino-1.0.1/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/avr25\libgcc.a(_exit.o)
Notice the 'avr25' bit in the error above. This relates to the vast majority of the attiny series that are commonly used for arduino.
The issue was fixed as of WinAVR 20090313, but nobody at Arduino have decided including the latest version is sensible, so we are stuck at 20081205. So how to make it work?
I saw one solution which was to download and extract the latest version, and then have two folders, one for each, swapping back and forth if necessary. I didn't like that idea, so I decided to figure out exactly what files from the 2009 version are needed, and guess what, there is only 1!
I have attached a zip file which works for the file structure in windows. If you have this issue, you can just copy the 'hardware' folder inside the zip file into the arduino directory and it will replace the one file (ld.exe).
The fix doesn't affect the rest of the IDE, the newer version of ld.exe appears to compile programs the same way as the older one. As far as I can tell from the documentation, the PCREL patch was the only one applyed to the file between the two versions.For MacOS, see Reply #4 to this thread to see how to apply the patch
Both ZIP files contain the same patch, but some people seem to be having trouble downloading the first one, i think because there are spaces in the name, so I have posted it again with a different name
The cure fixes both AtTiny85 and AtTiny84, as well as other avr25 MCUs.