* elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Tidy
authorAlan Modra <amodra@gmail.com>
Mon, 2 Jul 2007 06:51:57 +0000 (06:51 +0000)
committerAlan Modra <amodra@gmail.com>
Mon, 2 Jul 2007 06:51:57 +0000 (06:51 +0000)
symsec != NULL tests.

bfd/ChangeLog
bfd/elf-eh-frame.c

index 751c993f019ffd20fd3e79c2152de80967eda6c5..6994b7ffef4096801e7efc09c6f8037c22532a6c 100644 (file)
@@ -1,3 +1,8 @@
+2007-07-02  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Tidy
+       symsec != NULL tests.
+
 2007-07-02  Alan Modra  <amodra@bigpond.net.au>
 
        PR 4712
index 4fc91d2c7768082b77cbcaae19601efea9a01c82..092c2c57ec34eaa0868b2a35d9dc13b30d8abce0 100644 (file)
@@ -712,17 +712,18 @@ _bfd_elf_discard_section_eh_frame
                              sym = &cookie->locsyms[r_symndx];
                              sym_sec = (bfd_section_from_elf_index
                                         (abfd, sym->st_shndx));
-                             if (sym_sec != NULL
-                                 && sym_sec->kept_section != NULL)
-                               sym_sec = sym_sec->kept_section;
-                             if (sym_sec != NULL
-                                 && sym_sec->output_section != NULL)
+                             if (sym_sec != NULL)
                                {
-                                 val = (sym->st_value
-                                        + sym_sec->output_offset
-                                        + sym_sec->output_section->vma);
-                                 cie->personality.val = val;
-                                 cie->local_personality = 1;
+                                 if (sym_sec->kept_section != NULL)
+                                   sym_sec = sym_sec->kept_section;
+                                 if (sym_sec->output_section != NULL)
+                                   {
+                                     val = (sym->st_value
+                                            + sym_sec->output_offset
+                                            + sym_sec->output_section->vma);
+                                     cie->personality.val = val;
+                                     cie->local_personality = 1;
+                                   }
                                }
                            }