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: Klaus Rudolph
Subject: Re: [Simulavr-devel] Discussion: siminfo feature as proposed by Markus Hitter
Date: Fri, 28 Feb 2014 21:26:46 +0100
User-agent: Thunderbird 2.0.0.23 (X11/20090817)

Michael Hennebry schrieb:
> 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.
> 

Maybe my English is to bad to understand, but again:

you simply can read each data for each symbol you want in each section.
Why we need a new section? The section must be added to all linker
scripts which is part of gcc! .signature is already existing and working
and additional content can simply be added by a new source file. It
seems much easier to add a standard extension for siminfo data to avr
libc instead of gcc. And there is no need to add this data to avr libc
but this will make it easier for all users.

But if all people want a new section with a new address range with new
linker scripts with new header files with next compiler version which is
supported by next avr libs... do it :-)


Regards
 Klaus





reply via email to

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