commit libelf0 for openSUSE:Factory
Hello community, here is the log from the commit of package libelf0 for openSUSE:Factory checked in at Fri Aug 28 00:39:20 CEST 2009. -------- --- libelf0/libelf0.changes 2009-05-26 12:05:11.000000000 +0200 +++ libelf0/libelf0.changes 2009-07-08 16:07:11.000000000 +0200 @@ -1,0 +2,12 @@ +Wed Jul 8 16:01:52 CEST 2009 - meissner@suse.de + +- updated to 0.8.11 + - Due to some unfortunate confusion, the elf_getphnum(), + elf_getshnum() and elf_getshstrndx() are not compatible + between libelf implementations. Therefore, the developers + decided to replace them with new functions: elf_getphdrnum(), + elf_getshdrnum() and elf_getshdrstrndx(), which will always + return -1 on failure and 0 on success. Code using the old + interface should be upgraded to increase portability. + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- libelf-0.8.11.tar.bz2 New: ---- libelf-0.8.12.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libelf0.spec ++++++ --- /var/tmp/diff_new_pack.DSH7YC/_old 2009-08-28 00:37:09.000000000 +0200 +++ /var/tmp/diff_new_pack.DSH7YC/_new 2009-08-28 00:37:09.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package libelf0 (Version 0.8.11) +# spec file for package libelf0 (Version 0.8.12) # # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -20,7 +20,7 @@ Name: libelf0 Summary: An ELF Object File Access Library -Version: 0.8.11 +Version: 0.8.12 Release: 1 License: LGPL v2.1 or later Group: System/Libraries ++++++ libelf-0.8.11.tar.bz2 -> libelf-0.8.12.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libelf-0.8.11/ChangeLog new/libelf-0.8.12/ChangeLog --- old/libelf-0.8.11/ChangeLog 2007-09-07 14:04:46.000000000 +0200 +++ new/libelf-0.8.12/ChangeLog 2009-07-07 19:46:37.000000000 +0200 @@ -1,3 +1,28 @@ +Tue Jul 7 19:45:12 CEST 2009, Michael Riepe <libelf@mr511.de> + + * README: + * VERSION: + update for 0.8.12 release. + + * lib/libelf.h: + * lib/x.elfext.c: + add new and deprecate old functions. + +Fri May 22 19:17:14 CEST 2009, Michael Riepe <libelf@mr511.de> + + * README: + * VERSION: + update for 0.8.11 release. + + * lib/libelf.h: + add ELF_F_LAYOUT_OVERLAP flag. + + * lib/rawfile.c: + fix re-read zero size bug. + + * lib/update.c: + honor ELF_F_LAYOUT_OVERLAP flag. + Fri Sep 7 14:04:20 CEST 2007, Michael Riepe <libelf@mr511.de> * acconfig.h: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libelf-0.8.11/MANIFEST new/libelf-0.8.12/MANIFEST --- old/libelf-0.8.11/MANIFEST 2009-05-22 19:17:17.000000000 +0200 +++ new/libelf-0.8.12/MANIFEST 2009-07-07 19:58:41.000000000 +0200 @@ -1,8 +1,8 @@ 25275 COPYING.LIB -34569 ChangeLog +35032 ChangeLog 7462 INSTALL 5908 Makefile.in -12711 README +13159 README 7 VERSION 2955 acconfig.h 9381 aclocal.m4 @@ -54,7 +54,7 @@ 2562 lib/input.c 1088 lib/kind.c 1214 lib/libelf.def -8389 lib/libelf.h +9050 lib/libelf.h 1505 lib/memset.c 1098 lib/ndxscn.c 1558 lib/newdata.c @@ -80,7 +80,7 @@ 1614 lib/verdef_64_tom.c 7135 lib/verneed.h 1435 lib/version.c -4238 lib/x.elfext.c +4425 lib/x.elfext.c 2721 lib/x.movscn.c 2870 lib/x.remscn.c 238 libelf.pc.in diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libelf-0.8.11/README new/libelf-0.8.12/README --- old/libelf-0.8.11/README 2009-05-22 19:17:01.000000000 +0200 +++ new/libelf-0.8.12/README 2009-07-07 19:52:00.000000000 +0200 @@ -1,4 +1,4 @@ -This is the public release of libelf-0.8.11, a free ELF object +This is the public release of libelf-0.8.12, a free ELF object file access library. If you have problems with applications that use libelf and work with the commercial (SVR4, Solaris) version but not with this one, please contact me. @@ -9,7 +9,7 @@ configure. Installation is straightforward - the package is autoconf'ed. Just do -``cd libelf-0.8.11; ./configure; make; make install''. Header files +``cd libelf-0.8.12; ./configure; make; make install''. Header files will be installed in .../include/libelf/. If your system does not provide its own versions of libelf.h, nlist.h or gelf.h, ``make install'' will add the missing headers. If you prefer not to have @@ -35,7 +35,7 @@ ``make'' will try to build a shared library. If you run into problems on your system, please pass ``--disable-shared'' to configure. If you build a shared library and want it to be installed as -``libelf-0.8.11.so'' rather than ``libelf.so.0.8.11'', please use +``libelf-0.8.12.so'' rather than ``libelf.so.0.8.12'', please use ``./configure --enable-gnu-names''. Other files, e.g. ``libelf.so'' and ``libelf.so.0'' are NOT affected. @@ -181,6 +181,16 @@ sections. You can read them using elf_getdata(), but you'll only get raw (untranslated) bytes. +Changes since 0.8.11: + + * Due to some unfortunate confusion, the elf_getphnum(), + elf_getshnum() and elf_getshstrndx() are not compatible + between libelf implementations. Therefore, the developers + decided to replace them with new functions: elf_getphdrnum(), + elf_getshdrnum() and elf_getshdrstrndx(), which will always + return -1 on failure and 0 on success. Code using the old + interface should be upgraded to increase portability. + Changes since 0.8.10: * Fixed a bug in elf_rawfile(). diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libelf-0.8.11/VERSION new/libelf-0.8.12/VERSION --- old/libelf-0.8.11/VERSION 2007-09-07 14:45:56.000000000 +0200 +++ new/libelf-0.8.12/VERSION 2009-07-07 19:46:52.000000000 +0200 @@ -1 +1 @@ -0.8.11 +0.8.12 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libelf-0.8.11/lib/libelf.h new/libelf-0.8.12/lib/libelf.h --- old/libelf-0.8.11/lib/libelf.h 2009-05-22 19:08:09.000000000 +0200 +++ new/libelf-0.8.12/lib/libelf.h 2009-07-07 19:57:43.000000000 +0200 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -/* @(#) $Id: libelf.h,v 1.28 2009/05/22 17:08:09 michael Exp $ */ +/* @(#) $Id: libelf.h,v 1.29 2009/07/07 17:57:43 michael Exp $ */ #ifndef _LIBELF_H #define _LIBELF_H @@ -31,6 +31,12 @@ #include <libelf/sys_elf.h> #endif /* __LIBELF_INTERNAL__ */ +#if defined __GNUC__ && !defined __cplusplus +#define DEPRECATED __attribute__((deprecated)) +#else +#define DEPRECATED /* nothing */ +#endif + #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ @@ -245,11 +251,20 @@ /* * ELF format extensions * - * These functions return 0 on failure, 1 on success. - */ -extern int elf_getphnum __P((Elf *__elf, size_t *__resultp)); -extern int elf_getshnum __P((Elf *__elf, size_t *__resultp)); -extern int elf_getshstrndx __P((Elf *__elf, size_t *__resultp)); + * These functions return 0 on failure, 1 on success. Since other + * implementations of libelf may behave differently (there was quite + * some confusion about the correct values), they are now officially + * deprecated and should be replaced with the three new functions below. + */ +DEPRECATED extern int elf_getphnum __P((Elf *__elf, size_t *__resultp)); +DEPRECATED extern int elf_getshnum __P((Elf *__elf, size_t *__resultp)); +DEPRECATED extern int elf_getshstrndx __P((Elf *__elf, size_t *__resultp)); +/* + * Replacement functions (return -1 on failure, 0 on success). + */ +extern int elf_getphdrnum __P((Elf *__elf, size_t *__resultp)); +extern int elf_getshdrnum __P((Elf *__elf, size_t *__resultp)); +extern int elf_getshdrstrndx __P((Elf *__elf, size_t *__resultp)); /* * Convenience functions diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libelf-0.8.11/lib/x.elfext.c new/libelf-0.8.12/lib/x.elfext.c --- old/libelf-0.8.11/lib/x.elfext.c 2008-05-23 10:15:35.000000000 +0200 +++ new/libelf-0.8.12/lib/x.elfext.c 2009-07-07 19:57:43.000000000 +0200 @@ -20,43 +20,43 @@ #include <private.h> #ifndef lint -static const char rcsid[] = "@(#) $Id: x.elfext.c,v 1.4 2008/05/23 08:15:35 michael Exp $"; +static const char rcsid[] = "@(#) $Id: x.elfext.c,v 1.5 2009/07/07 17:57:43 michael Exp $"; #endif /* lint */ int -elf_getphnum(Elf *elf, size_t *resultp) { +elf_getphdrnum(Elf *elf, size_t *resultp) { if (!elf) { - return LIBELF_FAILURE; + return -1; } elf_assert(elf->e_magic == ELF_MAGIC); if (elf->e_kind != ELF_K_ELF) { seterr(ERROR_NOTELF); - return LIBELF_FAILURE; + return -1; } if (!elf->e_ehdr && !_elf_cook(elf)) { - return LIBELF_FAILURE; + return -1; } if (resultp) { *resultp = elf->e_phnum; } - return LIBELF_SUCCESS; + return 0; } int -elf_getshnum(Elf *elf, size_t *resultp) { +elf_getshdrnum(Elf *elf, size_t *resultp) { size_t num = 0; Elf_Scn *scn; if (!elf) { - return LIBELF_FAILURE; + return -1; } elf_assert(elf->e_magic == ELF_MAGIC); if (elf->e_kind != ELF_K_ELF) { seterr(ERROR_NOTELF); - return LIBELF_FAILURE; + return -1; } if (!elf->e_ehdr && !_elf_cook(elf)) { - return LIBELF_FAILURE; + return -1; } if ((scn = elf->e_scn_n)) { num = scn->s_index + 1; @@ -64,17 +64,17 @@ if (resultp) { *resultp = num; } - return LIBELF_SUCCESS; + return 0; } int -elf_getshstrndx(Elf *elf, size_t *resultp) { +elf_getshdrstrndx(Elf *elf, size_t *resultp) { size_t num = 0; size_t dummy; Elf_Scn *scn; if (!elf) { - return LIBELF_FAILURE; + return -1; } elf_assert(elf->e_magic == ELF_MAGIC); if (resultp == NULL) { @@ -82,10 +82,10 @@ } if (elf->e_kind != ELF_K_ELF) { seterr(ERROR_NOTELF); - return LIBELF_FAILURE; + return -1; } if (!elf->e_ehdr && !_elf_cook(elf)) { - return LIBELF_FAILURE; + return -1; } if (elf->e_class == ELFCLASS32) { num = ((Elf32_Ehdr*)elf->e_ehdr)->e_shstrndx; @@ -102,28 +102,43 @@ else { seterr(ERROR_UNKNOWN_CLASS); } - return LIBELF_FAILURE; + return -1; } if (num != SHN_XINDEX) { *resultp = num; - return LIBELF_SUCCESS; + return 0; } /* * look at first section header */ if (!(scn = elf->e_scn_1)) { seterr(ERROR_NOSUCHSCN); - return LIBELF_FAILURE; + return -1; } elf_assert(scn->s_magic == SCN_MAGIC); #if __LIBELF64 if (elf->e_class == ELFCLASS64) { *resultp = scn->s_shdr64.sh_link; - return LIBELF_SUCCESS; + return 0; } #endif /* __LIBELF64 */ *resultp = scn->s_shdr32.sh_link; - return LIBELF_SUCCESS; + return 0; +} + +int +elf_getphnum(Elf *elf, size_t *resultp) { + return elf_getphdrnum(elf, resultp) ? LIBELF_FAILURE : LIBELF_SUCCESS; +} + +int +elf_getshnum(Elf *elf, size_t *resultp) { + return elf_getshdrnum(elf, resultp) ? LIBELF_FAILURE : LIBELF_SUCCESS; +} + +int +elf_getshstrndx(Elf *elf, size_t *resultp) { + return elf_getshdrstrndx(elf, resultp) ? LIBELF_FAILURE : LIBELF_SUCCESS; } int ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de