[libc] add malloc funcs as external entrypoints

malloc, calloc, realloc, and free are all functions that other libc
functions depend on, but are pulled from external sources, instead of
having an internal implementation. This patch adds a way to include
functions like that as entrypoints in the list of external entrypoints,
and includes the malloc functions using this new path.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D112104

GitOrigin-RevId: 7dcdbabb3b1501b90a51b36e8e4f4667b6902b8b
6 files changed