gdb: add target_ops::supports_displaced_step
[deliverable/binutils-gdb.git] / bfd / elf-eh-frame.c
index b622ffcee2aa1dbd8b875b7122d3f307eb118c13..7a129b00f8d78fecd8c450ef8aca564eea4a9485 100644 (file)
@@ -1,5 +1,5 @@
 /* .eh_frame section optimization.
-   Copyright (C) 2001-2019 Free Software Foundation, Inc.
+   Copyright (C) 2001-2020 Free Software Foundation, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -1049,13 +1049,10 @@ _bfd_elf_parse_eh_frame (bfd *abfd, struct bfd_link_info *info,
     (_("error in %pB(%pA); no .eh_frame_hdr table will be created"),
      abfd, sec);
   hdr_info->u.dwarf.table = FALSE;
-  if (sec_info)
-    free (sec_info);
+  free (sec_info);
  success:
-  if (ehbuf)
-    free (ehbuf);
-  if (local_cies)
-    free (local_cies);
+  free (ehbuf);
+  free (local_cies);
 #undef REQUIRE
 }
 
@@ -1558,11 +1555,8 @@ _bfd_elf_discard_section_eh_frame
          }
       }
 
-  if (sec_info->cies)
-    {
-      free (sec_info->cies);
-      sec_info->cies = NULL;
-    }
+  free (sec_info->cies);
+  sec_info->cies = NULL;
 
   /* It may be that some .eh_frame input section has greater alignment
      than other .eh_frame sections.  In that case we run the risk of
@@ -2149,6 +2143,7 @@ _bfd_elf_write_section_eh_frame (bfd *abfd,
                        /* Fall thru */
                      case bfd_arch_frv:
                      case bfd_arch_i386:
+                     case bfd_arch_nios2:
                        BFD_ASSERT (htab->hgot != NULL
                                    && ((htab->hgot->root.type
                                         == bfd_link_hash_defined)
@@ -2510,8 +2505,7 @@ write_dwarf_eh_frame_hdr (bfd *abfd, struct bfd_link_info *info)
     retval = FALSE;
   free (contents);
 
-  if (hdr_info->u.dwarf.array != NULL)
-    free (hdr_info->u.dwarf.array);
+  free (hdr_info->u.dwarf.array);
   return retval;
 }
 
This page took 0.041481 seconds and 4 git commands to generate.