Hi Nathan, we do not use c++, we use simple c, so I'm not sure if your hint with the ctor function matches our problem. But I've looked for crt0 and I've seen, that there is a gcrt0 (which sounds for gcov) within the standard gcc environmont but no gcrt0 within the am-elf-gcc environment. Can you give me information, from where I can get a gcrt0 for the am-elf-gcc OR what is the different between crt0 and gcrt0 ? thank you Franz Nathan Sidwell <nathan@xxxxxxxxxxxxxxxx> 20.02.2006 19:06 An Franz Kaufleitner <Franz.Kaufleitner@xxxxxxxxxxxxxxxxx> Kopie gcc-help@xxxxxxxxxxx Thema Re: arm-elf-gcc with gcov option do not work Franz Kaufleitner wrote: > Hi all, > > We're trying to use GCOV together with the ARM-ELF development > environment. > > Our installation is: > arm-elf-gcc: 3.4.3 > arm-elf-ld: 2.15 > arm-elf-ar, binutils: 2.15 > > > (1) First we've compiled with the following standard gcc command line > gcc -fprofile-arcs ?ftest-coverage ?o sample sample.c > Running the image will create the expected gcov data file sample.da. > > (2) After them, we've tried it with the arm-elf-gcc > arm-elf-gcc -fprofile-arcs ?ftest-coverage ?o sample sample.c > Running the image in the arm emulation arm-elf-run, no gcov data > file sample.gda has been created. > > (3) Next, we've tried to manipulate the gcov internals by putting a > debugging printf to the fuctions gcov_init and gcov_flush, but > it seems, that the code of these functions isn't entered. It seems like ctor functions are not being run. Have you tried a C++ program which requires dynamic initializtion of a global variable? Something like struct Foo { Foo () {printf ("ctoring\n");} ~Foo () {printf ("dtoring\n");}}; Foo object; int main () {} what does that do? If it doesn't print those two strings, then something's awry with process startup. That is somewhat system dependent and it sounds like you're running on a bare board. You'll need to examine your crt0 to see how it starts things up. nathan -- Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery nathan@xxxxxxxxxxxxxxxx :: http://www.planetfall.pwp.blueyonder.co.uk