multiple definition of __getreent (in newlib's crt0.c and RTEMS' confdefs.h)
Joel Sherrill
joel at rtems.org
Tue Apr 17 14:28:54 UTC 2018
On Tue, Apr 17, 2018 at 3:35 AM, Amaan Cheval <amaan.cheval at gmail.com>
wrote:
> Great tips, thank you for the help!
> Updating the bsp_specs to replace startfile with crtbegin.o did let me get
> past the the __getreent problems. It seems like I'll need to learn much
> more about linker scripts and the GCC spec syntax than I currently know to
> do this right - I've currently only worked around issues in those regards
> with guesses / copying blindly from other archs and testing.
>
startfile needs to be the equivalent of crt0. In RTEMS parlance, this is
usually
start.o and it does thing like setup the stack, required registers, etc.
>
> I'll read the scripts used for other architectures and the following
> resources in the meantime to better understand how this ought to be
> structured to be correct. Let me know if you have any other resources you'd
> recommend!
>
> - https://dev.gentoo.org/~vapier/crt.txt
> - https://gcc.gnu.org/onlinedocs/gcc/Spec-Files.html
> - https://docs.rtems.org/branches/master/bsp-howto/linker_script.html
> -
> https://docs.rtems.org/branches/master/bsp-howto/
> miscellanous_support.html#gcc-compiler-specifications-file
> -
> https://access.redhat.com/documentation/en-US/Red_Hat_
> Enterprise_Linux/4/html/Using_ld_the_GNU_Linker/simple-example.html
> On Tue, Apr 17, 2018 at 12:13 PM Sebastian Huber <
> sebastian.huber at embedded-brains.de> wrote:
>
> > Hello,
>
> > you found a nasty piece in the RTEMS Newlib/GCC configuration. Newlib
> > provides a crt0.o file which contains a bunch of global symbols suitable
> > enough to make the GCC link-time configure tests happy. This file must
> > never be used for a real RTEMS application. The default startfile of GCC
> > (which is this Newlib ctr0.o) must be overruled. This is usually done
> > be the bsp_specs. See also
>
> > https://lists.rtems.org/pipermail/devel/2017-December/019780.html
>
> > --
> > Sebastian Huber, embedded brains GmbH
>
> > Address : Dornierstr. 4, D-82178 Puchheim, Germany
> > Phone : +49 89 189 47 41-16
> > Fax : +49 89 189 47 41-09
> > E-Mail : sebastian.huber at embedded-brains.de
> > PGP : Public key available on request.
>
> > Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20180417/a46cbe89/attachment.html>
More information about the devel
mailing list