This is the mail archive of the
mailing list for the binutils project.
Relocating Executable LMA and VMA addresses
- From: Bahadir Balban <bahadir at l4dev dot org>
- To: binutils at sourceware dot org
- Date: Fri, 03 Jul 2009 15:56:20 +0300
- Subject: Relocating Executable LMA and VMA addresses
I have multiple static executables that will need to have their LMA and
VMA adjusted after compilation. How would you advice me to do this?
First option I can think of is to compile but not run ld on any of the
executables, then link each of them using a customly generated linker
script with the desired LMA and VMA values that are then determined.
The other option I can think of is to link each of them and adjust later
on using objcopy.
I also see that ld has a partial linking option, but not sure if it
would be useful here.
The reason I need this is because I would like to define multiple LMA
and VMA regions for multiple executables, and lay them out in sequence
during the build in the correct manner. E.g. the set of executables that
lay in a particular LMA region would be laid out there in sequence,
another set laid out elsewhere, etc.
Do you have any advice on how to achieve this the cleanest way?