]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
Never use .eh_frame in dwarf_getcfi; only dwarf_getcfi_elf will fetch it.
authorRoland McGrath <roland@redhat.com>
Fri, 3 Apr 2009 22:48:00 +0000 (15:48 -0700)
committerRoland McGrath <roland@redhat.com>
Fri, 3 Apr 2009 22:48:00 +0000 (15:48 -0700)
libdw/ChangeLog
libdw/dwarf_begin_elf.c
libdw/dwarf_getcfi.c
libdw/libdwP.h
libdw/unwind.h

index c4ed1a509a17514fb0fd0d88957f27a0a1cc209d..05631711e0c4a47442c784713b3280a7be566099 100644 (file)
@@ -1,3 +1,8 @@
+2009-04-03  Roland McGrath  <roland@redhat.com>
+
+       * libdwP.h (IDX_eh_frame): Remove it.
+       * dwarf_begin_elf.c (dwarf_scnnames): Remove its element.
+
 2009-04-01  Roland McGrath  <roland@redhat.com>
 
        * dwarf.h: Add DW_CFA_GNU_negative_offset_extended.
index aaac39992b38c997cb81bd043464c4c25b3fe59a..391a8b8556ed9c9900c9d0fb6b8d27f91eeba7c6 100644 (file)
@@ -1,5 +1,5 @@
 /* Create descriptor from ELF descriptor for processing file.
-   Copyright (C) 2002, 2003, 2004, 2005, 2007 Red Hat, Inc.
+   Copyright (C) 2002, 2003, 2004, 2005, 2007, 2009 Red Hat, Inc.
    This file is part of Red Hat elfutils.
    Written by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -70,7 +70,6 @@ static const char dwarf_scnnames[IDX_last][17] =
   [IDX_debug_aranges] = ".debug_aranges",
   [IDX_debug_line] = ".debug_line",
   [IDX_debug_frame] = ".debug_frame",
-  [IDX_eh_frame] = ".eh_frame",
   [IDX_debug_loc] = ".debug_loc",
   [IDX_debug_pubnames] = ".debug_pubnames",
   [IDX_debug_str] = ".debug_str",
index 91ac5a4736f95f8701f88d583ebc77c38128c3d3..8f52f36be7d66d446793159cc78693bd7d9f5afc 100644 (file)
@@ -62,14 +62,12 @@ dwarf_getcfi (dbg)
   if (dbg == NULL)
     return NULL;
 
-  if (dbg->cfi == NULL && (dbg->sectiondata[IDX_debug_frame] != NULL
-                          || dbg->sectiondata[IDX_eh_frame] != NULL))
+  if (dbg->cfi == NULL && dbg->sectiondata[IDX_debug_frame] != NULL)
     {
       Dwarf_CFI *cfi = libdw_typed_alloc (dbg, Dwarf_CFI);
 
-      cfi->eh_frame = dbg->sectiondata[IDX_debug_frame] == NULL;
-      cfi->data = (Elf_Data_Scn *) dbg->sectiondata[cfi->eh_frame ? IDX_eh_frame
-                                                   : IDX_debug_frame];
+      cfi->eh_frame = false;
+      cfi->data = (Elf_Data_Scn *) dbg->sectiondata[IDX_debug_frame];
 
       cfi->search_table = NULL;
       cfi->search_table_vaddr = 0;
@@ -79,8 +77,6 @@ dwarf_getcfi (dbg)
       cfi->frame_vaddr = 0;
       cfi->textrel = 0;
       cfi->datarel = 0;
-      if (cfi->eh_frame)
-       cfi->frame_vaddr = -1; // XXX .eh_frame sh_addr
 
       cfi->e_ident = (unsigned char *) elf_getident (dbg->elf, NULL);
       cfi->other_byte_order = dbg->other_byte_order;
index 653f829d52883f0661c7db9a803224060ce068d4..4cccb56cfa3ca428b89537eb437e801fbc9b2b54 100644 (file)
@@ -84,7 +84,6 @@ enum
     IDX_debug_aranges,
     IDX_debug_line,
     IDX_debug_frame,
-    IDX_eh_frame,
     IDX_debug_loc,
     IDX_debug_pubnames,
     IDX_debug_str,
index 272ea9c20abfb02908fc9144a04e7ff4604a3e73..d5169ba7b868600388b2af210d27e0cedc89a6e1 100644 (file)
@@ -90,8 +90,8 @@ typedef struct Dwarf_Frame_s Dwarf_Frame;
 /* Opaque type representing a CFI section found in a DWARF or ELF file.  */
 typedef struct Dwarf_CFI_s Dwarf_CFI;
 
-/* Use the CFI in the DWARF .debug_frame or .eh_frame section.
-   Returns NULL if there is no such section.
+/* Use the CFI in the DWARF .debug_frame section.
+   Returns NULL if there is no such section (not an error).
    The pointer returned can be used until dwarf_end is called on DWARF,
    and must not be passed to dwarf_cfi_end.
    Calling this more than once returns the same pointer.  */