This is the mail archive of the binutils@sources.redhat.com 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]

Re: PATCH for i386: --no-copy-relocs


On Tue, Jun 19, 2001 at 01:50:21PM -0700, Ian Lance Taylor wrote:
> Alan Modra <amodra@bigpond.net.au> writes:
> 
> > Here's what I think the dynamic linker should do with a COPY reloc:
> > a) copy the initialised value of the associated variable from the
> >    shared library into space allocated in the executable.
> > b) set the shared lib's .got entry for the variable to point at the
> >    space in the executable.
[snip]
> However, based on the earlier mail, I wonder if point (b) is not
> happening because the shared library was linked using -Bsymbolic.

You're right, of course.  It's nothing to do with the dynamic linker as
-Bsymbolic removes dynamic relocations for local symbols.

As a side note, doing this does not provide any benefit at run-time for
data accesses, besides reducing dynamic loader time;  Data accesses still
go through the .got.  Contrast this with function calls, which do gain
some run-time benefit as local function calls don't got through the .plt
for -Bsymbolic libs.  It might be neat to have a variant of -Bsymbolic
that only affected functions calls.

Alan


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