Why does AVR-GCC indicate that there is a "bootloader"?
It doesn't. What it shows is the cumulated memory consumption of these three sections. So when there is no bootloader, then the contribution of the .bootloader section is zero.
The mentioned output sections all contribute to the consumed flash size, and therfore when you are interested in the consumed flash size, all mentioned sections have to be considered.
Apart from that, the output is from avr-size and not form the compiler.
For a documentation of memory sections, see for example https://avrdudes.github.io/avr-libc/avr-libc-user-manual/mem_sections.html
Contrary to what has been claimed in a comment, .bootloader is not part of the default linker scripts. When there is code in this section, it will be treated like an orphan section.
avr-size is showing .bootloader because it is hard coded knowledge in avr-size.
Also notice that the used options for avr-size like --mcu are from a private patch that never made it into the official Binutils code base. When you want to display usage of statically allocated memory, you can use the official
$ avr-objdump -P mem-usage <elf-file>
instead.
.datais present twice and they probably meant.rodataor similar in the first case..bootloaderis orphan..dataoccurs twice since it occupies RAM (obviously) and also flash (since the startup code has to initialize static storage from non-volatile memory, which is flash). The.rodatainput sections are treated like.data, at least this is the case for classic AVR devices like ATtiny13. Only for theavrxmega2_flmapandavrxmega4_flmapemulations there is a.rodataoutput section, see for example sourceware.org/PR31124