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

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

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

commit edd17a2d81b4dec24c2f357d5a583e99a63dcbd2
Author: Matt Turner <[email protected]>
Date:   Sat Sep 26 12:51:32 2026 -0400

    alpha: don't merge .got subsections once GPREL relocs exist

    Commit d1c109de72f stopped elf64_alpha_relax_section merging .got
    subsections after the first relaxation pass, since the second pass
    turns GOT loads into GPREL16 against the subsection's gp and a later
    merge moves that gp.  It tested relax_pass == 0.

    But ldelf_map_segments reruns lang_relax_sections, starting again from
    pass 0, when it has to redo the layout.  Merging can then still happen
    after GPREL16 relocs exist, giving

      relocation truncated to fit: GPREL16 against symbol `...'

    Remember that pass 1 has been reached and don't merge after that.

            PR ld/5276
    bfd/
            * elf64-alpha.c (struct alpha_elf_link_hash_table): Add
            no_got_merge.
            (elf64_alpha_relax_section): Set it once relax_pass is nonzero,
            and don't merge .got subsections after that.
    ld/
            * testsuite/ld-alpha/got-merge-gprel-a.s: New.
            * testsuite/ld-alpha/got-merge-gprel-b.s: New.
            * testsuite/ld-alpha/got-merge-gprel.d: New.

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

Reply via email to