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]

Relocating Executable LMA and VMA addresses

Hi Folks,

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?


Bahadir Balban

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