This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH COMMITTED: Implement constructor priorities in gold

"Matt Rice" <> writes:

> On Fri, Mar 28, 2008 at 4:21 PM, Michael Hennebry
> <> wrote:
>>  What are constructor priorities?
>>  Google produces several results,
>>  including comments to the effect that some compiler
>>  or another doesn't implement them correctly,
>>  but nothing informative to me.
> it is my possibly naive interpretation that constructor priorities
> allow you to specify the order in which constructors are called,


search for "constructor (priority)".

> this may not be the appropriate place to mention this but i noticed
> the documentation on constructor priorities do not specify what the
> default constructor priority is and was left wondering

It's intentionally left undefined.  What happens today is that the
objects which appear first in the link command have their constructors
run first.  However, when several different objects are included from
a single archive file, it is difficult to predict which one's
constructors will be run first.  Destructors are run in the reverse
order of constructors.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]