bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/30566] -z pack-relative-relocs --no-keep-memory uses more memory


From: cvs-commit at gcc dot gnu.org
Subject: [Bug ld/30566] -z pack-relative-relocs --no-keep-memory uses more memory than without --no-keep-memory
Date: Wed, 21 Jun 2023 16:15:57 +0000

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

--- Comment #3 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot 
gnu.org> ---
The master branch has been updated by H.J. Lu <hjl@sourceware.org>:

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

commit d8bcb8723602f03351ea583cbc9ba21f39054eb1
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue Jun 20 15:10:11 2023 -0700

    x86: Free the symbol buffer and the relocation buffer after use

    When --no-keep-memory is used, the symbol buffer and the relocation
    buffer aren't cached.  When packing relative relocations, we may
    allocate a new symbol buffer and a new relocation buffer for each
    eligible section in an object file.  If there are many sections,
    memory may be exhausted.  In this case, we should free the symbol
    buffer and the relocation buffer after use.  If symbol buffer entries
    are used to track relative relocations against local symbols for later
    use, the symbol buffer should be cached.

            PR ld/30566
            * elfxx-x86.c (elf_x86_relative_reloc_record_add): Add an
            argument to inform caller if the symbol buffer should be kept.
            (_bfd_x86_elf_link_relax_section): Call
            _bfd_elf_link_info_read_relocs instead of
            _bfd_elf_link_read_relocs.  Free the symbol buffer and the
            relocation buffer after use.  Cache the symbol buffer if it
            is used.

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