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: REL vs. RELA: how to choose?


Aren't addends stored with the rightshift shifted off them? I mean, what's
the point in having a rela relocation record for an insn that can't hold the
total offset as there isn't space in the bitfield? Note, I'm quite new to
this and so could be missing things - like facts!

Ray.

----- Original Message -----
From: "Geoff Keating" <geoffk@geoffk.org>
To: <greg@mcgary.org>
Cc: <binutils@sources.redhat.com>
Sent: Wednesday, February 14, 2001 5:10 PM
Subject: Re: REL vs. RELA: how to choose?


> > Date: Wed, 14 Feb 2001 16:35:52 -0700
> > From: Greg McGary <greg@mcgary.org>
>
>
> --------------------------------------------------------------------------
----
> > As shown above, only Elf32_Rela entries contain an explicit
> > addend. Entries of type Elf32_Rel store an implicit addend in the
> > location to be modified. Depending on the processor architecture, one
> > form or the other might be necessary or more convenient. Consequently,
> > an implementation for a particular machine may use one form
> > exclusively or either form depending on context.
>
> --------------------------------------------------------------------------
----
> >
> > What are the processor-architecture features that might make one or
> > the other of REL vs. RELA necessary or more convenient?
>
> One feature is that there might not be sufficient space in the
> place to be relocated to hold all reasonable sizes of addend.  For
> instance, there might only be 16 bits.
>
> --
> - Geoffrey Keating <geoffk@geoffk.org>
>
>


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