I'm posting this just as a PSA since I spent a few hours tracking down this issue. I compiled the Optiboot bootloader that came with the v1.8.9 Arduino distribution using the internal compiler and toolchain. When I tried to load the bootloader via avrdude, I got the following error:
avrdude: ERROR: address 0x8010 out of range ...
The problem is a combination of Optiboot requiring more space and the makefile not changing to accomodate this. In the makefile, when you create a board, you will have this line:
NAMEOFYOURBOARD: LDSECTIONS = -Wl,--section-start=.text=0x7e00 -Wl,--section-start=.version=0x7ffe
In the linker directive, the .text is allocated space between 0x7e00 and 0x7ffe. If it doesn't fit (and it didn't), you will get the out of range error. In this case, the code compiled and went up to 0x8010. The fix is to change the .text start location in the linker directive:
NAMEOFYOURBOARD: LDSECTIONS = -Wl,--section-start=.text=0x7d00 -Wl,--section-start=.version=0x7ffe
In this case, I gave it an extra 0x100 or 256 bytes. With this modification, everything fits in it's allocated space and avrdude is happy.
Hope this helps anyone else that runs into this issue.