This is the mail archive of the bfd@sourceware.cygnus.com mailing list for the bfd project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
>
> Date: Thu, 15 Apr 1999 14:49:16 -0400
> From: Scott Bambrough <scottb@corelcomputer.com>
>
> Actually Phil is in England, Pat Beirne and I are in Canada.
>
> Oops--sorry.
>
> We chose REL because we did not need the addend. In hindsight I
> would choose RELA.
>
> For the benefit of anybody who is considering an ELF port, please
> always use RELA relocs rather than REL relocs. REL relocs work OK for
> processors with very simple relocation needs, like an i386 or m68k.
> For a RISC processor, they are a real pain. You always need to
> support an addend which can support your entire address space, in
> order to handle code like this:
> char a[10000];
> int foo () { return a[9999]; }
> This ought to turn into a reference to the symbol a + 9999, so you
> need an addend which can hold a value of 9999, or you get inefficient
> code.
Ok. You are saying RELA is better than REL. Does it make any senses
to use RELA for relocatable object and allow REL for excutable and
shared objects?
>
> > In the meantime, Cygnus implemented ARM ELF, using RELA relocs.
>
> Something of which we were entirely unaware of at the time, otherwise we would
> have attempted to collaborate in a closer fashion.
>
> I now recall that I dropped the ball on this one. I saw the request
> for the ARM ELF work come in to Cygnus, but I didn't manage to figure
> out that it was for a different ABI than the one in H.J.'s snapshots.
>
If RELA is really desired, can ARM/Linux switch to RELA with a different
soname? Binaries using REL should still run ok, just like what we did
to libc 5 on x86.
--
H.J. Lu (hjl@gnu.org)