Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |  

This web mail archive is frozen.

This page is part of a frozen web archive of this mailing list.

You can still navigate around this archive, but know that no new mails have been added to it since July of 2016.

Click here to be taken to the new web archives of this list; it includes all the mails that are in this frozen archive plus all new mails that have been sent to the list since it was migrated to the new archives.

Subject: Re: [OMPI devel] RFC: Add an __attribute__((destructor)) function to opal
From: Paul Hargrove (phhargrove_at_[hidden])
Date: 2014-07-15 17:20:56

On Tue, Jul 15, 2014 at 12:49 PM, Pritchard, Howard r <howardp_at_[hidden]>

> I don't think there's anything wrong with using ctor/dtors in shared
> libraries,
> but one does need to make sure that in these functions there's no
> assumptions
> about ordering of them wrt to other ctors/dtors.

The ELF specification is clear that the order of execution of DT_INIT and
DT_FINI entries is undefined.
The .ctors and .dtors sections typically used by the GNU toolchain are, I
believe, not part of any formal linker specification.
So, I agree w/ Howard that one must take care not to assume anything about


Paul H. Hargrove                          PHHargrove_at_[hidden]
Future Technologies Group
Computer and Data Sciences Department     Tel: +1-510-495-2352
Lawrence Berkeley National Laboratory     Fax: +1-510-486-6900