[PATCH] New configuration option for lite exit

Jeff Johnston jjohnstn@redhat.com
Wed May 29 19:29:00 GMT 2013


On 05/28/2013 06:28 AM, Corinna Vinschen wrote:
> On May 28 18:12, Ye Joey wrote:
>> On Sat, Apr 27, 2013 at 7:18 PM, Sebastian Huber
>> <sebastian.huber@embedded-brains.de> wrote:
>>>
>>> Hello,
>>>
>>> why can't you use _exit() or _Exit()?
>>>
>>> http://pubs.opengroup.org/onlinepubs/009695399/functions/exit.html
>> Sebastian, Corinna,
>>
>> This patch makes calls to expensive clean up functions as weak
>> reference, so one can still keep original functionality by explicitly
>> pull-in symbols. Comparing to simply skipping them to _exit or _Exit,
>> this approach is more flexible and testing friendly. In another word,
>> user can still get a full functional libc even if it is built with
>> --enable-lite-exit.
>>
>> Please let me know if you still have concerns.
>
> I don't know.  I guess I defer the decision to Jeff.
>
>
> Corinna
>

Sorry I have been busy with an up-coming Eclipse release and two 
customer presentations.

Looking at it, this needs documentation as it is not straight-forward 
with regards to how the whole design ties together (i.e. what are the 
behaviour rules for the application / compiler).  You might also state 
what this accomplishes on your initial platform.

AFAICT, if a call is made to __cxa_atexit, nothing will occur unless a 
call is also made to __cxa_finalize or atexit() or on_exit().  The exit 
list won't be run on exit if just on_exit() is called because 
__call_exitprocs() won't be brought in.

-- Jeff J.



More information about the Newlib mailing list