This is the mail archive of the binutils@sourceware.org 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: linker memory mapping


Ramana <ramana.venkat83@gmail.com> writes:

> I am working on a binutils port. The target has program memory as both
> ROM and RAM and all of the code which will run on the target will have
> to be linked to its own at link time. There is no further load/run
> time relocation. We need to burn the hand written assembly onto ROM
> during fabrication and all the other compiled code should go into RAM.
> Different applications which get compiled and mapped into RAM will
> refer to the hand written assembly on the ROM.
>
> How the linker should handle linking and memory mapping in this case?
> Will generating two "absolute" images one for the assembly code to go
> into ROM and other one for the compiled code to go into RAM work? The
> linker will know the ROM locations and will fix the references to ROM
> in the compiled code mapped into RAM.
>
> Are there any other better approaches for this? And also where should
> I map the data of hand written assembly, onto ROM or RAM?

If your system is going to copy memory from ROM to RAM at runtime, then
you probably want to use AT in a linker script.

If not, then you probably want to build a ROM image, and refer to it
with -R when linking other programs.

Ian


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