bug-binutils
[Top][All Lists]
Advanced

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

[Bug gas/21407] gas -relax option on SPARC generates incorrect code


From: jeremygccb at baymoo dot org
Subject: [Bug gas/21407] gas -relax option on SPARC generates incorrect code
Date: Mon, 24 Apr 2017 20:31:15 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=21407

--- Comment #4 from Jeremy Cooper <jeremygccb at baymoo dot org> ---
Ok, I concur. It left me queasy, too, that the branch offset would have been
severely reduced as a result of the previous code, but I had no insight as to
whether the rest of binutils had been modified to handle this problem.

Clearly the linker hasn't been modified to "undo" the relaxation in such a
case, so it is indeed much better not to apply the relaxation unless the branch
target is known at assembly time. So the correct fix is indeed to check whether
addsy is non-NULL first.

Is there a better way to ensure that the relocation entry will be removed
completely as a result of the relaxation? Where is the code that ensures that
the relocation information is destroyed as a result of addsy being non-NULL?

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