------- Additional Comments From nickc at redhat dot com 2008-11-18 14:02 ------- Hi Swami,
Well this was a fun one to track down. The problem turned out to be the descriptions of the CR16 relocs in elf32-cr16.c. In particular they were using the src_mask field of reloc_howto_struct which should only be set for targets which use REL relocations. The result of this problem was that the contents of the .debug_info section in the object file were being relocated incorrectly, which resulted in the error message you were seeing as well as the badly formatted name for the source file that contained the undefined reference. I have uploaded a patch which fixes the reloc descriptions. With the patch applied I now get: ld: warning: cannot find entry symbol _start; defaulting to 00000004 test.o: In function `main': /local/user/swami/sitel/align/test.c:5: undefined reference to `one' I will be applying the patch to the source tree shortly. Cheers Nick bfd/ChangeLog 2008-11-18 Nick Clifton <[EMAIL PROTECTED]> PR 7037 * elf32-cr16.c (cr16_elf_howto_table): Zero the src_mask field of the reloc descriptions. -- What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED Summary| Dwarf offset error with -g |Dwarf offset error with -g - |-O2 options |O2 options http://sourceware.org/bugzilla/show_bug.cgi?id=7037 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils