You could hijack the GOT entry, but that assumes the symbol has been
resolved first (either LD_BIND_NOW or the function has been called at
least once). You could also use LD_PRELOAD.
On Jul 04, 2014 04:12 PM +0400, Ivan A. Kosarev wrote:
> Hello,
>
> Consider the following:
>
> ---
> #include
>
On Fri, Jul 04, 2014 at 04:12:51PM +0400, Ivan A. Kosarev wrote:
> Hello,
>
> Consider the following:
>
> ---
> #include
> #include
>
> extern "C" void* memset(void *block, int c, size_t size)
> __attribute__((weak, alias("__int_memset"), visibility("default")));
>
> extern "C" __attribu
Hello,
Consider the following:
---
#include
#include
extern "C" void* memset(void *block, int c, size_t size)
__attribute__((weak, alias("__int_memset"), visibility("default")));
extern "C" __attribute__((visibility("default")))
void* __int_memset(void *block, int c, size_t size) {
p