This is the compile output:
-------- begin --------
avr-gcc (GCC) 5.4.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Compiling: stk500boot.c
avr-gcc -c -mmcu=atmega2560 -I. -gdwarf-2 -DF_CPU=16000000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -fno-jump-tables -Wall -Wstrict-prototypes -Wa,-adhlns=stk500boot.lst -std=gnu99 -D_MEGA_BOARD_ -D_MEGA_BOARD_ stk500boot.c -o stk500boot.o
Linking: stk500boot.elf
avr-gcc -mmcu=atmega2560 -I. -gdwarf-2 -DF_CPU=16000000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -fno-jump-tables -Wall -Wstrict-prototypes -Wa,-adhlns=stk500boot.o -std=gnu99 -D_MEGA_BOARD_ -D_MEGA_BOARD_ stk500boot.o --output stk500boot.elf -Wl,-Map=stk500boot.map,--cref -lm -Wl,--section-start=.text=3E000
Creating load file for Flash: stk500boot.hex
avr-objcopy -O ihex -R .eeprom stk500boot.elf stk500boot.hex
Creating load file for EEPROM: stk500boot.eep
avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" \
--change-section-lma .eeprom=0 -O ihex stk500boot.elf stk500boot.eep
avr-objcopy: --change-section-lma .eeprom=0x0000000000000000 never used
Creating Extended Listing: stk500boot.lss
avr-objdump -h -S stk500boot.elf > stk500boot.lss
Creating Symbol Table: stk500boot.sym
avr-nm -n stk500boot.elf > stk500boot.sym
Size after:
AVR Memory Usage
----------------
Device: atmega2560
Program: 5928 bytes (2.3% Full)
(.text + .data + .bootloader)
Data: 18 bytes (0.2% Full)
(.data + .bss + .noinit)
-------- end --------
mv stk500boot.hex stk500boot_v2_mega2560.hex