Some extensions to the .section directive for ELF and COFF

Rafael Espíndola rafael.espindola@gmail.com
Fri Mar 27 12:48:00 GMT 2015


The use case in mind is saving size during -ffunction-section,
-fdata-section, so we need real sections, not subsections.

For hand written assembly, they are relatively short and I don't
expect programmers have problems creating short unique names for
sections.

Cary, any reason for preferring a name instead of just a number? I
initially went with nothing since a compiler can just print everything
for a function/data item and be done with it. Changing llvm to do so
was a bit more work than I was expecting, but it did clear up some
cruft and it now prints more readable assembly.

Alan, why is section symbols a problem? We just produce multiple
sections symbols. Would an unique id help with the other issues (not
familiar with ARM and IA64).

Cheers,
Rafael



More information about the Binutils mailing list