Re: [patch, avr-libc] Fix atexit.c
Joern Rennecke <[email protected]>
| Newsgroups | gmane.comp.hardware.avr.gcc |
|---|---|
| Message-ID | <CAMqJFCoQ7t0HN8+=EftdPEvj52PZLdzb_au=3RY=b+W4FLkGCw@mail.gmail.com> |
On 14 October 2014 12:36, Erik Christiansen <[email protected]> wrote: > On 14.10.14 12:43, Georg-Johann Lay wrote: >> Issuance of calls to functions as registered by atexit() is located in >> section .fini6a. As the current linker description does not handle that >> section > > It's a bit late for this case, now that you have fixed it another way, Looking at avr-libc/doc/api/sections.dox, fini7 was supposed to be under definable. > which as you describe, is an improvement to boot, but if something like > this crops up again, and is not amenable to similar adroitness, 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