bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/13402] New: using "-Wl,--relax" on the AVR port causes lss file


From: ilya.lesokhin at gmail dot com
Subject: [Bug ld/13402] New: using "-Wl,--relax" on the AVR port causes lss file and debug information to "lose sync" with generated code
Date: Fri, 11 Nov 2011 09:34:50 +0000

http://sourceware.org/bugzilla/show_bug.cgi?id=13402

             Bug #: 13402
           Summary: using "-Wl,--relax" on the AVR port causes lss file
                    and debug information to "lose sync" with generated
                    code
           Product: binutils
           Version: 2.20
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
        AssignedTo: address@hidden
        ReportedBy: address@hidden
    Classification: Unclassified


When using "-Wl,--relax" on the AVR port and the size of an instruction
actually changes, the location of the following instruction is not updated, So
the lss file and debug information "lose sync" with the actual code.

For example - the following code:
.global main
main:
call a
call b
call c

a:
b:
c:

when compiled and relaxed generates an lss file with the following:
...
00000092 <main>:
.global main
main:
call a
  92:    02 d0           rcall    .+4          ; 0x98 <_exit>
  94:    01 d0           rcall    .+2          ; 0x98 <_exit>
call b
  96:    00 d0           rcall    .+0          ; 0x98 <_exit>
...

As can be seen call b is now pointing to what was originally call c, and call c
is omitted.

This makes debugging (in AVRStudio and probably other IDE's) of relaxed code
difficult since the line's in the IDE dont match the line in the actual code.

Also, it seems the code generated by gcc is not effected by this issue.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



reply via email to

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