aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfcode.h
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2020-11-23 14:07:02 +0000
committerNick Clifton <nickc@redhat.com>2020-11-23 14:07:02 +0000
commitf60742b2a1988d276c77d5c1011143f320d9b4cb (patch)
tree1d6169dbfb83984efad1a4bbdac29c562650433b /bfd/elfcode.h
parentcbf097d7b024fad33d13cc43ff0d35f2e0b11898 (diff)
downloadgdb-f60742b2a1988d276c77d5c1011143f320d9b4cb.zip
gdb-f60742b2a1988d276c77d5c1011143f320d9b4cb.tar.gz
gdb-f60742b2a1988d276c77d5c1011143f320d9b4cb.tar.bz2
Fix an illegal memory access when accessing corrupt dynamic secondary relocations.
PR 26931 * elf-bfd.h (struct elf_backend_data): Add bfd_boolean field to slurp_secondary_relocs field. (_bfd_elf_slurp_secondary_reloc_section): Update prototype. * elf.c (_bfd_elf_slurp_secondary_reloc_section): Add new parameter. Compute number of symbols based upon the new parameter. * elfcode.h (elf_slurp_reloc_table): Pass dynamic as new parameter.
Diffstat (limited to 'bfd/elfcode.h')
-rw-r--r--bfd/elfcode.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/elfcode.h b/bfd/elfcode.h
index 606ff64..c7da8f6 100644
--- a/bfd/elfcode.h
+++ b/bfd/elfcode.h
@@ -1603,7 +1603,7 @@ elf_slurp_reloc_table (bfd *abfd,
symbols, dynamic))
return FALSE;
- if (!bed->slurp_secondary_relocs (abfd, asect, symbols))
+ if (!bed->slurp_secondary_relocs (abfd, asect, symbols, dynamic))
return FALSE;
asect->relocation = relents;