projects
/
binutils-gdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1bced52
)
Fix an illegal memory access triggered by disassembling corrupt s390x binaries.
author
Nick Clifton
<nickc@redhat.com>
Mon, 6 Sep 2021 11:24:49 +0000
(12:24 +0100)
committer
Nick Clifton
<nickc@redhat.com>
Mon, 6 Sep 2021 11:25:20 +0000
(12:25 +0100)
PR 28304
* elfxx-score7.c (score_elf_gprel15_reloc): If there is no output bfd
treat the reloc as undefined.
bfd/elf32-score7.c
patch
|
blob
|
history
diff --git
a/bfd/elf32-score7.c
b/bfd/elf32-score7.c
index a6960c02c50afb304b35703b09e161adc97928d6..43cf5cb70cded84bf9db4d7523c309dcabdfe4ed 100644
(file)
--- a/
bfd/elf32-score7.c
+++ b/
bfd/elf32-score7.c
@@
-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