ensure dllexport/public visibility of all aliases we generate

This commit is contained in:
Aliaksey Kandratsenka 2024-03-20 20:39:30 -04:00
parent 32796c754e
commit 274038486b
2 changed files with 2 additions and 2 deletions

View File

@ -55,7 +55,7 @@
# error libc_override_gcc_and_weak.h is for gcc distributions only.
#endif
#define ALIAS(tc_fn) __attribute__ ((alias (#tc_fn), used))
#define ALIAS(tc_fn) __attribute__ ((alias (#tc_fn), used)) PERFTOOLS_DLL_DECL
void* operator new(size_t size) CPP_BADALLOC ALIAS(tc_new);
void operator delete(void* p) CPP_NOTHROW ALIAS(tc_delete);

View File

@ -70,7 +70,7 @@
// do it inside the gcc #ifdef, since redhat uses gcc.
// TODO(csilvers): only do this if we detect we're an old enough glibc?
#define ALIAS(tc_fn) __attribute__ ((alias (#tc_fn)))
#define ALIAS(tc_fn) __attribute__ ((alias (#tc_fn))) PERFTOOLS_DLL_DECL
extern "C" {
void* __libc_malloc(size_t size) ALIAS(tc_malloc);
void __libc_free(void* ptr) ALIAS(tc_free);