Re: -z preinitarray
From: Seongbae Park (Seongbae.Park_at_Sun.COM)
Date: 04/29/05
- Next message: Rich Teer: "Re: Assigning privs to a program?"
- Previous message: Thomas Maier-Komor: "Re: setting screen resolution for solaris 8 (CDE)"
- In reply to: Dan Koren: "-z preinitarray"
- Next in thread: Dan Koren: "Re: -z preinitarray"
- Reply: Dan Koren: "Re: -z preinitarray"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 29 Apr 2005 15:33:01 +0000 (UTC)
Dan Koren <dankoren@yahoo.com> wrote:
>
>
> I tried moving one of the initialization functions in a
> shared library to the preinitialization section, using
> the -z preinitarray ld option, and now it is no longer
> called!
>
> I am wondering what might cause this behavior. According
> to the linker manual, a function specified in this ld
> option is moved into the preinitialization section, and
> if a preinitialization section does not already exist,
> one would be created.
>
> What am I missing? Any advice would be greatly appreciated.
>
> Thx,
>
>
> dk
>From S10 Linker and Libraries Guide:
A dynamic executable can provide pre-initialization functions in a
^^^^^^^^^^
.preinit_array section. These functions are executed after the runtime
linker has built the process image and performed relocations but
before any other initialization functions. Pre-initialization functions are
not permitted in shared objects.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
In short, preinit_array doesn't work in shared object.
-- #pragma ident "Seongbae Park, compiler, http://blogs.sun.com/seongbae/"
- Next message: Rich Teer: "Re: Assigning privs to a program?"
- Previous message: Thomas Maier-Komor: "Re: setting screen resolution for solaris 8 (CDE)"
- In reply to: Dan Koren: "-z preinitarray"
- Next in thread: Dan Koren: "Re: -z preinitarray"
- Reply: Dan Koren: "Re: -z preinitarray"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|