Re: [patch, avr-libc] Fix atexit.c

Erik Christiansen <[email protected]>
Newsgroups gmane.comp.hardware.avr.gcc
Message-ID <20141015092150.GA1944@ratatosk>
On 14.10.14 15:21, Joern Rennecke wrote:
> On 14 October 2014 12:36, Erik Christiansen <[email protected]> wrote:
> > then changing "*(.fini6)" to "*(.fini6*)" should avoid the orphaning.
> 
> It's not quite that simple, you'd have to sort the sections to get a
> predictable execution order.  Unfortunately, ld allows only sorting
> section by ascending (not descending) name / init priority

OK, there you are raising a new requirement, not addressed by Johann or
myself, and unrelated to the orphaning issue to which you purport to
reply. I do hope that you understand that the tweak should do what is
claimed?

As to the new issue, it appears that the primitive method of relying on
file link order is inadequate to your needs, and that you're using
sort-section=name on the commandline or SORT_BY_NAME(.foo*) in the
linker script. If the limitation of ascending sort is backwards for you,
then might I respectfully suggest that you are choosing the wrong names.

Erik

-- 
Patient:  "Doctor, it hurts when I do this..."
Doctor:  "Well, don't do that!"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.