Thanks for any help.
cheers.
Hmmm.
I did this myself for some functions and i did nothing special to make it work.
At least all calls from my Program to those functions come up right. While
profiling (callgrind) i found that some calls still go to the libc version (like
if inet_ntop calls memcpy), but this is a matter of runtime linking, and AFAIK
the glibc actively tries to prevent calling other that it's on implementations.
I can live with that if not every call goes through my version.
You have to look out if the compiler exchanged your call with an inline version
of this function, gcc knows a lot of std-c string functions and places the right
rep movs & friends in place.
If you really want to "get everything" you have to play with linking
options/order and maybe go with a LD_PRELOAD thingie, but still libc internal
calls maybe out of your reach.
> I know I can rename my function but that's not the point I remember there
> was an option to allow this
> but I cannot remember that option and looking up gcc on the man pages did
> not bring back anything to my
> memory.
>
you mean something like:
-mstringop-strategy=libcall
-minline-stringops-dynamically
These are fairly new options.
You also have to look out for symbol visibility, maybe override any (command
line)setting with a explicit:
char __attribute__((visibility("default"))) strcpy(...)
And finally: Are your new functions in a DSO? Then they are probably last in the
linking order. Try to add them statically to your program, this way they are
much more "in front".
> Thanks for any help.
> cheers.
>
>
Greetings
Jan
--
Woo Hoo Woo Hoo Hoo