<html><head><meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"><style>body { line-height: 1.5; }blockquote { margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em; }body { font-size: 10.5pt; font-family: ????; color: rgb(0, 0, 0); line-height: 1.5; }</style></head><body>
<div><span></span>I follow the instructions which Pavel Pisa posted online. </div><div><span style="color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);"></span><a href="https://lists.rtems.org/pipermail/devel/2016-July/015683.html" style="font-size: 10.5pt; line-height: 1.5; background-color: window;">https://lists.rtems.org/pipermail/devel/2016-July/015683.html</a><span style="color: rgb(0, 0, 0); font-size: 10.5pt; line-height: 1.5; background-color: rgba(0, 0, 0, 0);"> </span></div><div><span style="color: rgb(0, 0, 0); font-size: 10.5pt; line-height: 1.5; background-color: rgba(0, 0, 0, 0);">But, when I go to the "prelink generation" step, which is "arm-rtems4.11-gcc ${CFLAGS1} -Wl,--gc-sections init.o rootfs_tarfile.o -lm -o appdl.prelink", some error came up, </span></div><div><span style="color: rgb(0, 0, 0); font-size: 10.5pt; line-height: 1.5; background-color: rgba(0, 0, 0, 0);"><b>#/.../ld: failed to merge target specific data of file init.o</b></span></div><div><span style="color: rgb(0, 0, 0); font-size: 10.5pt; line-height: 1.5; background-color: rgba(0, 0, 0, 0);"><b>#/.../ld: warning: cannot find entry symbol _start; defaulting to 0000000000008000</b></span></div><div><span style="color: rgb(0, 0, 0); font-size: 10.5pt; line-height: 1.5; background-color: rgba(0, 0, 0, 0);"><b>#collect2: error: ld returned 1 exit status</b></span></div><div><span style="color: rgb(0, 0, 0); font-size: 10.5pt; line-height: 1.5; background-color: rgba(0, 0, 0, 0);"><br></span></div><div><span style="color: rgb(0, 0, 0); font-size: 10.5pt; line-height: 1.5; background-color: rgba(0, 0, 0, 0);">And he did not use rtems-ld to generate any file, so I got a little confused. Any idea?</span></div><div><span style="color: rgb(0, 0, 0); font-size: 10.5pt; line-height: 1.5; background-color: rgba(0, 0, 0, 0);"><br></span></div><div><span style="color: rgb(0, 0, 0); font-size: 10.5pt; line-height: 1.5; background-color: rgba(0, 0, 0, 0);">Later, I also tried to use rtems-ld to link init.o and rootfs_tarfile.o, and it said:</span></div><div><b>#resolver:resolving: undefines, unresolved: 1</b></div><div><b>#resolver:resolve: |- rtems</b></div><div><b>#error: undefines: symbol not found: rtems</b></div><div>Here, I just want to know what '-b' the base kernel is, an object file (after compile before link), or an .exe (after statically link)? Thanks.</div><div><br></div><span style="color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);"></span>
<div><br></div><hr style="width: 210px; height: 1px;" color="#b5c4df" size="1" align="left">
<div><span><div style="MARGIN: 10px; FONT-FAMILY: verdana; FONT-SIZE: 10pt"><div><font color="#0000ff">Best wishes,</font></div><div><font color="#0000ff">Tim Tian</font></div><div><font color="#0000ff">xuelin.tian@qkmtech.com</font></div></div></span></div>
<blockquote style="margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em;"><div> </div><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm"><div style="PADDING-RIGHT: 8px; PADDING-LEFT: 8px; FONT-SIZE: 12px;FONT-FAMILY:tahoma;COLOR:#000000; BACKGROUND: #efefef; PADDING-BOTTOM: 8px; PADDING-TOP: 8px"><div><b>From:</b> <a href="mailto:chrisj@rtems.org">Chris Johns</a></div><div><b>Date:</b> 2016-08-25 13:30</div><div><b>To:</b> <a href="mailto:xuelin.tian@qkmtech.com">xuelin.tian@qkmtech.com</a>; <a href="mailto:users@rtems.org">users@rtems.org</a></div><div><b>Subject:</b> Re: Simple question about RTL</div></div></div><div><div>On 25/08/2016 1:02 PM, xuelin.tian@qkmtech.com wrote:</div>
<div>> Hi Chris,</div>
<div>> thanks for you reply. I'm trying to understand the concept here, and</div>
<div>> some points are still confusing me.</div>
<div>> In general, linking process should happen before applications taking</div>
<div>> control of CPU, which means the OS should handle the linking process.</div>
<div> </div>
<div>The RTL provides a run-time link editor which allows you to load code </div>
<div>with-in your running application. Libdl is the link editor. It is you or </div>
<div>your code that tells it what to do.</div>
<div> </div>
<div>> In</div>
<div>> RTEMS, the Init task should take care of this, am I right?</div>
<div> </div>
<div>The Init task is your 'main' so this is your code. You are free to </div>
<div>structure how you manage this just like any other part of your application.</div>
<div> </div>
<div>> Now, for example, I have one base kernel and one tar file. My base</div>
<div>> kernel is running on my target (ZedBoard), and how can I load the tar</div>
<div>> file into memory using shell command via Jtag?</div>
<div> </div>
<div>For an engineering development environment I would enable networking </div>
<div>using libbsd and then NFS mount an exported disk from a host on the </div>
<div>network. I would place the ELF object files where you can see them from </div>
<div>the Zedboard and then use the RTL command to load the code.</div>
<div> </div>
<div>Chris</div>
</div></blockquote>
</body></html>