incorrect debug information with -O2 and above options

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux