This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Avoid relocation in fptr code used by rtld.
- From: Carlos O'Donell <carlos at codesourcery dot com>
- To: Ulrich Drepper <drepper at gmail dot com>
- Cc: libc-alpha <libc-alpha at sourceware dot org>
- Date: Thu, 7 Jul 2011 10:26:58 -0400
- Subject: Re: [PATCH] Avoid relocation in fptr code used by rtld.
- References: <4DE53C5B.80901@codesourcery.com> <CAOPLpQeNc1h3U2MtXOAH=8fnVu0FSmJ3BEFW06DshsNHbk6_oQ@mail.gmail.com>
On 7/6/2011 10:40 PM, Ulrich Drepper wrote:
On Tue, May 31, 2011 at 15:07, Carlos O'Donell<carlos@codesourcery.com> wrote:
The fptr code as written causes a relocation against the rtld's text section
to fixup the value written into local.root (elf/dl-fptr.c).
Why would this write into the text section? local is not const and
therefore is placed in the data segment.
It wouldn't, I wrote the wrong thing, I meant to write "It's a .text
relative relocation against .data to fixup..."
e.g.
elf/ld.so.1
section headers:
[17] .data PROGBITS 00021260 021260 002030 00 WA 0 0 4
.rela.dyn
00021278 00000101 R_PARISC_DIR32 00002410 .text + 1ee74
.symtab
253: 00021278 8216 OBJECT LOCAL DEFAULT 17 local
If PA does something even more stupid than ia64 then contain this to
the PA code.
There is no way to know the runtime address of the structure, therefore
&local.boot_table should always result in a relocation. Until now PA's
been lucky about the ordering of the relocation processing.
Please consider the patch again.
Cheers,
Carlos.
--
Carlos O'Donell
Mentor Graphics / CodeSourcery
carlos@codesourcery.com
+1 (613) 963 1026