On 7/10/2011 9:27 PM, Carlos O'Donell wrote:
On Sat, Jul 9, 2011 at 11:08 AM, John David Anglin<dave.anglin@xxxxxxxx> wrote:
As far as I can tell, most targets don't sort dynamic relocations. The
exceptions that I see are mips and score. Doing this will increase link time, so I
tend to think it should be avoided if possible. Isn't the dynamic loader a special case?
Ulrich Drepper says that relative relocations must *always* be first,
it doesn't require a complete sort.
I'm not knowledgeable about x86 but I don't believe it has a relocation
equivalent to the
PLABEL32 reloc. Everything in .rel.dyn may be relative. However,
R_386_RELATIVE
seems to occur before R_386_GLOB_DATA. I'm not sure how this is done.
If we need to sort, combreloc may need to be disabled because it might
do an incompatible
sort.
The dynamic loader is a special case, but there are some requirements.
Have you tried the ld "-z combreloc" option to see if that works? It
combines reloc sections and sorts them.
I haven't tried that yet, are you saying we should change binutils to
*default* to "-z combreloc?"
No. I was just thinking of trying to link the dynamic loader with this
option. Didn't notice
any other targets making it the default.
Dave
--
John David Anglin dave.anglin@xxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html