This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: .section directives with the same name but different fields
On Thu, Feb 06, 2020 at 05:25:33PM +0000, bd1976 llvm wrote:
> Hi Alan, thanks for the input here. I wonder if it wouldn't be more
> consistent to error in all cases - even in the case of different group
> signatures. The only exception would need to be for the special section
> names (.text, .debug_str, etc...) that the assembler has special knowledge
> of (as you explained).
Yes, let's see how that goes.
https://sourceware.org/ml/binutils/2020-02/msg00129.html
> I wonder why creating multiple sections with the
> same name for section directives with different group signatures was
> implemented - why not just require the use of a distinct section name for
> these?
I think plain ".text" for a group's text section is fine. Distict
names would just be yet another thing to track for a group.
> Or, now that GNU has the ",unique,N" assembly extension (
> https://sourceware.org/ml/binutils/2020-02/msg00028.html) that could be
> used if the section name is fixed - it would then be explicit in the source
> code that another section with the same name will be created.
Perhaps, but we aren't designing a new toolchain. Backwards
compatibility can't be discarded without compelling reasons.
--
Alan Modra
Australia Development Lab, IBM