Compiling Bootloader and sketch into single .elf file

Take the .hex file of your sketch and the .hex file of your bootloader. Open both of them in a text editor. Remove the last line ':00000001FF' in there and just append the bootloader 'text'.