2007-05-25 Eric Christopher <echristo@apple.com>
authorEric Christopher <echristo@gmail.com>
Fri, 25 May 2007 23:06:11 +0000 (23:06 +0000)
committerEric Christopher <echristo@gmail.com>
Fri, 25 May 2007 23:06:11 +0000 (23:06 +0000)
        * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame):
        Check that sym_sec isn't NULL before accessing.

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

index d0f11413cf1d6518330560567694a74f3a9a5412..37c21ddd6e731bacfcaf82a07bd93da5b2a2aff7 100644 (file)
@@ -1,3 +1,8 @@
+2007-05-25  Eric Christopher  <echristo@apple.com>
+
+       * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame):
+       Check that sym_sec isn't NULL before accessing.
+
 2007-05-24  Steve Ellcey  <sje@cup.hp.com>
 
        * Makefile.in: Regnerate.
 
        * elf32-xtensa.c (xtensa_read_table_entries): Step through table
        contents and relocs in parallel.
-       
+
 2007-04-27  Bob Wilson  <bob.wilson@acm.org>
 
        * elf32-xtensa.c (relax_property_section): Remove extra irel increment.
        duplicating section name comparisons.
        (xtensa_is_littable_section): Use CONST_STRNEQ for ".gnu.linkonce.p.".
        (xtensa_get_property_predef_flags): Use xtensa_is_insntable_section.
-       
+
 2007-04-12  Bob Wilson  <bob.wilson@acm.org>
-       
+
        * elf32-xtensa.c (elf_xtensa_gc_mark_hook): Don't follow references
        from Xtensa property sections.
-       
+
 2007-04-12  Alan Modra  <amodra@bigpond.net.au>
 
        * elf32-spu.c (needs_ovl_stub): Test that spu_elf_section_data
        (elf64_alpha_size_got_sections): Remove unused something_changed local.
        (elf64_alpha_size_plt_section): Return void.
        (elf64_alpha_size_rela_got_section): Likewise.
-       (elf64_alpha_relax_section): Only regenerate got+plt if the 
+       (elf64_alpha_relax_section): Only regenerate got+plt if the
        relax_trip counter has changed.
 
 2007-04-09  Daniel Jacobowitz  <dan@codesourcery.com>
 
 2007-04-03  Matt Thomas  <matt@netbsd.org>
 
-       * elf32-vax.c (elf_vax_relocate_section): Do not emit a PCREL reloc 
+       * elf32-vax.c (elf_vax_relocate_section): Do not emit a PCREL reloc
        in a shared object if it is not in a CODE section or if it is against
        a section symbol.  This allows DWARF2 to use pcrel format.
 
index c7cb1d754eb091810b4108ba0cfb365980097a8b..4fc91d2c7768082b77cbcaae19601efea9a01c82 100644 (file)
@@ -712,7 +712,8 @@ _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->kept_section != NULL)
+                             if (sym_sec != NULL
+                                 && sym_sec->kept_section != NULL)
                                sym_sec = sym_sec->kept_section;
                              if (sym_sec != NULL
                                  && sym_sec->output_section != NULL)
@@ -1476,7 +1477,7 @@ _bfd_elf_write_section_eh_frame (bfd *abfd,
 
   /* We don't align the section to its section alignment since the
      runtime library only expects all CIE/FDE records aligned at
-     the pointer size. _bfd_elf_discard_section_eh_frame should 
+     the pointer size. _bfd_elf_discard_section_eh_frame should
      have padded CIE/FDE records to multiple of pointer size with
      size_of_output_cie_fde.  */
   if ((sec->size % ptr_size) != 0)