#include<stdint.h>
#include<stdio.h>
#include<stdlib.h>
#define ALIAS(tc_fn) __attribute__ ((alias (#tc_fn)))
extern "C" {
void* malloc(size_t size) __THROW ALIAS(tc_malloc);
} // extern "C"
extern "C" {
void* __libc_malloc(size_t size) ALIAS(tc_malloc);
} // extern "C"
#undef ALIAS
extern "C" void* tc_malloc(size_t size) __THROW {
int a = 0;
printf("aaa");
}
int main()
{
int * a = new int;
return 0;
}
#include<stdio.h>
#include<stdlib.h>
#define ALIAS(tc_fn) __attribute__ ((alias (#tc_fn)))
extern "C" {
void* malloc(size_t size) __THROW ALIAS(tc_malloc);
} // extern "C"
extern "C" {
void* __libc_malloc(size_t size) ALIAS(tc_malloc);
} // extern "C"
#undef ALIAS
extern "C" void* tc_malloc(size_t size) __THROW {
int a = 0;
printf("aaa");
}
int main()
{
int * a = new int;
return 0;
}