[RFC PATCH] gas: correct .bss documentation for non-ELF

Jan Beulich jbeulich@suse.com
Mon Nov 27 12:08:18 GMT 2023


On 27.11.2023 12:27, Nick Clifton wrote:
>> Only ELF permits the specification of a subsection.
> 
> Patch approved - obviously.
> 
>> Except for H8 this doesn't look to have any effect, because all.texi
>> blindly enables various object formats. Yet still the documentation ends
>> up wrong for non-ELF targets.
> 
> Although the text in the node does mention that subsections are only
> support for ELF based targets.

Right. That was one half of the reason for sending this as RFC. The other
was the very limited effect this change has in reality (as mentioned above).

> One question:
> 
>> +@ifset ELF
>>   @node Bss
>>   @section @code{.bss @var{subsection}}
>> +@end ifset
>> +@ifclear ELF
>> +@node Bss
>> +@section @code{.bss}
>> +@end ifclear
>>   @cindex @code{bss} directive
> 
> Does the texi format care that there are two instances of "@node Bss" ?
> I assume not and that you have tested it.  It just seemed a little counter
> intuitive to me.  I would have thought:
> 
>    @node Bss
>    @ifset ELF
>    @section @code{.bss @var{subsection}}
>    @end ifset
>    @ifclear ELF
>    @section @code{.bss}
>    @end ifclear
> 
> Would be a slightly simpler arrangement.  Not that it matters really.

That's how I had it initially, until a broken build quickly told me it
needs to be the redundant way for at least some version of some of the
tools processing this file as input.

Jan


More information about the Binutils mailing list