simulavr-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Simulavr-devel] Discussion: siminfo feature as proposed by Markus H


From: Michael Hennebry
Subject: Re: [Simulavr-devel] Discussion: siminfo feature as proposed by Markus Hitter
Date: Fri, 28 Feb 2014 13:30:18 -0600 (CST)
User-agent: Alpine 1.00 (DEB 882 2007-12-20)

On Fri, 28 Feb 2014, ThomasK wrote:

this is a good idea. On the other hand ... you'll come in trouble, if somebody tries to use both, signature and siminfo. Signature is just a array of 3 bytes, siminfo is a structure description, with a id tag, a length byte and the payload. Problem is, that depending on the link order the signature and the parts of siminfo are mixed, sometimes signature is linked first (especially if this is defined in the first object file, which is linked), sometimes at end, and, if somebody uses different files to define siminfo parts (which isn't forbidden), then signature could be mixed in between.

I thought the signature had a symbol associated with it.
Could not symbols be used to ascertain the
locations of the data in the section?
One could still have a problem if other tools
do not use the symbol for the signature.
The simplest solution to that might be to always ensure
that the siminfo stuff is always fed to the linker last.
Another solution might be to make this the first input file to avr-ld:
/* first input file.  do not use -T */
SECTIONS
{
.siminfo : { KEEP(*(.siminfo)) }
} > signature

If avr-ld will accept a second SECTIONS command,
that will make .siminfo a separate section within the signature memory space.

I'm pretty sure that there are other solutions
involving multiple links and possibly objcopy.

--
Michael   address@hidden
"SCSI is NOT magic. There are *fundamental technical
reasons* why it is necessary to sacrifice a young
goat to your SCSI chain now and then."   --   John Woods



reply via email to

[Prev in Thread] Current Thread [Next in Thread]