]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
2003-06-26 Elena Zannoni <ezannoni@redhat.com>
authorElena Zannoni <ezannoni@kwikemart.cygnus.com>
Thu, 26 Jun 2003 21:35:59 +0000 (21:35 +0000)
committerElena Zannoni <ezannoni@kwikemart.cygnus.com>
Thu, 26 Jun 2003 21:35:59 +0000 (21:35 +0000)
* dwarf2read.c (dwarf2_locate_sections): Ignore empty .eh_frame
sections.

gdb/ChangeLog
gdb/dwarf2read.c

index 2775ef0098306104a6f6f3c7bd10e6baf71261c5..39fa022e50c29f33401446521b98647408bd7142 100644 (file)
@@ -1,3 +1,8 @@
+2003-06-26  Elena Zannoni  <ezannoni@redhat.com>
+
+       * dwarf2read.c (dwarf2_locate_sections): Ignore empty .eh_frame
+       sections.
+
 2003-06-26  Andrew Cagney  <cagney@redhat.com>
 
        * config/djgpp/fnchange.lst: Fix 8.3 problem with sim/ppc's
index 55b335da9d9f47a335e6be810223317c6bc1b793..1d68efffbd31c44d259ce4da3122ca1ce4bc2d4d 100644 (file)
@@ -1021,9 +1021,13 @@ dwarf2_locate_sections (bfd *ignore_abfd, asection *sectp, void *ignore_ptr)
     }
   else if (STREQ (sectp->name, EH_FRAME_SECTION))
     {
-      dwarf_eh_frame_offset = sectp->filepos;
-      dwarf_eh_frame_size = bfd_get_section_size_before_reloc (sectp);
-      dwarf_eh_frame_section = sectp;
+      flagword aflag = bfd_get_section_flags (ignore_abfd, sectp);
+      if (aflag & SEC_HAS_CONTENTS)
+        {
+          dwarf_eh_frame_offset = sectp->filepos;
+          dwarf_eh_frame_size = bfd_get_section_size_before_reloc (sectp);
+          dwarf_eh_frame_section = sectp;
+        }
     }
   else if (STREQ (sectp->name, RANGES_SECTION))
     {