Add missing size entries for ELF_T_LIB and ELF_T_GNUHASH.
authorRoland McGrath <roland@redhat.com>
Wed, 18 Aug 2010 23:53:43 +0000 (16:53 -0700)
committerRoland McGrath <roland@redhat.com>
Wed, 18 Aug 2010 23:53:43 +0000 (16:53 -0700)
libelf/ChangeLog
libelf/exttypes.h
libelf/gelf_fsize.c

index c1479ae..a8ded88 100644 (file)
@@ -1,3 +1,12 @@
+2010-08-18  Roland McGrath  <roland@redhat.com>
+
+       * gelf_fsize.c (__libelf_type_sizes): Add entries for ELF_T_LIB
+       and ELF_T_GNUHASH.
+       Reported by Mark Hatle <mark.hatle@windriver.com>.
+
+       * exttypes.h: Add cases for ElfNN_Lib.
+       Reported by Mark Hatle <mark.hatle@windriver.com>.
+
 2010-06-14  Ulrich Drepper  <drepper@redhat.com>
 
        * gelf_update_shdr.c: Implicitly set ELF_F_DIRTY bit.
index 3bb90c3..2b15667 100644 (file)
@@ -1,5 +1,5 @@
 /* External ELF types.
-   Copyright (C) 1998, 1999, 2000, 2002, 2007 Red Hat, Inc.
+   Copyright (C) 1998-2010 Red Hat, Inc.
    This file is part of Red Hat elfutils.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 1998.
 
@@ -94,6 +94,7 @@ Verneed32 (Ext_);
 Vernaux32 (Ext_);
 Syminfo32 (Ext_);
 Move32 (Ext_);
+Lib32 (Ext_);
 auxv_t32 (Ext_);
 
 Ehdr64 (Ext_);
@@ -110,6 +111,7 @@ Verneed64 (Ext_);
 Vernaux64 (Ext_);
 Syminfo64 (Ext_);
 Move64 (Ext_);
+Lib64 (Ext_);
 auxv_t64 (Ext_);
 
 #undef START
index 98197e0..7a9a308 100644 (file)
@@ -1,5 +1,5 @@
 /* Return the size of an object file type.
-   Copyright (C) 1998, 1999, 2000, 2002, 2007 Red Hat, Inc.
+   Copyright (C) 1998-2010 Red Hat, Inc.
    This file is part of Red Hat elfutils.
    Written by Ulrich Drepper <drepper@redhat.com>, 1998.
 
@@ -61,7 +61,7 @@
 /* These are the sizes for all the known types.  */
 const size_t __libelf_type_sizes[EV_NUM - 1][ELFCLASSNUM - 1][ELF_T_NUM] =
 {
-  /* We have no entry for EV_NONE siince we have to set an error.  */
+  /* We have no entry for EV_NONE since we have to set an error.  */
   [EV_CURRENT - 1] = {
     [ELFCLASS32 - 1] = {
 #define TYPE_SIZES(LIBELFBITS) \
@@ -87,7 +87,9 @@ const size_t __libelf_type_sizes[EV_NUM - 1][ELFCLASSNUM - 1][ELF_T_NUM] =
       [ELF_T_NHDR]     = sizeof (ElfW2(LIBELFBITS, Ext_Nhdr)),               \
       [ELF_T_SYMINFO]  = sizeof (ElfW2(LIBELFBITS, Ext_Syminfo)),            \
       [ELF_T_MOVE]     = sizeof (ElfW2(LIBELFBITS, Ext_Move)),               \
-      [ELF_T_AUXV]     = sizeof (ElfW2(LIBELFBITS, Ext_auxv_t))
+      [ELF_T_LIB]      = sizeof (ElfW2(LIBELFBITS, Ext_Lib)),                \
+      [ELF_T_AUXV]     = sizeof (ElfW2(LIBELFBITS, Ext_auxv_t)),             \
+      [ELF_T_GNUHASH]  = ELFW2(LIBELFBITS, FSZ_WORD)
       TYPE_SIZES (32)
     },
     [ELFCLASS64 - 1] = {