#9315·Arduino

[request] add weak attribute in all dummy callback functions

Author: atesinCreated Apr 6, 2026Updated Apr 9, 2026

hi, i am trying to write an i/o posix library, but i found i can't implement most callback functions because they are already harcoded with dummy ones that does nothing in libc_replacements.cpp core file

my request is to add weak attributes in all functions of that file, so we can replace syscall implementations for other systems/filesystems/devices/etc. in libraries if we need

... of course we can manually modify the file but is not so tidy that way (that is actually what i am doing for now), and not many people are familiar/relaxed with doing so also

programs will work the same way with weak functions, the only difference will be they could be reimplemented if needed, because if we try to compile now we get a 'multiple definition' error

btw, libc implementation in esp-core was done by integrating (incomplete) newlib library = https://sourceware.org/newlib/