]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - binutils/readelf.c
Do not complain when copying a file format that does not support relocations.
[thirdparty/binutils-gdb.git] / binutils / readelf.c
index 4887a54a9d1ee88221362c3844721d3433a52180..9a881069d5ef166c76ed92606586774f9d475f43 100644 (file)
@@ -1194,6 +1194,10 @@ dump_relocations (FILE *file,
                        sec_name = "ABS";
                      else if (psym->st_shndx == SHN_COMMON)
                        sec_name = "COMMON";
+                     else if (elf_header.e_machine == EM_IA_64
+                              && elf_header.e_ident[EI_OSABI] == ELFOSABI_HPUX
+                              && psym->st_shndx == SHN_IA_64_ANSI_COMMON)
+                       sec_name = "ANSI_COM";
                      else
                        {
                          sprintf (name_buf, "<section 0x%x>",
@@ -1912,6 +1916,7 @@ get_machine_flags (unsigned e_flags, unsigned e_machine)
            case E_MIPS_ARCH_32: strcat (buf, ", mips32"); break;
            case E_MIPS_ARCH_32R2: strcat (buf, ", mips32r2"); break;
            case E_MIPS_ARCH_64: strcat (buf, ", mips64"); break;
+           case E_MIPS_ARCH_64R2: strcat (buf, ", mips64r2"); break;
            default: strcat (buf, ", unknown ISA"); break;
            }
 
@@ -5226,10 +5231,10 @@ process_version_sections (FILE *file)
                    aux.vna_next  = BYTE_GET (eaux->vna_next);
 
                    if (dynamic_strings)
-                     printf (_("  %#06x: Name: %s"),
+                     printf (_("  %#06x:   Name: %s"),
                              isum, dynamic_strings + aux.vna_name);
                    else
-                     printf (_("  %#06x: Name index: %lx"),
+                     printf (_("  %#06x:   Name index: %lx"),
                              isum, aux.vna_name);
 
                    printf (_("  Flags: %s  Version: %d\n"),
@@ -5550,7 +5555,11 @@ get_symbol_index_type (unsigned int type)
     case SHN_ABS:      return "ABS";
     case SHN_COMMON:   return "COM";
     default:
-      if (type >= SHN_LOPROC && type <= SHN_HIPROC)
+      if (type == SHN_IA_64_ANSI_COMMON
+         && elf_header.e_machine == EM_IA_64
+         && elf_header.e_ident[EI_OSABI] == ELFOSABI_HPUX)
+       return "ANSI_COM";
+      else if (type >= SHN_LOPROC && type <= SHN_HIPROC)
        sprintf (buff, "PRC[0x%04x]", type);
       else if (type >= SHN_LOOS && type <= SHN_HIOS)
        sprintf (buff, "OS [0x%04x]", type);