This is the mail archive of the binutils@sources.redhat.com 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: Section X overlaps section Y problem.


Sergei Organov <osv@topconrd.ru> writes:
> On embedded target, to copy at startup some data and/or code from ROM to
> RAM at startup, I've been using the following technique that worked for
> me for years. The last version of binutils where I know it works is
> version 2.10.

So, your startup code copies the ROM contents (as given in .vect) into
RAM (covered by .vect_image).  Why do both of those sections have the
same LMA?

Do your ROM and RAM both appear at the same range of addresses in
memory?  That is, do writes to those addresses always access RAM, but
reads access ROM, until the ROM is switched out --- or something like
that?

If your RAM and ROM appear in distinct address ranges, the usual way
to do this is to give the ROM contents a VMA that refers to the RAM
they will eventually occupy, but an LMA that refers to the ROM.  That
way, the VMA ranges of .vect and .vect_image will overlap, but the LMA
ranges will not.  I would expect the linker to complain only about
overlapping LMA ranges.


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