mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-12 18:36:10 +08:00
Fix an illegal memory access triggered by disassembling corrupt s390x binaries.
PR 28304 * elfxx-score7.c (score_elf_gprel15_reloc): If there is no output bfd treat the reloc as undefined.
This commit is contained in:
@ -441,6 +441,8 @@ score_elf_gprel15_reloc (bfd *abfd,
|
||||
{
|
||||
relocateable = false;
|
||||
output_bfd = symbol->section->output_section->owner;
|
||||
if (output_bfd == NULL)
|
||||
return bfd_reloc_undefined;
|
||||
}
|
||||
|
||||
ret = score_elf_final_gp (output_bfd, symbol, relocateable, error_message, &gp);
|
||||
@ -448,7 +450,7 @@ score_elf_gprel15_reloc (bfd *abfd,
|
||||
return ret;
|
||||
|
||||
return score_elf_gprel15_with_gp (abfd, symbol, reloc_entry,
|
||||
input_section, relocateable, data, gp);
|
||||
input_section, relocateable, data, gp);
|
||||
}
|
||||
|
||||
/* Do a R_SCORE_GPREL32 relocation. This is a 32 bit value which must
|
||||
|
Reference in New Issue
Block a user