Solution to PCREL error for avr25/ATTiny84/ATTiny85/ATTiny88.

Dear Tom

I'm having the same problems at everybody in this thread but your fix unfortunately hasn't helped. I'm using Arduino Uno and ATtiny85. Here's my error:

c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/bin/ld.exe: inf_mirror.cpp.elf section .text will not fit in region text
c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/bin/ld.exe: region text overflowed by 4440 bytes
c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/lib/avr25/crttn85.o: In function `__vector_default':
(.vectors+0x8): relocation truncated to fit: R_AVR_13_PCREL against symbol `__vector_4' defined in .text.__vector_4 section in core.a(wiring.c.o)
c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/lib/avr25/crttn85.o:(.init9+0x0): relocation truncated to fit: R_AVR_13_PCREL against symbol `main' defined in .text.main section in core.a(main.cpp.o)
c:/program files (x86)/arduino/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 c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/avr25\libgcc.a(_exit.o)
inf_mirror.cpp.o: In function `__static_initialization_and_destruction_0':
C:\Program Files (x86)\Arduino/inf_mirror.ino:21: relocation truncated to fit: R_AVR_13_PCREL against symbol `Potentiometer::Potentiometer(unsigned char)' defined in .text._ZN13PotentiometerC1Eh section in Potentiometer\Potentiometer.cpp.o
C:\Program Files (x86)\Arduino/inf_mirror.ino:22: relocation truncated to fit: R_AVR_13_PCREL against symbol `Potentiometer::Potentiometer(unsigned char)' defined in .text._ZN13PotentiometerC1Eh section in Potentiometer\Potentiometer.cpp.o
inf_mirror.cpp.o: In function `AllOn()':
C:\Program Files (x86)\Arduino/inf_mirror.ino:1077: relocation truncated to fit: R_AVR_13_PCREL against symbol `digitalWrite' defined in .text.digitalWrite section in core.a(wiring_digital.c.o)
C:\Program Files (x86)\Arduino/inf_mirror.ino:1078: relocation truncated to fit: R_AVR_13_PCREL against symbol `shiftOut' defined in .text.shiftOut section in core.a(wiring_shift.c.o)
C:\Program Files (x86)\Arduino/inf_mirror.ino:1079: relocation truncated to fit: R_AVR_13_PCREL against symbol `shiftOut' defined in .text.shiftOut section in core.a(wiring_shift.c.o)
C:\Program Files (x86)\Arduino/inf_mirror.ino:1080: relocation truncated to fit: R_AVR_13_PCREL against symbol `digitalWrite' defined in .text.digitalWrite section in core.a(wiring_digital.c.o)
C:\Program Files (x86)\Arduino/inf_mirror.ino:1081: relocation truncated to fit: R_AVR_13_PCREL against symbol `delay' defined in .text.delay section in core.a(wiring.c.o)
inf_mirror.cpp.o: In function `Checker()':
C:\Program Files (x86)\Arduino/inf_mirror.ino:47: additional relocation overflows omitted from the output

Here's what I've done to try to fix it:

  1. Followed every step in Tiny85 PCREL error - #2 by Coding_Badly - Microcontrollers - Arduino Forum (I didn't have WinAVR previously so didn't have to replace anything, there was no tools folder)
  2. Downloaded the patch and replaced the ld.exe file in the hardware/tools/avr/avr/bin folder with the one from the patch zip

I definitely got the Windows version, not the Mac one.
I have restarted the IDE.

Let me know if I should post anything else, like my code (really long and essentially irrelevant to this problem if I understand correctly) or boards.txt. Thanks a bunch!