RFC: ld: Add --text-section-ordering-file (version 2)

Nick Clifton nickc@redhat.com
Thu May 2 15:16:56 GMT 2024


Hi Alan,

> The patch wasn't too far wrong.  I had some compile issues when plugin
> support was disabled, and it is probably a bad idea to allow creation
> of new output sections via --section-ordering-file, so that is now
> disallowed.

Thanks for creating this.  I am playing with it at the moment.

> I'm not putting forward this patch as a finished work, it's just a
> demonstrator.
> 
> What I'd like to see is:
> 1) Lose that horrible "INCLUDE section-ordering-file" requirement for
>     existing scripts.  Do you really want that put into every output
>     section in every script in scripttempl/?

No, and removing the need to do this is definitely a good thing.

> 2) Parse the section ordering file in ldgram.y.  An entry under file:
>     would be appropriate, like we do for version scripts.  That would
>     at least lose the SECTIONS clause required by my demonstrator
>     patch.  You wouldn't necessarily need to follow existing
>     specification of output and input sections, or to support other
>     things allowed in output sections, but I do think a syntax with an
>     explicit output section is a good idea.  ie. not one where the
>     output .text is deduced from the input .text.mumble.

Hmm, OK, I will look into this.

Cheers
   Nick



More information about the Binutils mailing list