This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Hi,
my name is Wolfram. I am trying to collect profiling information for a program
running on a ARM925Tid.
I have created a tool chain from
binutils-2.15
gcc-3.4.3
glibc-2.3.3
linux-2.6.8
glibc-linuxthreads-2.3.3
using crosstool-28-rc37 with arm-softfloat.dat.
I used the patches for gcc-3.4.2 because it did not compile without them.
I compiled a short test program to test if profiling works (see sources at the
end of the mail). It compiles well and runs but gets a SIGSEGV.
shell> arm-softfloat-linux-gnu-gcc -Wall -pg -o gprof gprof.c
- It does not get a SIGSEGV without the "-pg" switch.
- It does not get a SIGSEGV if linked statically.
- I tried to minimize the code of the program, that's the smallest version I
found to reproduce the bug.
- I am not sure if the problem is similar to this posting
http://sources.redhat.com/ml/crossgcc/2004-07/msg00041.html
GDB says:
---
Starting program: /home/gprof
...
Hello World, 3x
Program received signal SIGSEGV, Segmentation fault.
0x400fdb0c in mcount_internal () from /lib/libc.so.6
---
Since the program runs well when statically linked I am unsure if this a GCC
problem or a GLIBC problem.
Does anybody has an idea how I could proceed?
I tried to get a glibc with debug info with --enable-debug but did not suceed.
I would like to put the bug in a bug data base but how can I decide if it's a
GCC or GLIBC bug?
Thanks for any help or idea.
Wolfram
---
#include <stdio.h>
int sum(int a, int b)
{
int i;
for(i=0;i<3;i++)
{
printf(".");
}
printf("\n");
return a + b;
}
int main()
{
int x;
x=5;
for(x=0;x<5;x++)
printf("Hello World, %ix\n",sum(3,x));
return sum(3,x);
}
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |