Adding debug symbols causes segmentation faults with GCC-4.1 and MIPS...

Eric Christopher echristo@apple.com
Tue Sep 13 03:03:00 GMT 2005


On Sep 12, 2005, at 7:17 PM, Steven J. Hill wrote:

> Greetings.
>
> I attempted to search through Bugzilla, but I did not find anything  
> that
> matched my query. When using the options '-O0' and '-g' together  
> with GCC-4.1.0,
> I get an executable that will segfault. If I use all the other  
> optimizations of
> -O1, -O2 or -Os I do not have this problem. I am using  
> binutils-2.16.1, a
> checkout of gcc-4.1 from 20050604 and uClibc. Has anyone else seen  
> something
> like this? My compile and link lines look like the following:
>
> /build/buildroot-nptl-debug/build_mips/staging_dir/bin/mips-linux- 
> uclibc-gcc -Wall -Wstrict-prototypes -O0  -mno-split-addresses -g - 
> c clone.c -o clone.o
> /build/buildroot-nptl-debug/build_mips/staging_dir/bin/mips-linux- 
> uclibc-gcc
> -g -Wl,-warn-common -static clone.o -o clone

I've not seen it, but do you see it with, say, those options and the  
simulator testsuite? (I don't have one built at the moment or I'd  
check myself.)

Otherwise, what's the code look like where they segfault?

-eric



More information about the Gcc mailing list