This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Linker script


Hi,

I have a special problem that has to do with the linker script. In my
application i want to add a CRC value to the binary image so that i can
check the code segment for errors during runtime. I cannot put the CRC
over the entire image since some segment are changing during execution
so instead i want to calculate it based on the text segment only.
However, the segment is of different size each time i link which means
that i have to communicate the size to the CRC calcualtion routine. I
think that it should be done in the linker script by something like
this:

    .text   0x5000  :      { _stext = .; *(.text*) *(.gnu.warning)
*(.gnu.linkonce*) *(.init) } >  ram  _etext = .;  PROVIDE 

The text segment specifies where the end is in the variable _etext.

I need the above value to be place on a fixed location by something like
this:

.TextEnd   0x004DFFFC :      { etext }

The above dones work but can any see a way for this to work?

Regards, Daniel Lidsten

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


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