diff options
author | Nick Clifton <nickc@redhat.com> | 2020-11-23 14:07:02 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2020-11-23 14:07:02 +0000 |
commit | f60742b2a1988d276c77d5c1011143f320d9b4cb (patch) | |
tree | 1d6169dbfb83984efad1a4bbdac29c562650433b /bfd/elf-bfd.h | |
parent | cbf097d7b024fad33d13cc43ff0d35f2e0b11898 (diff) | |
download | gdb-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/elf-bfd.h')
-rw-r--r-- | bfd/elf-bfd.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h index ffb75f7..e8455d1 100644 --- a/bfd/elf-bfd.h +++ b/bfd/elf-bfd.h @@ -1571,7 +1571,7 @@ struct elf_backend_data const char *, unsigned int); /* Called when after loading the normal relocs for a section. */ - bfd_boolean (*slurp_secondary_relocs) (bfd *, asection *, asymbol **); + bfd_boolean (*slurp_secondary_relocs) (bfd *, asection *, asymbol **, bfd_boolean); /* Called after writing the normal relocs for a section. */ bfd_boolean (*write_secondary_relocs) (bfd *, asection *); @@ -2919,7 +2919,7 @@ extern bfd_boolean is_debuginfo_file (bfd *); extern bfd_boolean _bfd_elf_init_secondary_reloc_section (bfd *, Elf_Internal_Shdr *, const char *, unsigned int); extern bfd_boolean _bfd_elf_slurp_secondary_reloc_section - (bfd *, asection *, asymbol **); + (bfd *, asection *, asymbol **, bfd_boolean); extern bfd_boolean _bfd_elf_copy_special_section_fields (const bfd *, bfd *, const Elf_Internal_Shdr *, Elf_Internal_Shdr *); extern bfd_boolean _bfd_elf_write_secondary_reloc_section |