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

--- Comment #6 from Sourceware Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Maciej W. Rozycki <ma...@sourceware.org>:

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

commit 78f28b69ff1cdd8fcdf1944cfd82ea45f23e94d2
Author: Alan Modra <amo...@gmail.com>
Date:   Sat Jul 12 01:25:53 2025 +0100

    MIPS: Correct HI/LO rel reloc howto special_function entries

    This corrects the DTPREL_HI16/LO16 and TPREL_HI16/LO16 howtos to use
    _bfd_mips_elf_{hi,lo}16_reloc special functions, in order to support
    addends outside the range [0,32767] on these relocations.

    R_MIPS_GOT_HI16, R_MIPS_GOT_LO16, R_MIPS_CALL_HI16 and R_MIPS_CALL_LO16
    are left alone as it seems that we (quite reasonably) only support
    zero addends for those relocs.

            PR 19977
    bfd/
            * elf32-mips.c (elf_mips_howto_table_rel): Set special_function
            to _bfd_mips_elf_hi16_reloc for R_MIPS_TLS_DTPREL_HI16 and
            R_MIPS_TLS_TPREL_HI16.  Set special_function to
            _bfd_mips_elf_lo16_reloc for R_MIPS_TLS_DTPREL_LO16 and
            R_MIPS_TLS_TPREL_LO16
            (elf_mips16_howto_table_rel): Likewise for
            R_MIPS16_TLS_DTPREL_HI16, R_MIPS16_TLS_DTPREL_LO16,
            R_MIPS16_TLS_TPREL_HI16 and R_MIPS16_TLS_TPREL_LO16.
            (elf_micromips_howto_table_rel): Likewise for
            R_MICROMIPS_TLS_DTPREL_HI16, R_MICROMIPS_TLS_DTPREL_LO16,
            R_MICROMIPS_TLS_TPREL_HI16 and R_MICROMIPS_TLS_TPREL_LO16.
            * elf64-mips.c (mips_elf64_howto_table_rel): Similarly.
            (mips16_elf64_howto_table_rel): Similarly.
            (micromips_elf64_howto_table_rel): Similarly.
            * elfn32-mips.c: As for elf64-mips.c.
    gas/
            * testsuite/gas/mips/pr19977.d,
            * testsuite/gas/mips/pr19977.s: New test.
            * testsuite/gas/mips/mips.exp: Run it.

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

Reply via email to