aboutsummaryrefslogtreecommitdiff
path: root/install-sh
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2023-06-20 15:10:11 -0700
committerH.J. Lu <hjl.tools@gmail.com>2023-06-21 09:13:34 -0700
commitd8bcb8723602f03351ea583cbc9ba21f39054eb1 (patch)
tree0cd48802d5c16762fc9709255c36fafbf458548b /install-sh
parentc9097e37c7bfdb407e1a5f137b69802a61390def (diff)
downloadgdb-d8bcb8723602f03351ea583cbc9ba21f39054eb1.zip
gdb-d8bcb8723602f03351ea583cbc9ba21f39054eb1.tar.gz
gdb-d8bcb8723602f03351ea583cbc9ba21f39054eb1.tar.bz2
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.
Diffstat (limited to 'install-sh')
0 files changed, 0 insertions, 0 deletions