bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/30358] bfd very slow (> 4 minutes) to link busybox with -Wl,--so


From: sam at gentoo dot org
Subject: [Bug ld/30358] bfd very slow (> 4 minutes) to link busybox with -Wl,--sort-section,alignment (regression in binutils-2.40)
Date: Wed, 19 Apr 2023 09:20:46 +0000

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

Sam James <sam at gentoo dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |matz at suse dot de

--- Comment #8 from Sam James <sam at gentoo dot org> ---
$ git bisect bad
af31506c31a59a6edbb13498d6075fa704b801cd is the first bad commit
commit af31506c31a59a6edbb13498d6075fa704b801cd
Author: Michael Matz <matz@suse.de>
Date:   Thu Nov 10 16:06:20 2022 +0100

    Only use wild_sort_fast

    there's no reason why the tree-based variant can't always be used
    when sorting is required, it merely needs to also support filename
    sorting and have a fast path for insertion at end (aka rightmost tree
    leaf).

    The filename sorting isn't tested anywhere and the only scripttempl
    that uses it is avr (for 'SORT(*)(.ctors)'), and I believe even there it
    was a mistake.  Either way, this adds a testcase for filename sorting as
    well.

    Then the non-BST based sorting can be simplified to only support
    the fast case of no sorting required at all (at the same time renaming
    the two variants to _sort and _nosort).

 ld/ldlang.c                          | 302 +++++++++++++++--------------------
 ld/ldlang.h                          |   3 +-
 ld/testsuite/ld-scripts/sort-file.d  |  18 +++
 ld/testsuite/ld-scripts/sort-file.t  |   6 +
 ld/testsuite/ld-scripts/sort-file1.s |   6 +
 ld/testsuite/ld-scripts/sort-file2.s |   6 +
 6 files changed, 163 insertions(+), 178 deletions(-)
 create mode 100644 ld/testsuite/ld-scripts/sort-file.d
 create mode 100644 ld/testsuite/ld-scripts/sort-file.t
 create mode 100644 ld/testsuite/ld-scripts/sort-file1.s
 create mode 100644 ld/testsuite/ld-scripts/sort-file2.s

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