]> code.ossystems Code Review - openembedded-core.git/commitdiff
elfutils: Add GNU_HASH support to elf*_xlatetof
authorMark Hatle <mhatle@windriver.com>
Wed, 18 Aug 2010 22:23:50 +0000 (15:23 -0700)
committerRichard Purdie <rpurdie@linux.intel.com>
Thu, 19 Aug 2010 19:00:36 +0000 (20:00 +0100)
Add GNU_HASH and LIB types to the size table used by elf*_xlatetof in order
to avoid a divide by zero error.
Signed-off-by: Mark Hatle <mhatle@windriver.com>
meta/packages/elfutils/elfutils-0.148/elfutils-fsize.patch [new file with mode: 0644]
meta/packages/elfutils/elfutils_0.148.bb

diff --git a/meta/packages/elfutils/elfutils-0.148/elfutils-fsize.patch b/meta/packages/elfutils/elfutils-0.148/elfutils-fsize.patch
new file mode 100644 (file)
index 0000000..9cf9cef
--- /dev/null
@@ -0,0 +1,37 @@
+The ELF_T_LIB and ELF_T_GNUHASH sizes were missing from fsize table.
+
+This could cause a failure in the elf*_xlatetof function.
+
+diff -ur elfutils-0.148.orig/libelf/exttypes.h elfutils-0.148/libelf/exttypes.h
+--- elfutils-0.148.orig/libelf/exttypes.h      2009-01-08 12:56:37.000000000 -0800
++++ elfutils-0.148/libelf/exttypes.h   2010-08-18 14:00:33.000000000 -0700
+@@ -94,6 +94,7 @@
+ Vernaux32 (Ext_);
+ Syminfo32 (Ext_);
+ Move32 (Ext_);
++Lib32 (Ext_);
+ auxv_t32 (Ext_);
+ Ehdr64 (Ext_);
+@@ -110,6 +111,7 @@
+ Vernaux64 (Ext_);
+ Syminfo64 (Ext_);
+ Move64 (Ext_);
++Lib64 (Ext_);
+ auxv_t64 (Ext_);
+ #undef START
+diff -ur elfutils-0.148.orig/libelf/gelf_fsize.c elfutils-0.148/libelf/gelf_fsize.c
+--- elfutils-0.148.orig/libelf/gelf_fsize.c    2009-01-08 12:56:37.000000000 -0800
++++ elfutils-0.148/libelf/gelf_fsize.c 2010-08-18 14:11:57.000000000 -0700
+@@ -87,7 +87,9 @@
+       [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] = {
index 3922222f4da78585d63d1b3fbf0e44b8439d73b9..18887e4b963e37b721895b53d3f8cc4866d01594 100644 (file)
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3\
                     file://EXCEPTION;md5=570adcb0c1218ab57f2249c67d0ce417"
 DEPENDS = "libtool"
 
-PR = "r0"
+PR = "r1"
 
 SRC_URI = "https://fedorahosted.org/releases/e/l/elfutils/elfutils-${PV}.tar.bz2"
 
@@ -23,6 +23,7 @@ SRC_URI += "\
         file://do-autoreconf.diff \
         file://testsuite-ignore-elflint.diff \
         file://elf_additions.diff \
+       file://elfutils-fsize.patch \
 "
 
 # The buildsystem wants to generate 2 .h files from source using a binary it just built,