]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
Merge commit 'elfutils-0.148' into dwarf
authorRoland McGrath <roland@redhat.com>
Fri, 2 Jul 2010 01:43:55 +0000 (18:43 -0700)
committerRoland McGrath <roland@redhat.com>
Fri, 2 Jul 2010 01:43:55 +0000 (18:43 -0700)
Conflicts:
libdw/Makefile.am
libdw/libdwP.h
src/readelf.c

1  2 
configure.ac
lib/ChangeLog
libdw/ChangeLog
libdw/Makefile.am
libdw/libdwP.h
src/ChangeLog
src/readelf.c
tests/ChangeLog

diff --cc configure.ac
Simple merge
diff --cc lib/ChangeLog
index f4aa0dfc18898b0e1d29feded55bbba3575e1246,1b8b42bc8ac06e41c131d77d24a8187dcb6be08b..b487fb4eafa05d3392a7ca9712d2fd64d72a00d6
@@@ -1,7 -1,9 +1,13 @@@
+ 2010-06-16  Roland McGrath  <roland@redhat.com>
+       * dynamicsizehash.h (HASHTYPE): New macro.
+       (struct): Use size_t for table sizes.
+       * dynamicsizehash.c: Likewise.  Use HASHTYPE for hash values.
 +2009-01-25  Roland McGrath  <roland@redhat.com>
 +
 +      * eu-config.h (__STDC_LIMIT_MACROS): Define it.
 +
  2010-02-15  Roland McGrath  <roland@redhat.com>
  
        * Makefile.am: Use config/eu.am for common stuff.
diff --cc libdw/ChangeLog
Simple merge
index 08c3f092cadb26eab92de6b6cf57966604b2af1f,530cbf4b26acdf854ad6b93729f3de0375f2718b..a6c98a87958bc01d3c50ce38756e4fb0e9559b64
@@@ -39,15 -39,7 +39,15 @@@ noinst_PROGRAMS = $(noinst_LIBRARIES:_p
  endif
  
  include_HEADERS = dwarf.h
 -pkginclude_HEADERS = libdw.h
 +pkginclude_HEADERS = libdw.h \
 +                   c++/subr.hh c++/dwarf_data \
 +                   c++/dwarf c++/dwarf_edit c++/dwarf_output \
 +                   c++/dwarf_tracker c++/dwarf_ref_maker \
 +                   c++/dwarf_comparator
 +
 +noinst_HEADERS = libdwP.h memory-access.h dwarf_abbrev_hash.h \
-                cfi.h encoded-value.h \
++               dwarf_sig8_hash.h cfi.h encoded-value.h \
 +               known-dwarf.h c++/dwarf-knowledge.cc c++/data-values.hh
  
  libdw_a_SOURCES = dwarf_begin.c dwarf_begin_elf.c dwarf_end.c dwarf_getelf.c \
                  dwarf_getpubnames.c dwarf_getabbrev.c dwarf_tag.c \
diff --cc libdw/libdwP.h
index 7a3a360abf7ce2f418aa56f79337f6860d2fd444,bb0ae1d119979a80ed17dfb296ade3db0d90b765..bbe9289688d1f2628551b94d6a8c5a915aad1fe1
@@@ -310,24 -320,20 +320,25 @@@ struct Dwarf_C
     the '- 4' term changes the '3 *' into a '2 *'.  If the
     offset_size is 8 it accounts for the 4-byte escape value
     used at the start of the length.  */
- #define DIE_OFFSET_FROM_CU_OFFSET(cu_offset, offset_size) \
-   ((cu_offset) + 3 * (offset_size) - 4 + 3)
- #define CUDIE_ADDR(fromcu)                                            \
-   ((char *) (fromcu)->dbg->sectiondata[IDX_debug_info]->d_buf         \
-    + DIE_OFFSET_FROM_CU_OFFSET ((fromcu)->start, (fromcu)->offset_size))
+ #define DIE_OFFSET_FROM_CU_OFFSET(cu_offset, offset_size, type_unit)  \
+   ((type_unit) ? ((cu_offset) + 4 * (offset_size) - 4 + 3 + 8)                \
+    : ((cu_offset) + 3 * (offset_size) - 4 + 3))
 -#define CUDIE(fromcu)                                                       \
 -  ((Dwarf_Die)                                                                      \
 -   {                                                                        \
 -     .cu = (fromcu),                                                        \
 -     .addr = ((char *) cu_data (fromcu)->d_buf                                      \
 -            + DIE_OFFSET_FROM_CU_OFFSET ((fromcu)->start,                   \
 -                                         (fromcu)->offset_size,             \
 -                                         (fromcu)->type_offset != 0))       \
 -   })                                                                       \
 -
++#define CUDIE_INIT(fromcu)                                                  \
++  {                                                                         \
++    ((char *) cu_data (fromcu)->d_buf                                       \
++     + DIE_OFFSET_FROM_CU_OFFSET ((fromcu)->start,                          \
++                                (fromcu)->offset_size,                      \
++                                (fromcu)->type_offset != 0)),               \
++    (fromcu),                                                               \
++    NULL, 0l                                                                \
++  }
 +
 +#ifdef __cplusplus
- # define CUDIE(name, fromcu)                  \
-   Dwarf_Die name = { CUDIE_ADDR (fromcu), (fromcu), NULL, 0l }
++# define CUDIE(name, fromcu)  Dwarf_Die name = CUDIE_INIT (fromcu)
 +#else
- # define CUDIE(fromcu)                                \
-   ((Dwarf_Die)                                        \
-    {                                          \
-     .cu = (fromcu),                           \
-     .addr = CUDIE_ADDR (fromcu),              \
-    })
++# define CUDIE(fromcu)                ((Dwarf_Die) CUDIE_INIT (fromcu))
 +#endif
  
  /* Macro information.  */
  struct Dwarf_Macro_s
@@@ -599,8 -621,8 +615,20 @@@ unsigned char * __libdw_formptr (Dwarf_
                                 int err_nodata, unsigned char **endpp,
                                 Dwarf_Off *offsetp)
    internal_function;
 +#endif        /* Not C++ */
 +
++static inline size_t
++cu_sec_idx (struct Dwarf_CU *cu)
++{
++  return cu->type_offset == 0 ? IDX_debug_info : IDX_debug_types;
++}
++static inline Elf_Data *
++cu_data (struct Dwarf_CU *cu)
++{
++  return cu->dbg->sectiondata[cu_sec_idx (cu)];
++}
  
  /* Aliases to avoid PLTs.  */
  INTDECL (dwarf_aggregate_size)
diff --cc src/ChangeLog
Simple merge
diff --cc src/readelf.c
Simple merge
diff --cc tests/ChangeLog
Simple merge