The problem stems from a bug in the linker. This is the best description of the problem I've been able to find...
http://old.nabble.com/Advice-on-R_AVR_13_PCREL-errors-linking-for-Tiny85-_and_-Mega168-!-td21652985.html
Basically, the problem stems from the fact that the linker allows all devices in only the avr2 and avr4 architectures to wrap around the offsets. Devices in the avr25 architecture should be allowed to do that too (as avr25 is the same as avr2, plus 2 extra instructions), but for some reason it looks like the avr25 was forgotten when it comes to this reloc. It just so happens that the ATtiny85 belongs to the avr25 architecture. My work colleague mentions that he doesn't have this problem when he uses an ATmega8 (with the same amount of code space). And that is because the ATmega8 belongs to the avr4 architecture.
Fortunately, the bug was fixed long ago so upgrading the toolset takes care of the problem.
This is what I did (with the caveat that I may have forgotten some steps)...
? Ensure the Arduino IDE is not running
? Download the latest version of WinAVR from here...
http://winavr.sourceforge.net/
? Install WinAVR. I installed to "C:\WinAVR" and will use that directory name as an example.
? Locate the AVR toolset directory used by Arduino. The directory name is "avr" and is located in "{ArduinoRoot}\hardware\tools".
? Rename the AVR toolset directory. In my case, I changed the directory name from "avr" to "avr (old)".
? Create a new directory named "avr"
? Copy all of WinAVR into the newly created AVR toolset directory. In my case, I copied everything in "C:\WinAVR" to "{ArduinoRoot}\hardware\tools\avr".
? Create an "etc" directory in the "{ArduinoRoot}\hardware\tools\avr" directory
? Locate and open the "avrdude.conf" file. It is now located in the "{ArduinoRoot}\hardware\tools\avr\bin" directory.
? Search for the "ATtiny25" section and make the following addition (the first element is page-el (pagel) not page-one)...
#------------------------------------------------------------
ATtiny25
#------------------------------------------------------------
part
id = "t25";
desc = "ATtiny25";
has_debugwire = yes;
flash_instr = 0xB4, 0x02, 0x12;
eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
0xBC, 0x02, 0xB4, 0x02, 0xBA, 0x0D, 0xBB, 0xBC,
0x99, 0xE1, 0xBB, 0xAC;
no STK500 devcode in XML file, use the ATtiny45 one
stk500_devcode = 0x14;
avr910_devcode = ?;
Try the AT90S2313 devcode:
avr910_devcode = 0x20;
signature = 0x1e 0x91 0x08;
reset = io;
chip_erase_delay = 4500;
pagel = 0x00;
bs2 = 0x00;
? Still working In the "ATtiny25" section, search for (or page down to) ... memory "lock" .. and change the entry to this...
memory "lock"
size = 1;
write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
"x x x x x x x x 1 1 i i i i i i";
read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
"0 0 0 0 0 0 0 0 o o o o o o o o";
min_write_delay = 9000;
max_write_delay = 9000;
;
? Search for the "ATtiny45" section and make the following addition (the first element is page-el (pagel) not page-one)......
#------------------------------------------------------------
ATtiny45
#------------------------------------------------------------
part
id = "t45";
desc = "ATtiny45";
has_debugwire = yes;
flash_instr = 0xB4, 0x02, 0x12;
eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
0xBC, 0x02, 0xB4, 0x02, 0xBA, 0x0D, 0xBB, 0xBC,
0x99, 0xE1, 0xBB, 0xAC;
stk500_devcode = 0x14;
avr910_devcode = ?;
Try the AT90S2313 devcode:
avr910_devcode = 0x20;
signature = 0x1e 0x92 0x06;
reset = io;
chip_erase_delay = 4500;
pagel = 0x00;
bs2 = 0x00;
? Still working In the "ATtiny45" section, search for (or page down to) ... memory "lock" .. and change the entry to this...
memory "lock"
size = 1;
write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
"x x x x x x x x 1 1 i i i i i i";
read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
"0 0 0 0 0 0 0 0 o o o o o o o o";
min_write_delay = 9000;
max_write_delay = 9000;
;
? Finally, search for the "ATtiny85" section and make the following addition (the first element is page-el (pagel) not page-one)......
#------------------------------------------------------------
ATtiny85
#------------------------------------------------------------
part
id = "t85";
desc = "ATtiny85";
has_debugwire = yes;
flash_instr = 0xB4, 0x02, 0x12;
eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
0xBC, 0x02, 0xB4, 0x02, 0xBA, 0x0D, 0xBB, 0xBC,
0x99, 0xE1, 0xBB, 0xAC;
no STK500 devcode in XML file, use the ATtiny45 one
stk500_devcode = 0x14;
avr910_devcode = ?;
Try the AT90S2313 devcode:
avr910_devcode = 0x20;
signature = 0x1e 0x93 0x0b;
reset = io;
chip_erase_delay = 4500;
pagel = 0xB3;
bs2 = 0xB4;
? Still working In the "ATtiny85" section, search for (or page down to) ... memory "lock" .. and change the entry to this...
memory "lock"
size = 1;
write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
"x x x x x x x x 1 1 i i i i i i";
read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
"0 0 0 0 0 0 0 0 o o o o o o o o";
min_write_delay = 9000;
max_write_delay = 9000;
;
? Save and close the "avrdude.conf" file.
? Copy the "avrdude.conf" file to the {ArduinoRoot}\hardware\tools\avr\etc\ directory
That's it. You should now be able to start the Arduino IDE and continue work!
Switching to the previous AVR toolset...
? Ensure the Arduino IDE is not running
? Locate the current AVR toolset directory used by Arduino. The directory name is "avr" and is located in "{ArduinoRoot}\hardware\tools".
? Rename the current AVR toolset directory. In my case, I changed the directory name from "avr" to "avr (new)".
? Rename the previous AVR toolset directory back to "avr". In my case, I change the directory name from "avr (old)" to "avr".
? Start the Arduino IDE and continue work
Notes...
? I have not been able to find a definitive source for the "pagel" and "bs2" settings. My suspicion is that the values should all be the same. I've found people that have suggested 0xF0 / 0xF1, 0x00 / 0x00, and 0xB3 / 0xB4. The values are used for "parallel programming". If you don't do parallel programming, the values do not come into play.
? The memory "lock" entries are essentially meaningless. The ATtinyX5 processors do not have lock bits. The Tiny Core allows the fuses to be changed by executing "Burn Bootloader" from the Arduino IDE. The memory "lock" entries appease the IDE into believing it has correctly installed a bootloader.