bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/31503] [hppa] Unsupported 14-bit PA 2.0 relocations for 32-bit (


From: cvs-commit at gcc dot gnu.org
Subject: [Bug ld/31503] [hppa] Unsupported 14-bit PA 2.0 relocations for 32-bit (narrow) mode (elf32-hppa.c)
Date: Wed, 03 Apr 2024 22:12:37 +0000

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

--- Comment #16 from Sourceware Commits <cvs-commit at gcc dot gnu.org> ---
The binutils-2_42-branch branch has been updated by John David Anglin
<danglin@sourceware.org>:

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

commit d125f9675372b1ae01ceb1893c06ccb27bc7bf22
Author: John David Anglin <danglin@gcc.gnu.org>
Date:   Mon Apr 1 23:00:52 2024 +0000

    hppa: Implement PA 2.0 symbolic relocations for long displacements

    The PA 2.0 architecture introduced several new load and store
    instructions with long displacements.  These include floating
    point loads and stores for word mode, and integer and floating
    point loads and stores for double words.  Currently, ld does
    not correctly support symbolic relocations for these instructions.

    If these are used, ld applies the standard R_PARISC_DPREL14R
    relocation and corrupts the instruction.  This change uses
    bfd_hppa_insn2fmt to determine the correct relocation format.

    We need to check the computed displacement as the immediate
    value used in these instruction must be a multiple of 4 or 8
    depending on whether the access is for a word or double word.

    A misaligned offset can potentially occur if the symbol is not
    properly aligned or if $global$ (the global pointer) is not
    double word aligned.  $global$ is provided as a .data section
    start symbol.  The patch adjusts elf.sc and hppalinux.sh to
    align .data to a 8-byte boundary in non-shared and non-pie
    links.

    2024-04-01  John David Anglin  <danglin@gcc.gnu.org>

            PR ld/31503

    bfd/ChangeLog:

            * elf32-hppa.c (final_link_relocate): Output

    ld/ChangeLog:

            * emulparams/hppalinux.sh (DATA_SECTION_ALIGNMENT): Define.
            * scripttempl/elf.sc: Align .data section to DATA_SECTION_ALIGNMENT
            when relocating.

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