Externally provided __getreent
Sebastian Huber
sebastian.huber@embedded-brains.de
Mon May 22 05:36:00 GMT 2017
On 19/05/17 16:44, Olivier Desenfans wrote:
> newlib apparently does not let me do that; you can override the
> default implementation (in sys/reent/getreent.c) by implementing your
> own version (in sys/myos/getreent.c). I tried to declare that custom
> version as a weak symbol so that the linker would replace it with the
> version in our custom API but to no avail. Interestingly the linker
> does not throw a duplicate symbol error. There seems to be some magic
> trickery in the build system that prevents me from achieving this.
This is not how weak symbols work. If the linker has no reason to look
for your __getreent() function (e.g. because it found the weak version
first and nothing else pulled in the module containing your
implementation), then it will not end up in the executable.
--
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@embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
More information about the Newlib
mailing list