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: unassig...@sourceware.org
ReportedBy: ilya.lesok...@gmail.com
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:
...
0092 :
.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.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils