diff options
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elfcore.h | 7 |
2 files changed, 12 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 3245f8c..6f3fccc 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2021-03-26 Keith Seitz <keiths@redhat.com> + + * elfcore.h (_bfd_elf_core_find_build_id): Seek file + offset of program headers after calling elf_read_notes. + 2021-03-23 Jan Beulich <jbeulich@suse.com> * dwarf2.c (read_indexed_string): Rename index to idx. diff --git a/bfd/elfcore.h b/bfd/elfcore.h index 3015e58..4e63834 100644 --- a/bfd/elfcore.h +++ b/bfd/elfcore.h @@ -410,6 +410,13 @@ NAME(_bfd_elf, core_find_build_id) { elf_read_notes (abfd, offset + i_phdr->p_offset, i_phdr->p_filesz, i_phdr->p_align); + + /* Make sure ABFD returns to processing the program headers. */ + if (bfd_seek (abfd, (file_ptr) (offset + i_ehdr.e_phoff + + (i + 1) * sizeof (x_phdr)), + SEEK_SET) != 0) + goto fail; + if (abfd->build_id != NULL) return TRUE; } |