This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: relocation table
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: flowher <krzysiek at leeds dot pl>
- Cc: binutils at sourceware dot org
- Date: Thu, 29 Apr 2010 14:47:06 -0700
- Subject: Re: relocation table
- References: <4BDA094C.2000209@leeds.pl>
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.