Am Donnerstag, den 01.08.2013, 10:03 +0200 schrieb Luca Barbato: > > Well, it would be an ugly heuristic like running cc -S -o - on > > src/string/memcpy.c, with -Dmemcpy=noname or something, and grepping > > the output for memcpy... > > Indeed. there might be the word memcpy in comments or whatever, depends on the assembler format etc. might be really relatively difficult to set up reliably. Other options: - compile it with that -Dmemcpy=noname trick to a normal .o and use nm to look for an undefined symbol "memcpy". - use a different name for the implementation of the function from the start, __musl_memcpy or so. Then you could do the check for the memcpy symbol on the normally compiled .o and (if everything is ok) rename the __musl_memcpy to memcpy with some linker trick. - put "#define memcpy __musl_memcpy" at the start of string.h if __musl_memcpy would refer to memcpy this would give an link time error for an undefined symbol. Jens -- :: INRIA Nancy Grand Est :: http://www.loria.fr/~gustedt/ :: :: AlGorille ::::::::::::::: office Nancy : +33 383593090 :: :: ICube :::::::::::::: office Strasbourg : +33 368854536 :: :: ::::::::::::::::::::::::::: gsm France : +33 651400183 :: :: :::::::::::::::::::: gsm international : +49 15737185122 ::