Static linking newlibc as libc, freestanding on ARM, zig + c libraries

For whatever reason even with that error from ld.lld the binary output is still generated but its size is Huge with resepect to the gcc build one… I suspect the linker adds stuff I’m not using (for example _malloc_r: my codes doesn’t use mallocs anywhere), but I don’t know how to compare correctly the elf files since the symbols are saved in different memory addresses. How can I proceed?