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
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!
Does anybody have any tips for me? I'm making a birthday present for my little nephew for his party tomorrow and I'll be in quite a pickle if I can't get this sorted. Any help would be greatly appreciated!
I just set up Arduino IDE and did everything again according to instructions on a new computer (and there was stuff different between this and the one from before, like when I installed Arduino IDE on the previous one there was no tools directory, but now there was). And the ld.exe file was dated 03/14/2009.
Anyway, I've done everything and things are looking up, but there still one error (related to ld.exe).
e:/arduino in/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/bin/ld.exe: infmirror.cpp.elf section .text will not fit in region text
e:/arduino in/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/bin/ld.exe: region text overflowed by 4440 bytes
I've replaced the old ld.exe (dated 12/04/2008) with the one from the patch (dated 3/14/2009) but now this is the only error I get. Any ideas?
EDIT: I've just discovered that now I'm just being dumb and I've exceded the ATtiny capacity... So I'm all good now, I'll just have to try to shorten the code before the big birthday tomorrow. Thanks a bunch Coding Badly!
I know I'm resurrecting this post but I wanted to let the community know that I was having the same PCREL error while trying to verify code on an ATTiny85 using IDE 1.0.6 on a late 2014 mac. I downloaded the zip in post #4 and moved it to the mentioned directory, after deleting the old ID file first, and it worked like a charm. thanks for the fix Tom.
Weird that the Arduino team still has not addressed this yet seeing as there are plenty of people using ATTiny85s and the fix seems so simple, must be super busy.
ƎR:
I just updated IDE to 1.0.6 on windows and the problem came back... with 1.0.5 worked wonderfully.
Anyone have noticed the same problem?
Probably have to reapply the same fix; I'll bet it overwrote the working version of the compiler tools with the same non-working one the IDE came with.
Wow, I was scratching my head for a couple weeks thinking there was something wrong with my code, till I found this. THANK YOU! We need more people in this world such as yourself.