This is the mail archive of the binutils@sourceware.org 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: relocation table


On Thu, Apr 29, 2010 at 3:33 PM, flowher <krzysiek@leeds.pl> wrote:
> Hello,
>
> I'm trying to improvement application startup time. My application has many
> processes which are the same binary. One question recently came to my mind
> and I can't sleep well because of that.
> I'm wondering why relocation table for shared library is not shared between
> two the same processes (in a sens that binary is the same)?
> If the same binary is executed twice, why symbol resolution and relocation
> is done in each case? What could happen if relocation is done only once and
> then it is somehow delivered to the process which starts a s a second one?
>
> And one more question. Let say that we are in the situation where we start
> process, this process loads shared library (dlopen) and then it forks and it
> clones himself (so that in the end we have two processes which are the same
> binary). In such situation is symbol resolution and relocation done by the
> second process also?
>

Use prelink on Linux.


-- 
H.J.


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