[Top][All Lists]

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

[Bug ld/7037] Dwarf offset error with -g -O2 options

From: nickc at redhat dot com
Subject: [Bug ld/7037] Dwarf offset error with -g -O2 options
Date: 18 Nov 2008 14:02:17 -0000

------- 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.


2008-11-18  Nick Clifton  <address@hidden>

        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


------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]