[ECOS] Code coverage using synthetic eCos.

Bart Veer bartv@ecoscentric.com
Tue Mar 1 14:14:00 GMT 2005


>>>>> " " == Santoshkumar Zalake <santoshkumar.zalake@wipro.com> writes:

     > Hi all,
     > I want to do code coverage of C code using synthetic eCos-2.0
     > on Linux. I used gcov. I enable the flag of gcov
     > "-fprofile-arcs -ftest-coverage" at time of complication. But
     > at the time of linking I got following error.

     > gcc -nostdlib -Tos/ecos/lib/target.ld -Los/ecos//lib/ -L/usr/lib -o a.out
     > .test.o .test_1.o
     > /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/libgcc.a(_bb.oS)(.text+0x439): In
     > function `__bb_exit_func':
     > : undefined reference to `getpid'
     > /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/libgcc.a(_bb.oS)(.text+0x44c): In
     > function `__bb_exit_func':
     > : undefined reference to `fileno'
     > /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/libgcc.a(_bb.oS)(.text+0x454): In
     > function `__bb_exit_func':
     > : undefined reference to `fcntl'
     > /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/libgcc.a(_bb.oS)(.text+0x460): In
     > function `__bb_exit_func':
     > : undefined reference to `__errno_location'
     > collect2: ld returned 1 exit status
     > make: *** [test/systest/ap.out] Error 1


     > Please let me any one come across theses errors and if possible related
     > solution.

gcov requires target-side support, including a number of functions
like __bb_init_func(). You cannot just use the Linux versions, those
will assume the presence of a file system etc. Instead eCos needs its
own implementation. This is not yet available in eCos 2.0 or in
anoncvs.

Bart

-- 
Bart Veer                       eCos Configuration Architect
http://www.ecoscentric.com/     The eCos and RedBoot experts
 >>>>> Visit us in booth 2539 at Embedded Systems Conference 2005 <<<<<
 >>>>> March 8 - 10, San Francisco http://www.embedded.com/esc/sf <<<<<

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list