This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

incorrect debug information with -O2 and above options


Hello,
I am using the crx target (ie crx-elf-gcc) compiler. When I compile a simple
testcase with -g, its showing correct debug information. If I compile the
same testcase with "-g -O2" (-O2 or above optimizations), then compiler
generates wrong debug info. Could you please advise on this issue?

=========================================================================
With -g command line option:
---------------------------
> crx-elf-gcc align/1.c -g
/tmp/ccC6aaaa.o: In function `main':
align/1.c:3: undefined reference to `one'


With -g -O2 command line options: --------------------------------- > crx-elf-gcc align/1.c -g -O2 /CRX12-1.10/crx-elf/bin/ld: Dwarf Error: DW_FORM_strp offset (84) greater than or equal to .debug_str size (47). /tmp/cck5aaaa.o: In function `.LSM1': //** ERROR **// align/1.c:3: undefined reference to `one' ===

Thanks in advance.

Thanks
Swami


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]