This is the mail archive of the libc-help@sourceware.org mailing list for the glibc 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: libc initialization and GCC's constructor with priority attribute


On 14 Sep 2015 11:17, VÃclav Haisman wrote:
> I am trying to use the `__attribute__ ((__constructor__ ((prio))))`
> GCC attribute to initialize my library early, if possible. What
> concerns me is that I do not know what what priority I can safely use
> so that libc is reliably initialized before my library, for obvious
> reasons. So, the question is, at what priority is libc itself
> initialized in the terms of this attribute?

i thought this was documented somewhere, but i guess it's only
indirectly so through compile-time warnings.  as long as you use
a prio >= 101 (so values 0 through 100 are reserved), you should
be fine.
-mike

Attachment: signature.asc
Description: Digital signature


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