bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/29259] ld -r may create reloc sections with unordered relocs aga


From: cvs-commit at gcc dot gnu.org
Subject: [Bug ld/29259] ld -r may create reloc sections with unordered relocs again
Date: Sat, 18 Jun 2022 10:43:50 +0000

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

--- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot 
gnu.org> ---
The master branch has been updated by Alan Modra <amodra@sourceware.org>:

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

commit fba1ac87dcb76e61f270d236f1e7c8aaec80f9c4
Author: Tomoaki Kawada <kawada@kmckk.co.jp>
Date:   Thu Jun 16 09:54:30 2022 +0000

    Fix the sorting algorithm for reloc entries

    The optimized insertion sort algorithm in `elf_link_adjust_relocs`
    incorrectly assembled "runs" from unsorted entries and inserted them to an
    already-sorted prefix, breaking the loop invariants of insertion sort.
    This commit updates the run assembly loop to break upon encountering a
    non-monotonic change in the sort key.

            PR 29259
    bfd/
            * elflink.c (elf_link_adjust_relocs): Ensure run being inserted
            is sorted.
    ld/
            * testsuite/ld-elf/pr29259.d,
            * testsuite/ld-elf/pr29259.s,
            * testsuite/ld-elf/pr29259.t: New test.

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