how to keep some basic relocation information in executable binary

Jamie Lokier jamie at shareable.org
Fri Oct 9 07:51:03 EDT 2009


Peiyu Li wrote:
> I am trying to find a way to build out one ARM-instruction binary that
> can run at any address in the bare metal environment.

You might have luck looking at the uClinux bFLT ("flat") format.

To make a bFLT file, the tools first produce an ELF executable with
relocations, and then convert the executable to bFLT format.

bFLT is the same as what you get with objcopy to binary format, with
compact relocations stuck on the end.

You can either make a normal bFLT which has relocations throughout the
text and data areas, or a bFLT-XIP which concentrates them in the GOT
and can be run from ROM as well as anywhere in RAM.

If you don't want to use the bFLT format, you could still look at how
the tools produce the ELF executable with relocations and then convert it.

-- Jamie



More information about the linux-arm mailing list