This is the mail archive of the
mailing list for the binutils project.
Re: Some extensions to the .section directive for ELF and COFF
- From: Rafael EspÃndola <rafael dot espindola at gmail dot com>
- To: dvalin at internode dot on dot net
- Cc: Binutils <binutils at sourceware dot org>, Cary Coutant <ccoutant at google dot com>, Alan Modra <amodra at gmail dot com>
- Date: Fri, 27 Mar 2015 08:48:32 -0400
- Subject: Re: Some extensions to the .section directive for ELF and COFF
- Authentication-results: sourceware.org; auth=none
- References: <CAG3jReLKTfN_o1x7_jpMDVzMHemmx9K9P4-yU4qNLm2xtPpd+Q at mail dot gmail dot com> <20150326015631 dot GT26234 at bubble dot grove dot modra dot org> <CAJimCsGPLYFYfAvF3OzyhCmCBvXp3FT3rF-7zb7H2jbi-3+BSQ at mail dot gmail dot com> <CALehDX7ec5i=-FCL1H=uuCwq2LXY53nt2a-MBZce3AZuEckqzQ at mail dot gmail dot com> <20150327114517 dot GA3655 at ratatosk>
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
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).