<div dir="ltr">Hi, All:<div><br></div><div>This is the Final report of RTEMS Runtime Loader.<br></div><div style><br></div><div style><div>The objective of this project is to provide dynamic object file support for more architectures based on the current RTL framework.And extending RTL linker to collect object files from archives into a new archive and implement a new tool to convert elf archives to rap archives.There are also two additional tasks, one is providing GDB support for dynamically loaded object files on target, the other is providing Python support for RTL.</div>
<div><br></div><div>The code repositories are at</div><div><a href="https://github.com/MrVan/gsoc2013-rtl.git">https://github.com/MrVan/gsoc2013-rtl.git</a></div><div><a href="https://github.com/MrVan/gsoc2013-rtl-host.git">https://github.com/MrVan/gsoc2013-rtl-host.git</a></div>
<div><a href="https://github.com/MrVan/gdb.git">https://github.com/MrVan/gdb.git</a></div><div style>The python rtems repository will be created in the near future.</div><div><br></div><div><b>Finished tasks:</b><br></div>
<div>1. Implemented different archs support for RTL,such as ARM/PPC/MIPS/BFIN/H8300/LM32/MOXIE/V850/M32R and added more reloc and testcases for SPARC/I386/M68k<br></div><div><br></div><div>2. Added new options for rtems-ld to make it support collect object files from elf archive into a new elf archive.The added options are --rap-strip, --runtime-lib, --one-file. --rap-strip means not to include file details in the final rap file. The default value for --rap-strip is true, the option is for GDB.--runtime-lib means the collected object files from elf archive should be placed into the file following the option --runtime-lib. --one-file means all the collected object files will be merged into the final rap file.<br>
</div><div><br></div><div>3. Implemented a new tool named `rtems-ra`, which is used to automatically manage rap archive file. For example:`rtems-ra --lib 3 --lib-path testcase --output-path ./ --no-stdlibs --cc /opt/rtems4.11/bin/arm-rtems4.11-gcc` -Wl,-Bstatic`. This command will use lib3.a in testcase directory, and convert it to lib3.ra in the current directory. The tool also provides common functions in `ar`, such as replace, add, delete object file in archive file.<br>
</div><div><br></div><div><b>Additional tasks:</b><br></div><div>1. GDB task:A basic implementation has been finished. But it needs more work to make it perfect.The key part of this task is to implement the protocal between GDB and RTL. And you should also have the knowlege of how GDB works.The target implementation is mainly in rtl-debugger.c. The GDB side is mainly in solib-rtems.c.<br>
</div><div><br></div><div>2. Python task: Now Python and RTL are merged together, and it can execute simple python script, but this is not the final objective. It is still under heavy hacking.</div><div><br></div><div><b>Remaining work:</b><br>
</div><div>1. Large RAP file: To large rap file, there maybe overflow for near jump. How to convert near jump/call to far jump/call? As far as I know, linux ko is compiled using`-mlong-calls`,but to rtems, it is different. If a `.c` file reference a symbol in libm.a/libc.a which are not compiled with long-call support, the rap file will not be loaded because it does not support converting near jump to far jump when encounting instruction `overflow`.<br>
</div><div><br></div><div><b>Future work:</b><br></div><div><div>1. GDB part: RT_ADD,RT_DELETE,RT_CONSISTENT of r_state in r_debug are omitted in the current implementation. I am not definitely sure whether this is ok, but it works. This needs further reviewing.</div>
<div><br></div><div>2. Python part: To convert Python executable into rap file or merge the python parser into RTL. This part is still in developing.</div></div><div><br></div><div style>Welcome comments. </div><div style>
<br></div><div style>Thanks,</div><div style>Peng.</div></div></div>