include/elf/
[deliverable/binutils-gdb.git] / bfd / elf32-m68hc1x.c
index 9ad82b6e19e9bfe8ae87b63587b63de04fc3c3c6..2660c890cb80d4b88b444ad20300d7f0e7ea46c6 100644 (file)
@@ -450,8 +450,13 @@ elf32_m68hc11_size_stubs (bfd *output_bfd, bfd *stub_bfd,
                   if (!is_far)
                     continue;
 
-                  hdr = elf_elfsections (input_bfd)[sym->st_shndx];
-                  sym_sec = hdr->bfd_section;
+                 if (sym->st_shndx >= elf_numsections (input_bfd))
+                   sym_sec = NULL;
+                 else
+                   {
+                     hdr = elf_elfsections (input_bfd)[sym->st_shndx];
+                     sym_sec = hdr->bfd_section;
+                   }
                   stub_name = (bfd_elf_string_from_elf_section
                                (input_bfd, symtab_hdr->sh_link,
                                 sym->st_name));
This page took 0.109447 seconds and 4 git commands to generate.