This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: [PATCH] Avoid relocation in fptr code used by rtld.


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


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