* gdb.texinfo (SVR4 Process Information): Document subcommands of
[deliverable/binutils-gdb.git] / binutils / readelf.c
index 6b03b23d6cecc73ceb73bd363f22361a2133e41a..a65c82ea3ed276db38bb655b4b8b0ec3bafa6959 100644 (file)
@@ -1767,6 +1767,10 @@ decode_ARM_machine_flags (unsigned e_flags, char buf[])
 
     case EF_ARM_EABI_VER3:
       strcat (buf, ", Version3 EABI");
+      break;
+
+    case EF_ARM_EABI_VER4:
+      strcat (buf, ", Version4 EABI");
       while (e_flags)
        {
          unsigned flag;
@@ -1912,6 +1916,7 @@ get_machine_flags (unsigned e_flags, unsigned e_machine)
              strcat (buf, ", tomcat");
              break;
            }
+         break;
 
        case EM_68K:
          if (e_flags & EF_CPU32)
@@ -2403,6 +2408,31 @@ get_ia64_section_type_name (unsigned int sh_type)
   return NULL;
 }
 
+static const char *
+get_x86_64_section_type_name (unsigned int sh_type)
+{
+  switch (sh_type)
+    {
+    case SHT_X86_64_UNWIND:    return "X86_64_UNWIND";
+    default:
+      break;
+    }
+  return NULL;
+}
+
+static const char *
+get_arm_section_type_name (unsigned int sh_type)
+{
+  switch (sh_type)
+    {
+    case SHT_ARM_EXIDX:
+      return "ARM_EXIDX";
+    default:
+      break;
+    }
+  return NULL;
+}
+
 static const char *
 get_section_type_name (unsigned int sh_type)
 {
@@ -2453,6 +2483,12 @@ get_section_type_name (unsigned int sh_type)
            case EM_IA_64:
              result = get_ia64_section_type_name (sh_type);
              break;
+           case EM_X86_64:
+             result = get_x86_64_section_type_name (sh_type);
+             break;
+           case EM_ARM:
+             result = get_arm_section_type_name (sh_type);
+             break;
            default:
              result = NULL;
              break;
@@ -3302,7 +3338,12 @@ process_program_headers (FILE *file)
                         <= segment->p_vaddr + segment->p_memsz)
                      : ((bfd_vma) section->sh_offset >= segment->p_offset
                         && (section->sh_offset + section->sh_size
-                            <= segment->p_offset + segment->p_filesz))))
+                            <= segment->p_offset + segment->p_filesz)))
+                 /* .tbss is special.  It doesn't contribute memory space
+                    to normal segments.  */
+                 && (!((section->sh_flags & SHF_TLS) != 0
+                       && section->sh_type == SHT_NOBITS)
+                     || segment->p_type == PT_TLS))
                printf ("%s ", SECTION_NAME (section));
            }
 
@@ -3993,6 +4034,8 @@ process_section_groups (FILE *file)
              group->root = g;
            }
 
+         if (symtab)
+           free (symtab);
          if (strtab)
            free (strtab);
          if (start)
This page took 0.026672 seconds and 4 git commands to generate.