[haiku-bugs] Re: [Haiku] #6793: Issues with __cxa_atexit

  • From: "kaliber" <trac@xxxxxxxxxxxx>
  • Date: Tue, 16 Nov 2010 19:16:38 -0000

#6793: Issues with __cxa_atexit
--------------------------------+------------------------------
  Reporter:  kaliber            |        Owner:  axeld
      Type:  bug                |       Status:  closed
  Priority:  normal             |    Milestone:  R1
 Component:  System/libroot.so  |      Version:  R1/Development
Resolution:  fixed              |     Keywords:
Blocked By:                     |  Has a Patch:  1
  Platform:  All                |     Blocking:
--------------------------------+------------------------------

Comment (by kaliber):

 Replying to [comment:9 bonefish]:
 > I see two issues with the patches:
 >  - I doubt the gcc patch is sufficient. By using the shared library glue
 code `__cxa_finalize()` will be called, but since gcc hasn't ever output
 code using `__cxa_atexit()` I suspect it won't do that now either. So it
 probably has to be enabled explicitly.

 I think that `--enable-__cxa_atexit` is sufficient. I've enabled it by
 default for Haiku in gcc/config.gcc

 >  - Selecting the glue code depending on the `shared` option has the
 problem that it won't work for executable add-ons -- `__cxa_finalize()`
 will not be called for them.

 Are there executable and non-executable add-ons? For example filetype add-
 on for tracker is build with `-nostart` (`-shared`), so it will work. If
 there are executable add-ons, we can introduce -addon flag for gcc.

-- 
Ticket URL: <http://dev.haiku-os.org/ticket/6793#comment:10>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: