* Thomas Schmitt <scdbac...@gmx.net>, 2016-07-18, 21:32:
It turns out that GCC optimized strcpy() into a series of move
instructions.
Maybe one can disable this feature ?
http://stackoverflow.com/questions/13059044/how-can-i-prevent-strcpy-being-optimised
proposes -fno-builtin-strcpy.
I tried with GNU xorriso and CFLAGS="$CFLAGS -fno-builtin-strcpy".
No change to see in the resulting binary xorriso/xorriso.
That's odd. In my tests (on a tiny test program) -fno-builtin-strcpy did
the trick...
...unless I enabled -D_FORTIFY_SOURCE=2, in which case even -fno-builtin
made no difference. :-/
So it seems to be about some other suffix to "-fno-builtin-".
gcc --help does not list any. man gcc gives no list but mentions "see
X86 Built-in Functions". I found:
https://gcc.gnu.org/onlinedocs/gcc-4.8.5/gcc/X86-Built-in-Functions.html
These are only X86-specific built-in functions.
Builtins that correspond to libc functions are listed here:
https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html
--
Jakub Wilk