Question Details

No question body available.

Tags

assembly gcc memory elf binutils

Answers (1)

June 22, 2026 Score: 1 Rep: 381,507 Quality: Medium Completeness: 80%

Looks like just a simplification of the asm output to remove redundant attributes which must have already been the default.

@progbits is the default (in GAS, the GNU assembler) for at least some standard section names like .data, .rodata, and .text. I guess this also applies to any section that's .data. or .rodata.. In hand-written asm with GAS you definitely don't need to specify @progbits for standard section names like .text. Again, from the fact that the GCC output omits @progbits, we can infer that it must be the default at least for those .text.* and similar sections.

Or maybe @progbits is the default in general? So you have to specify @nobits on any section you don't want to be emitted into the output, except for .bss which is automatically @nobits.

I checked the GAS manual (both the .section entry and the chapter on Sections); I didn't see a mention of @progbits or @nobits being a default. (The sections chapter documents that .bss doesn't take space in the object file / executable, though. So it is @nobits, but it doesn't use that attribute in the description).