<div dir="ltr"><div dir="ltr"><div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Thu, Oct 11, 2018 at 11:45 PM jameszxj <<a href="mailto:jameszxj@gmail.com">jameszxj@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">HI,<div> <span> </span><span>I run RTEMS on my xilinx z7k board and dynamic load application(RAP format) from shell.</span></div><div><span>In recent update, i encount a link error when link the RAP file.</span></div><div><span>Here is the command and output message:</span></div><div><span> rtems-ld -n -e PT_Init --base rtems-nsa.elf wsp/build/nssys.elf -o wsp/build/nssys.out</span></div><div><div><font face="lucida Grande, Verdana, Microsoft YaHei"> error: rap::object: Section index '65522' not found: wsp/build/nssys.elf</font></div><div><br></div></div><div> At last I found the bsp_spec file has been modified, "*link:%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N}" was removed</div><div>from the bsp_spec file. Add this line to the file, ld is OK.</div><div> Why removed these lines?</div></blockquote><div><br></div><div>The long-term goal is to remove the bsp_specs. I made a sweep making them more consistent and have a set of patches against gcc master which eliminates them on many architectures. Working so the details are implied by GCC.</div><div><br></div><div>So let's look at the options and see which one has an impact which mattered that I didn't catch. This is the description of these options from ld's man page:</div><div><br></div><div><div> -N</div><div> --omagic</div><div> Set the text and data sections to be readable and writable. Also,</div><div> do not page-align the data segment, and disable linking against</div><div> shared libraries. If the output format supports Unix style magic</div><div> numbers, mark the output as "OMAGIC". Note: Although a writable</div><div> text section is allowed for PE-COFF targets, it does not conform to</div><div> the format specification published by Microsoft.</div></div><div><br></div><div> -d</div><div><div> -dc</div><div> -dp These three options are equivalent; multiple forms are supported</div><div> for compatibility with other linkers. They assign space to common</div><div> symbols even if a relocatable output file is specified (with -r).</div><div> The script command "FORCE_COMMON_ALLOCATION" has the same effect.</div></div><div><br></div><div>I'm going to guess that it is -dc/-dp but have no idea how this would impact RAP except to confuse the code. </div><div><br></div><div>Can you try adding adding the options one at a time until you make it work? Then Chris can figure out why it breaks RAP.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><br></div><div> Does the newest RTEMS support <span style="font-family:"lucida Grande",Verdana,"Microsoft YaHei"">the loading of incrementally linked ELF files? RAP format runs OK, but the link needs BSP image, this</span></div><div><span style="font-family:"lucida Grande",Verdana,"Microsoft YaHei"">make BSP's development and APP's </span><span style="font-family:"lucida Grande",Verdana,"Microsoft YaHei"">development</span><span style="font-family:"lucida Grande",Verdana,"Microsoft YaHei""> not so </span><font face="lucida Grande, Verdana, Microsoft YaHei">independent. a little pity, :)</font></div></blockquote><div><br></div><div>This is a Chris question.</div><div>' </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">_______________________________________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a></blockquote></div></div></div></div>