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

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

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

commit 4e007c6bff146cf4b432987fad0ac17d89ac07ad
Author: H.J. Lu <[email protected]>
Date:   Fri Jan 9 08:54:42 2026 +0800

    x86: Cache the symbol table when packing relative relocations

    When packing relative relocations, x86 linker may load the same symbol
    table repeatedly, which can take a long time.  On Intel Core i7-1195G7
    with 32GB RAM, it takes more than 45 minutes to create an output with
    -pie -z pack-relative-relocs from an input with 208025 code sections.
    Cache the symbol table to reduce the link time to less than 2 seconds.

    On the same machine, creating 3.1GB clang executable in LLVM 21.1.3 debug
    build:

    user            55.39 seconds
    system          6.71 seconds
    total           65.80 seconds
    maximum set(GB) 10.43
    page faults     2406941

            PR ld/33765
            * elfxx-x86.c (elf_x86_relative_reloc_record_add): Remove
            keep_symbuf_p.
            (_bfd_x86_elf_link_relax_section): Updated.  Cache the symbol
            table to avoid loading it again.

    Signed-off-by: H.J. Lu <[email protected]>

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

Reply via email to