diff options
author | Alan Modra <amodra@gmail.com> | 2025-02-09 12:52:23 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2025-02-09 20:42:00 +1030 |
commit | 38ee3a7664f00778fcc895a7f279c289a12cdbfd (patch) | |
tree | 8d8e41a4749392a0f68c58f7e9ae46bb07445055 /sim/aarch64/memory.h | |
parent | 0dace0da06df5008813997f32fdc1ac64490d61b (diff) | |
download | binutils-38ee3a7664f00778fcc895a7f279c289a12cdbfd.zip binutils-38ee3a7664f00778fcc895a7f279c289a12cdbfd.tar.gz binutils-38ee3a7664f00778fcc895a7f279c289a12cdbfd.tar.bz2 |
PR32662, segv in _bfd_generic_link_output_symbols
asymbol flags zero can result from certain combinations of ELF st_info
binding and type. asymbol section is set to bfd_abs_section for
genuine absolute symbols and also ones with a bogus st_shndx. A
fuzzed ELF object with such a symbol can tickle a bug in generic
linker code added by commit d3a65d4dea to avoid an abort, resulting
in a segfault. This patch fixes the segfault by removing the
sym->section->owner->flags test. I think it should be OK to exclude
all symbols without any BSF flags set, not just IR symbols.
PR 32662
* linker.c (_bfd_generic_link_output_symbols): Exclude all
symbols with zero flags. Replace abort with assertion.
Tidy logic.
Diffstat (limited to 'sim/aarch64/memory.h')
0 files changed, 0 insertions, 0 deletions