https://sourceware.org/bugzilla/show_bug.cgi?id=24226
Jim Wilson <wilson at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |wilson at gcc dot gnu.org

--- Comment #1 from Jim Wilson <wilson at gcc dot gnu.org> ---
The medany explicit-relocs problem is different than the one here.  This
requires an auipc to trigger, and there is no auipc here.

This looks like a compiler bug if this is compiler generated code, or a
programmer error if this is hand written assembly code.  It is not safe to use
    lw a3,%lo(g_3030+4)(a5)
unless g_3030 has 8-byte alignment, and if it does, then the %lo can not
overflow.

The current linker sources will give an error if it detects an auipc/lw
overflow, but I hadn't considered this case with an incorrect lui/lw
instruction pair.  Even though this is compiler/user error, it would still be
useful if the linker gave an error for it instead of silently producing
incorrect code, as finding this incorrect code after the fact is likely to be
hard.

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

Reply via email to