From: *Nick Clifton* <nickc@redhat.com <mailto:nickc@redhat.com>>
Date: Mon, Mar 2, 2009 at 3:52 PM
Subject: Re: Storing the memory configuration used at link-time into a
binary.
To: Denis FERRANTI <denis.ferranti@st.com <mailto:denis.ferranti@st.com>>
Cc: bu-sourceware <binutils@sourceware.org
<mailto:binutils@sourceware.org>>
Hi Denis,
Our co-workers at STMicroelectronics develop on many SoCs at a time
which sometimes only differ from memory configurations, so they have
[to take care] to use a compatible linker-script (among many). That's
why we introduced a new linker-script statement "CREATE_MEMINFO_TABLE"
which stores the memory configuration used at link-time into a binary,
then the embedded "meminfo" table can be used by loaders to make
compatibility checks or by simulators for auto-configuration.
Thank you for telling us about this idea. I am not sure that there
would be any need for it outside of your own application, so I do not
really think that it is suitable for inclusion into the mainstream
sources.
Also I would suggest that it might be better to control this feature
via a linker command line option rather than a linker script
directive. This would be more flexible because the name of the meminfo
table file could be specified on the command line, rather than being
fixed by the linker script.
Cheers
Nick