memory footprint
gregory.menke at gsfc.nasa.gov
gregory.menke at gsfc.nasa.gov
Tue Nov 26 15:54:49 UTC 2002
Wulf Hofbauer writes:
> Hi,
>
> I also noticed that RTEMS cannot run from ROM as storage for
> the exception vector table and interrupt stacks are allocated in the
> text (!) section. What is the rationale for this?
For some BSP's, their bootloaders will copy text & data from ROM to
ram where it can run faster. The executable layout is generally
analagous to the gcc/binutils defaults- which evolves over time.
RTEMS itself doesn't mandate a particular executable layout.
If an application requires the text be in rom for some reason, one
reasonable approach is to arrange an application-specific link-script
so things end up in the right places. It may also be necessary to
override the bootloader (by making a copy and modifying as required).
We had to do both of these things for our application, it has a
dreadfully complicated linker script...
As far as vector tables being in the text section, I think its done
just for convienence usually- as modifying link scripts can be
nightmarish sometimes. There could also be some architectural reason;
if text starts at address 0 on something like an x86, then it might be
quite reasonable to put a vector table up at the top of text- if
you're going to relocate from rom down to the bottom of ram. However,
I think the best approach is to set up a section for the tables so
they can be independently handled.
Gregm
More information about the users
mailing list