arm-symbianelf segfault
Alan Modra
amodra@gmail.com
Thu Aug 27 12:30:19 GMT 2020
Yes, the target is marked obsolete due to this and other segfaults,
but this one is easy enough to fix.
* elf32-arm.c (elf32_arm_final_link_relocate): Don't segfault
on sym_sec not being output.
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index 8fec76e4e1..24991898f7 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -10595,7 +10595,9 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
osec = sym_sec->output_section;
else
osec = input_section->output_section;
- symbol = elf_section_data (osec)->dynindx;
+ symbol = 0;
+ if (osec && elf_section_data (osec))
+ symbol = elf_section_data (osec)->dynindx;
if (symbol == 0)
{
struct elf_link_hash_table *htab = elf_hash_table (info);
--
Alan Modra
Australia Development Lab, IBM
More information about the Binutils
mailing list