Bootloader question: Does it skip the first X bytes of the .HEX file?

liudr:
It all makes sense until I realized that the first 512 bytes of UNO or first 4KB of MEGA 2560 are for bootloaders.

No, the bootloader goes at the end of memory.

See Figure 26-2 in the datasheet