diff options
author | Alan Modra <amodra@gmail.com> | 2022-06-23 17:50:30 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2022-06-23 18:01:59 +0930 |
commit | 570e911f4e533fad33ad5e4e1102929cf7e80bd7 (patch) | |
tree | 142f1d95b33e23111c204d5f5adca9a0670d6278 /bfd/elf64-ppc.c | |
parent | ecc741e64e87d505fa15ca565b0d94f333e7582a (diff) | |
download | gdb-570e911f4e533fad33ad5e4e1102929cf7e80bd7.zip gdb-570e911f4e533fad33ad5e4e1102929cf7e80bd7.tar.gz gdb-570e911f4e533fad33ad5e4e1102929cf7e80bd7.tar.bz2 |
PowerPC64: fix assertion in ppc_build_one_stub with -Os code
save_res stubs aren't written in ppc_build_one_stub, their offsets
(which are zero) should not be checked.
* elf64-ppc.c (ppc_build_one_stub): Don't check save_res offsets.
Diffstat (limited to 'bfd/elf64-ppc.c')
-rw-r--r-- | bfd/elf64-ppc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index 6af33d8..04f2c14 100644 --- a/bfd/elf64-ppc.c +++ b/bfd/elf64-ppc.c @@ -11735,7 +11735,8 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) = ppc64_elf_section_data (stub_entry->group->stub_sec); ++htab->stub_id; if (stub_entry->id != htab->stub_id - || stub_entry->stub_offset < stub_entry->group->stub_sec->size) + || (stub_entry->type.main != ppc_stub_save_res + && stub_entry->stub_offset < stub_entry->group->stub_sec->size)) { BFD_ASSERT (0); if (stub_entry->id != htab->stub_id) |