5.15.4 Replacing Library Modules
You can easily replace a library routine with your own without having to
using the librarian,
(see 8.1 Archiver/Librarian).xc8-ar
If a source file in your project contains the definition for a routine or object with the same name as a library routine or object, the definition from the source will replace the library definition. This is because the linker scans all the source modules for definitions before it search library files.
You cannot replace a C library function with an equivalent written in assembly code using the above method. If this is required, you will need to use the librarian to edit or create a new library file.