Correct me if I'm wrong, but after looking this over it looks like the .hex files generated by GCC do not support the upper 64k of memory in the ATmega128.
This is a sample .hex record:
It is read as follows
10 = 16 bytes in the record
06B0 = Starting address in memory of the record
00 = Data record
38F08D91C8953196801919F40020B1F7 = 16 bytes of data
62 = 2's compliment checksum
The problem is this - There is only 16 bits reserved for addressing in the .hex file making a top address of 64k. I know the AVR parts use a 16 bit memory organization but the hex file is not, it is 8 bit orgranized.
If the hex file is 8 bit organized with a 16 bit address slot, there is no way to access the upper 64k unless two .hex files are generated?
I hope someone can clear this up for me.