From: Roland McGrath Date: Wed, 18 Aug 2010 23:53:43 +0000 (-0700) Subject: Add missing size entries for ELF_T_LIB and ELF_T_GNUHASH. X-Git-Tag: elfutils-0.149~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b088f2164168f34107d8d9549ed528768cdaf605;p=thirdparty%2Felfutils.git Add missing size entries for ELF_T_LIB and ELF_T_GNUHASH. --- diff --git a/libelf/ChangeLog b/libelf/ChangeLog index c1479ae4d..a8ded88ee 100644 --- a/libelf/ChangeLog +++ b/libelf/ChangeLog @@ -1,3 +1,12 @@ +2010-08-18 Roland McGrath + + * gelf_fsize.c (__libelf_type_sizes): Add entries for ELF_T_LIB + and ELF_T_GNUHASH. + Reported by Mark Hatle . + + * exttypes.h: Add cases for ElfNN_Lib. + Reported by Mark Hatle . + 2010-06-14 Ulrich Drepper * gelf_update_shdr.c: Implicitly set ELF_F_DIRTY bit. diff --git a/libelf/exttypes.h b/libelf/exttypes.h index 3bb90c3ad..2b15667c8 100644 --- a/libelf/exttypes.h +++ b/libelf/exttypes.h @@ -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 , 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 diff --git a/libelf/gelf_fsize.c b/libelf/gelf_fsize.c index 98197e0f3..7a9a308ed 100644 --- a/libelf/gelf_fsize.c +++ b/libelf/gelf_fsize.c @@ -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 , 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] = {