This is the mail archive of the 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]
Other format: [Raw text]

Re: --embedded-relocs for ARM

On Tue, Jul 02, 2002 at 09:00:04PM -0000, wrote:
> I'm new to this list, to ARM, and to ld (okay, I'm just a newbie, period).
> My goal is to add ARM-ELF support to the --embedded-relocs option.
> Does anyone have any tips or thoughts before I dive in?

Er...  are you sure --embedded-relocs is really what you need?  Have you
looked at --emit-relocs (which is already supported on ARM-ELF)?

It seems to me that --embedded-relocs is mostly for when you have some
existing device with some simple-minded loader that defines some very
simple relocation format.  For example, back in the day (2.9.1) embedded
relocs only existed on mips-ecoff, and the format there was just a vector
of offsets with extra information encoded in their least significant bits
(see bfd/coff-mips.c).  --embedded-relocs tends to mean throwing away
most of the available information, and requires there to be a little
format that people can agree on.

Back then --emit-relocs didn't exist, and the m68k target I was working
on needed to be able to give the relocs to a simple-minded loader, so we
were using --relocateable to preserve the relocs, but because it was
really a final link there were horrible side-effects.  Then I discovered
the embedded relocs stuff in the MIPS code and invented a little format
that held the information we needed with some room for expansion, and
added embedded reloc support to (our local) m68k-coff.

Later, other m68k people decided that a different format was needed, and
added that to bfd instead.  Things got nasty.  Because of assumptions
that they copied from the MIPS code that were applicable for whatever
particular MIPS device MIPS --embedded-relocs was for but aren't
necessarily applicable to whatever m68k --embedded-relocs might be for,
the code they added was not usable for us.  Now that --emit-relocs
exists, we will probably revert to using it instead of subverting
--embedded-relocs to our needs.

Well, nevermind.  The point of this story is that unless you have a
little "compressed relocs" format that everyone on ARM can agree upon,
I suspect you really want to be looking at --emit-relocs instead.


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