* Makefile.in (ALLDEPFILES): Remove duplicate entries for
[deliverable/binutils-gdb.git] / binutils / readelf.c
index 3431249a80788f6c6cc51471920308c9a4c1eb9d..d1dea7b339e2e1fa663cf062ac6de23edd2d04cf 100644 (file)
@@ -3205,7 +3205,8 @@ process_file_header (void)
       if (section_headers != NULL
          && elf_header.e_shstrndx == (SHN_XINDEX & 0xffff))
        printf (" (%u)", section_headers[0].sh_link);
-      else if (elf_header.e_shstrndx >= elf_header.e_shnum)
+      else if (elf_header.e_shstrndx != SHN_UNDEF
+              && elf_header.e_shstrndx >= elf_header.e_shnum)
        printf (" <corrupt: out of range>");
       putc ('\n', stdout);
     }
@@ -8387,17 +8388,20 @@ debug_apply_relocations (void * file,
          sym = symtab + get_reloc_symindex (rp->r_info);
 
          /* If the reloc has a symbol associated with it,
-            make sure that it is of an appropriate type.  */
+            make sure that it is of an appropriate type.
+
+            Relocations against symbols without type can happen.
+            Gcc -feliminate-dwarf2-dups may generate symbols
+            without type for debug info.
+
+            Icc generates relocations against function symbols
+            instead of local labels.
+
+            Relocations against object symbols can happen, eg when
+            referencing a global array.  For an example of this see
+            the _clz.o binary in libgcc.a.  */
          if (sym != symtab
-             && ELF_ST_TYPE (sym->st_info) != STT_SECTION
-             /* Relocations against symbols without type can happen.
-                Gcc -feliminate-dwarf2-dups may generate symbols
-                without type for debug info.  */
-             && ELF_ST_TYPE (sym->st_info) != STT_NOTYPE
-             /* Relocations against object symbols can happen,
-                eg when referencing a global array.  For an
-                example of this see the _clz.o binary in libgcc.a.  */
-             && ELF_ST_TYPE (sym->st_info) != STT_OBJECT)
+             && ELF_ST_TYPE (sym->st_info) > STT_SECTION)
            {
              warn (_("skipping unexpected symbol type %s in %ld'th relocation in section %s\n"),
                    get_symbol_type (ELF_ST_TYPE (sym->st_info)),
This page took 0.024526 seconds and 4 git commands to generate.