title: Do .bss section zero initialized variables occupy space in elf file?
body: <p>If I understand correctly, the <code>.bss</code> section in ELF files is used to allocate space for zero-initialized variables. Our tool chain produces ELF files, hence my question: does the <code>.bss</code> section actually have to contain all those zeroes? It seems such an awful waste of spaces that when, say, I allocate a global ten megabyte array, it results in ten megabytes of zeroes in the ELF file. What am I seeing wrong here?</p>