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 Mon, Jun 18, 2001 at 09:25:46PM +0200, Jose Luu wrote:
> http://sources.redhat.com/ml/binutils/2000-12/msg00183.html

I had a look at your testcase and spent a little time thinking, and
am coming to the conclusion that the root cause of this problem is
that the dynamic linker is not behaving correctly.

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.

That way the shared lib, which must access the variable through the
.got, will access the same space as the executable.  Point (b) seems
to not be happening with glibc's dynamic loader.

Comments/corrections/discussion welcome.

Alan


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