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

--- Comment #2 from Sourceware Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by liu zhensong
<[email protected]>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=8934d26068eeb344e81073efe498f0b3b5427dd7

commit 8934d26068eeb344e81073efe498f0b3b5427dd7
Author: zhaozhou <[email protected]>
Date:   Thu Oct 29 14:55:20 2026 +0800

    LoongArch: Avoid signed overflow when dumping relocation addends

    loongarch_dump_reloc_record negates a negative long addend to print.

    When the addend is INT64_MIN, the negation overflows and trigger
    undefined behavior, using bfd_vma subtraction to compute the absolute
    value of addend and print it with PRIu64.

    This also handles INT64_MIN without signed overflow and preserves the
    output for other addends.

            PR ld/34808
    bfd/
            * elfnn-loongarch.c (loongarch_dump_reloc_record): Using
            bfd_vma subtraction to compute the absolute value of addend and
            print it with PRIu64.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to