<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 17, 2018 at 3:35 AM, Amaan Cheval <span dir="ltr"><<a href="mailto:amaan.cheval@gmail.com" target="_blank">amaan.cheval@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Great tips, thank you for the help!<br>
Updating the bsp_specs to replace startfile with crtbegin.o did let me get<br>
past the the __getreent problems. It seems like I'll need to learn much<br>
more about linker scripts and the GCC spec syntax than I currently know to<br>
do this right - I've currently only worked around issues in those regards<br>
with guesses / copying blindly from other archs and testing.<br></blockquote><div><br></div><div><br></div><div>startfile needs to be the equivalent of crt0. In RTEMS parlance, this is usually</div><div>start.o and it does thing like setup the stack, required registers, etc.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
I'll read the scripts used for other architectures and the following<br>
resources in the meantime to better understand how this ought to be<br>
structured to be correct. Let me know if you have any other resources you'd<br>
recommend!<br>
<br>
- <a href="https://dev.gentoo.org/~vapier/crt.txt" rel="noreferrer" target="_blank">https://dev.gentoo.org/~<wbr>vapier/crt.txt</a><br>
- <a href="https://gcc.gnu.org/onlinedocs/gcc/Spec-Files.html" rel="noreferrer" target="_blank">https://gcc.gnu.org/<wbr>onlinedocs/gcc/Spec-Files.html</a><br>
- <a href="https://docs.rtems.org/branches/master/bsp-howto/linker_script.html" rel="noreferrer" target="_blank">https://docs.rtems.org/<wbr>branches/master/bsp-howto/<wbr>linker_script.html</a><br>
-<br>
<a href="https://docs.rtems.org/branches/master/bsp-howto/miscellanous_support.html#gcc-compiler-specifications-file" rel="noreferrer" target="_blank">https://docs.rtems.org/<wbr>branches/master/bsp-howto/<wbr>miscellanous_support.html#gcc-<wbr>compiler-specifications-file</a><br>
-<br>
<a href="https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/4/html/Using_ld_the_GNU_Linker/simple-example.html" rel="noreferrer" target="_blank">https://access.redhat.com/<wbr>documentation/en-US/Red_Hat_<wbr>Enterprise_Linux/4/html/Using_<wbr>ld_the_GNU_Linker/simple-<wbr>example.html</a><br>
<div class="HOEnZb"><div class="h5">On Tue, Apr 17, 2018 at 12:13 PM Sebastian Huber <<br>
<a href="mailto:sebastian.huber@embedded-brains.de">sebastian.huber@embedded-<wbr>brains.de</a>> wrote:<br>
<br>
> Hello,<br>
<br>
> you found a nasty piece in the RTEMS Newlib/GCC configuration. Newlib<br>
> provides a crt0.o file which contains a bunch of global symbols suitable<br>
> enough to make the GCC link-time configure tests happy. This file must<br>
> never be used for a real RTEMS application. The default startfile of GCC<br>
> (which is this Newlib ctr0.o) must be overruled. This is usually done<br>
> be the bsp_specs. See also<br>
<br>
> <a href="https://lists.rtems.org/pipermail/devel/2017-December/019780.html" rel="noreferrer" target="_blank">https://lists.rtems.org/<wbr>pipermail/devel/2017-December/<wbr>019780.html</a><br>
<br>
> --<br>
> Sebastian Huber, embedded brains GmbH<br>
<br>
> Address : Dornierstr. 4, D-82178 Puchheim, Germany<br>
> Phone : +49 89 189 47 41-16<br>
> Fax : +49 89 189 47 41-09<br>
> E-Mail : <a href="mailto:sebastian.huber@embedded-brains.de">sebastian.huber@embedded-<wbr>brains.de</a><br>
> PGP : Public key available on request.<br>
<br>
> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.<br>
______________________________<wbr>_________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/<wbr>mailman/listinfo/devel</a></div></div></blockquote></div><br></div></div>