On Mon, Jul 23, 2012 at 3:08 AM, Sebastian Huber <span dir="ltr"><<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a>></span> wrote:<br>
<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
A short term solution is to just create the linkcmds.rwrtems and linkcmds.rortems and use them in selected BSPs.<br>
</blockquote></div><br>I'm confused. What are these files for? What's rwrtems and rortems?<br clear="all"><br><div class="gmail_quote">On Mon, Jul 23, 2012 at 9:14 AM, Joel Sherrill <span dir="ltr"><<a href="mailto:joel.sherrill@oarcorp.com" target="_blank">joel.sherrill@oarcorp.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">+ Some architectures get an underscore prepended. So<br>
    symbols in the linkcmds get one more _ in front than<br>
    you see in C.<br>
+ The case of the sparc where there was an end text<br>
    type symbol which really marked the end of where<br>
    constant stuff like .text, rodata, .ctors tables, etc. was.<br>
+ Where are the BSD sections located (e.g. >ram)<br>
<br>
I think the first can be dealt with by either having two<br>
versions of the linkcmds.xxx or having both styles of<br>
symbols. We have had both in the past especially for<br>
BSPs which transitioned from a.out to coff to elf.<br></blockquote><div> <br>I wasn't aware that the prepending of underscores was architecture-dependent. I thought that was just a GNU ld thing and that it <i>always</i> prepended one?<br>
<br>Having two versions of <span style="font-family:courier new,monospace">linkcmds.xxx</span> would be the most clean. That way the symbol tables aren't being polluted with useless symbols. However, if just defining both <span style="font-family:courier new,monospace">symbol</span> and <span style="font-family:courier new,monospace">_symbol</span> in a single file is what's been used in the past, then that's probably the way to go. For me, consistency always trumps all.<br>
<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The second is a bit harder for me to see a general solution.<br></blockquote><div> <br>I'm not sure why this would be an issue. Are you referring to the <span style="font-family:courier new,monospace">_endtext</span> and friends symbols? If so, can't they just be moved? I don't see the problem with <span style="font-family:courier new,monospace">.rodata</span>, or <span style="font-family:courier new,monospace">.ctors</span> since I never had to touch them but for <span style="font-family:courier new,monospace">.text</span> I just moved it to where it belonged: at the end of <span style="font-family:courier new,monospace">.text</span>.<br>
<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
For the last, follow what Sebastian has done in other linkcmds.base<br>
where the BSP defines a symbol used there.<br></blockquote></div><br>Again, not sure what you mean. Do you mean something like what shared SPARC does with <span style="font-family:courier new,monospace">.robsdsets</span> where it gets placed into <span style="font-family:courier new,monospace">ram</span>? If so, that's kinda what I wrote.<br clear="all">
<br>-- <br>- Kevin Polulak (soh_cah_toa)<br>- <a href="http://cybercrud.net" target="_blank">http://cybercrud.net</a><br><br>