From f19358842868b849a44d597a37d37a458e35fa0a Mon Sep 17 00:00:00 2001 From: Yu Ke Date: Fri, 16 Jul 2010 12:26:46 +0800 Subject: elfutils: upgrade to version 0.148 reuse the open embedded elfutils_0.143.bb recipe to fix the cross compiling issue. Also pick patches from debian elfutils-0.148-1 pkg Signed-off-by: Yu Ke --- meta-moblin/conf/distro/include/poky-moblin.inc | 2 +- meta/conf/distro/include/poky-default.inc | 2 +- .../elfutils/elfutils-0.131/gcc-4.3_support.diff | 100 -- .../elfutils/elfutils-0.131/gnu_inline.diff | 105 -- .../elfutils-0.131/prelink_build_fix.patch | 70 - .../elfutils/elfutils-0.131/warnings.patch | 154 -- .../elfutils/elfutils-0.148/arm_backend.diff | 447 +++++ .../elfutils/elfutils-0.148/do-autoreconf.diff | 337 ++++ .../elfutils/elfutils-0.148/elf_additions.diff | 69 + .../elfutils/elfutils-0.148/hppa_backend.diff | 799 +++++++++ meta/packages/elfutils/elfutils-0.148/i386_dis.h | 1657 +++++++++++++++++++ .../elfutils/elfutils-0.148/m68k_backend.diff | 307 ++++ .../elfutils/elfutils-0.148/mips_backend.diff | 711 ++++++++ .../elfutils-0.148/redhat-portability.diff | 1122 +++++++++++++ .../elfutils/elfutils-0.148/redhat-robustify.diff | 1707 ++++++++++++++++++++ .../elfutils-0.148/testsuite-ignore-elflint.diff | 19 + meta/packages/elfutils/elfutils-0.148/x86_64_dis.h | 1632 +++++++++++++++++++ meta/packages/elfutils/elfutils_0.131.bb | 29 - meta/packages/elfutils/elfutils_0.148.bb | 58 + 19 files changed, 8867 insertions(+), 460 deletions(-) delete mode 100644 meta/packages/elfutils/elfutils-0.131/gcc-4.3_support.diff delete mode 100644 meta/packages/elfutils/elfutils-0.131/gnu_inline.diff delete mode 100644 meta/packages/elfutils/elfutils-0.131/prelink_build_fix.patch delete mode 100644 meta/packages/elfutils/elfutils-0.131/warnings.patch create mode 100644 meta/packages/elfutils/elfutils-0.148/arm_backend.diff create mode 100644 meta/packages/elfutils/elfutils-0.148/do-autoreconf.diff create mode 100644 meta/packages/elfutils/elfutils-0.148/elf_additions.diff create mode 100644 meta/packages/elfutils/elfutils-0.148/hppa_backend.diff create mode 100644 meta/packages/elfutils/elfutils-0.148/i386_dis.h create mode 100644 meta/packages/elfutils/elfutils-0.148/m68k_backend.diff create mode 100644 meta/packages/elfutils/elfutils-0.148/mips_backend.diff create mode 100644 meta/packages/elfutils/elfutils-0.148/redhat-portability.diff create mode 100644 meta/packages/elfutils/elfutils-0.148/redhat-robustify.diff create mode 100644 meta/packages/elfutils/elfutils-0.148/testsuite-ignore-elflint.diff create mode 100644 meta/packages/elfutils/elfutils-0.148/x86_64_dis.h delete mode 100644 meta/packages/elfutils/elfutils_0.131.bb create mode 100644 meta/packages/elfutils/elfutils_0.148.bb diff --git a/meta-moblin/conf/distro/include/poky-moblin.inc b/meta-moblin/conf/distro/include/poky-moblin.inc index 2eeaa037aa..af74c31547 100644 --- a/meta-moblin/conf/distro/include/poky-moblin.inc +++ b/meta-moblin/conf/distro/include/poky-moblin.inc @@ -21,7 +21,7 @@ PREFERRED_VERSION_binutils-cross ?= "${BINUVERSION}" PREFERRED_VERSION_linux-libc-headers ?= "2.6.33" PREFERRED_VERSION_glibc ?= "2.9" PREFERRED_VERSION_glibc-initial ?= "2.9" -PREFERRED_VERSION_elfutils ?= "0.131" +PREFERRED_VERSION_elfutils ?= "0.148" require conf/distro/include/as-needed.inc diff --git a/meta/conf/distro/include/poky-default.inc b/meta/conf/distro/include/poky-default.inc index aab9b4d2f9..0df5cf680a 100644 --- a/meta/conf/distro/include/poky-default.inc +++ b/meta/conf/distro/include/poky-default.inc @@ -41,7 +41,7 @@ PREFERRED_VERSION_glibc ?= "${GLIBCVERSION}" PREFERRED_VERSION_glibc-nativesdk ?= "${GLIBCVERSION}" PREFERRED_VERSION_glibc-initial ?= "${GLIBCVERSION}" PREFERRED_VERSION_glibc-initial-nativesdk ?= "${GLIBCVERSION}" -PREFERRED_VERSION_elfutils ?= "0.131" +PREFERRED_VERSION_elfutils ?= "0.148" require conf/distro/include/as-needed.inc diff --git a/meta/packages/elfutils/elfutils-0.131/gcc-4.3_support.diff b/meta/packages/elfutils/elfutils-0.131/gcc-4.3_support.diff deleted file mode 100644 index b337da9b60..0000000000 --- a/meta/packages/elfutils/elfutils-0.131/gcc-4.3_support.diff +++ /dev/null @@ -1,100 +0,0 @@ -Index: elfutils-0.131/libelf/common.h -=================================================================== ---- elfutils-0.131.orig/libelf/common.h 2008-04-02 13:32:19.000000000 -0300 -+++ elfutils-0.131/libelf/common.h 2008-04-02 13:35:53.000000000 -0300 -@@ -110,45 +110,6 @@ - } - - --/* Acquire lock for the descriptor and all children. */ --static void --libelf_acquire_all (Elf *elf) --{ -- rwlock_wrlock (elf->lock); -- -- if (elf->kind == ELF_K_AR) -- { -- Elf *child = elf->state.ar.children; -- -- while (child != NULL) -- { -- if (child->ref_count != 0) -- libelf_acquire_all (child); -- child = child->next; -- } -- } --} -- --/* Release own lock and those of the children. */ --static void --libelf_release_all (Elf *elf) --{ -- if (elf->kind == ELF_K_AR) -- { -- Elf *child = elf->state.ar.children; -- -- while (child != NULL) -- { -- if (child->ref_count != 0) -- libelf_release_all (child); -- child = child->next; -- } -- } -- -- rwlock_unlock (elf->lock); --} -- -- - /* Macro to convert endianess in place. It determines the function it - has to use itself. */ - #define CONVERT(Var) \ -Index: elfutils-0.131/libelf/elf_readall.c -=================================================================== ---- elfutils-0.131.orig/libelf/elf_readall.c 2008-04-02 13:36:06.000000000 -0300 -+++ elfutils-0.131/libelf/elf_readall.c 2008-04-02 13:38:25.000000000 -0300 -@@ -60,6 +60,45 @@ - #include "common.h" - - -+/* Acquire lock for the descriptor and all children. */ -+static void -+libelf_acquire_all (Elf *elf) -+{ -+ rwlock_wrlock (elf->lock); -+ -+ if (elf->kind == ELF_K_AR) -+ { -+ Elf *child = elf->state.ar.children; -+ -+ while (child != NULL) -+ { -+ if (child->ref_count != 0) -+ libelf_acquire_all (child); -+ child = child->next; -+ } -+ } -+} -+ -+/* Release own lock and those of the children. */ -+static void -+libelf_release_all (Elf *elf) -+{ -+ if (elf->kind == ELF_K_AR) -+ { -+ Elf *child = elf->state.ar.children; -+ -+ while (child != NULL) -+ { -+ if (child->ref_count != 0) -+ libelf_release_all (child); -+ child = child->next; -+ } -+ } -+ -+ rwlock_unlock (elf->lock); -+} -+ -+ - static void - set_address (Elf *elf, size_t offset) - { diff --git a/meta/packages/elfutils/elfutils-0.131/gnu_inline.diff b/meta/packages/elfutils/elfutils-0.131/gnu_inline.diff deleted file mode 100644 index 8652d0e1cf..0000000000 --- a/meta/packages/elfutils/elfutils-0.131/gnu_inline.diff +++ /dev/null @@ -1,105 +0,0 @@ ---- - backends/ia64_retval.c | 3 +++ - libdw/libdw.h | 2 +- - libdw/libdwP.h | 3 +++ - src/ld.h | 3 +++ - src/strip.c | 3 +++ - src/unstrip.c | 4 ++++ - 6 files changed, 17 insertions(+), 1 deletion(-) - ---- elfutils-0.131.orig/backends/ia64_retval.c -+++ elfutils-0.131/backends/ia64_retval.c -@@ -31,10 +31,13 @@ - #include - - #define BACKEND ia64_ - #include "libebl_CPU.h" - -+#if defined(__GNUC_GNU_INLINE__) || defined(__GNUC_STDC_INLINE__) -+#define inline inline __attribute__ ((gnu_inline)) -+#endif - - /* r8, or pair r8, r9, or aggregate up to r8-r11. */ - static const Dwarf_Op loc_intreg[] = - { - { .atom = DW_OP_reg8 }, { .atom = DW_OP_piece, .number = 8 }, ---- elfutils-0.131.orig/libdw/libdw.h -+++ elfutils-0.131/libdw/libdw.h -@@ -62,11 +62,11 @@ - # define __nonnull_attribute__(args...) - # define __deprecated_attribute__ - #endif - - --#ifdef __GNUC_STDC_INLINE__ -+#if defined(__GNUC_GNU_INLINE__) || defined(__GNUC_STDC_INLINE__) - # define __libdw_extern_inline extern __inline __attribute__ ((__gnu_inline__)) - #else - # define __libdw_extern_inline extern __inline - #endif - ---- elfutils-0.131.orig/libdw/libdwP.h -+++ elfutils-0.131/libdw/libdwP.h -@@ -54,10 +54,13 @@ - #include - #include - - #include - -+#if defined(__GNUC_GNU_INLINE__) || defined(__GNUC_STDC_INLINE__) -+#define inline inline __attribute__ ((gnu_inline)) -+#endif - - /* gettext helper macros. */ - #define _(Str) dgettext ("elfutils", Str) - - ---- elfutils-0.131.orig/src/ld.h -+++ elfutils-0.131/src/ld.h -@@ -30,10 +30,13 @@ - #include - #include - #include - #include "xelf.h" - -+#if defined(__GNUC_GNU_INLINE__) || defined(__GNUC_STDC_INLINE__) -+#define inline inline __attribute__ ((gnu_inline)) -+#endif - - /* Recommended size of the buffer passed to ld_strerror. */ - #define ERRBUFSIZE (512) - - /* Character used to introduce version name after symbol. */ ---- elfutils-0.131.orig/src/strip.c -+++ elfutils-0.131/src/strip.c -@@ -50,10 +50,13 @@ - - #include - #include - #include - -+#if defined(__GNUC_GNU_INLINE__) || defined(__GNUC_STDC_INLINE__) -+#define inline inline __attribute__ ((gnu_inline)) -+#endif - - /* Name and version of program. */ - static void print_version (FILE *stream, struct argp_state *state); - void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version; - ---- elfutils-0.131.orig/src/unstrip.c -+++ elfutils-0.131/src/unstrip.c -@@ -60,10 +60,14 @@ - - #ifndef _ - # define _(str) gettext (str) - #endif - -+#if defined(__GNUC_GNU_INLINE__) || defined(__GNUC_STDC_INLINE__) -+#define inline inline __attribute__ ((gnu_inline)) -+#endif -+ - /* Name and version of program. */ - static void print_version (FILE *stream, struct argp_state *state); - void (*argp_program_version_hook) (FILE *, struct argp_state *) - = print_version; - diff --git a/meta/packages/elfutils/elfutils-0.131/prelink_build_fix.patch b/meta/packages/elfutils/elfutils-0.131/prelink_build_fix.patch deleted file mode 100644 index 3c3cf79d91..0000000000 --- a/meta/packages/elfutils/elfutils-0.131/prelink_build_fix.patch +++ /dev/null @@ -1,70 +0,0 @@ -newer prelink building (configure) fails like this - checking libelf.h usability... no - checking libelf.h presence... yes - configure: WARNING: libelf.h: present but cannot be compiled - -Found a bug report suggesting fix for the issue here: - http://bugs.gentoo.org/204502 -The bug report says: -------- Comment #7 From SpanKY 2008-01-06 04:53:16 0000 [reply] ------- -do `sed -i 's:off64_t:__off64_t:'` on libelf.h ... that lets me build prelink - -2010/06/24 -Signed-Off-By: Nitin A Kamble - -Index: elfutils-0.131/libelf/libelf.h -=================================================================== ---- elfutils-0.131.orig/libelf/libelf.h -+++ elfutils-0.131/libelf/libelf.h -@@ -95,7 +95,7 @@ typedef struct - Elf_Type d_type; /* Type of this piece of data. */ - unsigned int d_version; /* ELF version. */ - size_t d_size; /* Size in bytes. */ -- off64_t d_off; /* Offset into section. */ -+ __off64_t d_off; /* Offset into section. */ - size_t d_align; /* Alignment in section. */ - } Elf_Data; - -@@ -157,7 +157,7 @@ typedef struct - uid_t ar_uid; /* User ID. */ - gid_t ar_gid; /* Group ID. */ - mode_t ar_mode; /* File mode. */ -- off64_t ar_size; /* File size. */ -+ __off64_t ar_size; /* File size. */ - char *ar_rawname; /* Original name of archive member. */ - } Elf_Arhdr; - -@@ -198,13 +198,13 @@ extern Elf_Cmd elf_next (Elf *__elf); - extern int elf_end (Elf *__elf); - - /* Update ELF descriptor and write file to disk. */ --extern off64_t elf_update (Elf *__elf, Elf_Cmd __cmd); -+extern __off64_t elf_update (Elf *__elf, Elf_Cmd __cmd); - - /* Determine what kind of file is associated with ELF. */ - extern Elf_Kind elf_kind (Elf *__elf) __attribute__ ((__pure__)); - - /* Get the base offset for an object file. */ --extern off64_t elf_getbase (Elf *__elf); -+extern __off64_t elf_getbase (Elf *__elf); - - - /* Retrieve file identification data. */ -@@ -302,7 +302,7 @@ extern Elf_Data *elf_newdata (Elf_Scn *_ - would be for TYPE. The resulting Elf_Data pointer is valid until - elf_end (ELF) is called. */ - extern Elf_Data *elf_getdata_rawchunk (Elf *__elf, -- off64_t __offset, size_t __size, -+ __off64_t __offset, size_t __size, - Elf_Type __type); - - -@@ -314,7 +314,7 @@ extern char *elf_strptr (Elf *__elf, siz - extern Elf_Arhdr *elf_getarhdr (Elf *__elf); - - /* Return offset in archive for current file ELF. */ --extern off64_t elf_getaroff (Elf *__elf); -+extern __off64_t elf_getaroff (Elf *__elf); - - /* Select archive element at OFFSET. */ - extern size_t elf_rand (Elf *__elf, size_t __offset); diff --git a/meta/packages/elfutils/elfutils-0.131/warnings.patch b/meta/packages/elfutils/elfutils-0.131/warnings.patch deleted file mode 100644 index 132e3cf63c..0000000000 --- a/meta/packages/elfutils/elfutils-0.131/warnings.patch +++ /dev/null @@ -1,154 +0,0 @@ ---- - configure.ac | 4 ++++ - lib/Makefile.am | 2 +- - libasm/Makefile.am | 2 +- - libcpu/Makefile.am | 2 +- - libdw/Makefile.am | 2 +- - libebl/Makefile.am | 2 +- - libelf/Makefile.am | 2 +- - src/Makefile.am | 2 +- - tests/Makefile.am | 4 ++-- - 9 files changed, 13 insertions(+), 9 deletions(-) - ---- elfutils-0.131.orig/configure.ac -+++ elfutils-0.131/configure.ac -@@ -54,10 +54,14 @@ AC_DEFINE(USE_TLS)) - AH_TEMPLATE([USE_TLS], [Defined if thread local storage should be used.]) - - dnl Add all the languages for which translations are available. - ALL_LINGUAS= - -+if test X"$CFLAGS" = X; then -+ CFLAGS="-Wall -g -O2" -+fi -+ - AC_PROG_CC - AC_PROG_RANLIB - AC_PROG_YACC - AM_PROG_LEX - ---- elfutils-0.131.orig/lib/Makefile.am -+++ elfutils-0.131/lib/Makefile.am -@@ -28,11 +28,11 @@ DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H - if MUDFLAP - AM_CFLAGS = -fmudflap - else - AM_CFLAGS = - endif --AM_CFLAGS += -fpic -Wall -Wshadow -Werror -Wunused -Wextra $($(*F)_CFLAGS) -+AM_CFLAGS += -fpic -Wshadow -Wunused $($(*F)_CFLAGS) - INCLUDES = -I$(srcdir)/../libelf -I.. - - noinst_LIBRARIES = libeu.a - - libeu_a_SOURCES = xstrndup.c xmalloc.c next_prime.c \ ---- elfutils-0.131.orig/libasm/Makefile.am -+++ elfutils-0.131/libasm/Makefile.am -@@ -28,11 +28,11 @@ DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H - if MUDFLAP - AM_CFLAGS = -fmudflap - else - AM_CFLAGS = - endif --AM_CFLAGS += -std=gnu99 -Wall -Wshadow -Werror -Wunused -Wextra -Wformat=2 -+AM_CFLAGS += -std=gnu99 -Wall -Wshadow -Wunused -Wextra -Wformat=2 - INCLUDES = -I. -I$(srcdir) -I.. \ - -I$(top_srcdir)/libelf -I$(top_srcdir)/libebl -I$(top_srcdir)/libdw\ - -I$(top_srcdir)/lib - GCC_INCLUDE = -I$(shell $(CC) -print-file-name=include) - VERSION = 1 ---- elfutils-0.131.orig/libcpu/Makefile.am -+++ elfutils-0.131/libcpu/Makefile.am -@@ -23,11 +23,11 @@ - ## included package. Should you wish to participate in the Open Invention - ## Network licensing program, please visit www.openinventionnetwork.com - ## . - ## - DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H --AM_CFLAGS = -Wall -Wshadow -Werror -Wextra -Wformat=2 -Wunused -+AM_CFLAGS = -Wshadow -Wformat=2 -Wunused - INCLUDES = -I$(srcdir) - - noinst_LIBRARIES = libcpu_i386.a - - libcpu_i386_a_SOURCES = i386_dis.c ---- elfutils-0.131.orig/libdw/Makefile.am -+++ elfutils-0.131/libdw/Makefile.am -@@ -31,11 +31,11 @@ else - AM_CFLAGS = - endif - if BUILD_STATIC - AM_CFLAGS += -fpic - endif --AM_CFLAGS += -Wall -Werror -Wshadow -Wunused -Wformat=2 -Wextra -std=gnu99 -+AM_CFLAGS += -Wshadow -Wunused -Wformat=2 -std=gnu99 - INCLUDES = -I. -I$(srcdir) -I$(srcdir)/../libelf -I.. -I$(srcdir)/../lib - VERSION = 1 - - COMPILE.os = $(filter-out -fprofile-arcs, $(filter-out -ftest-coverage, \ - $(COMPILE))) ---- elfutils-0.131.orig/libebl/Makefile.am -+++ elfutils-0.131/libebl/Makefile.am -@@ -28,11 +28,11 @@ DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -DO - if MUDFLAP - AM_CFLAGS = -fmudflap - else - AM_CFLAGS = - endif --AM_CFLAGS += -fpic -Wall -Wshadow -Werror -Wunused -Wextra -Wformat=2 \ -+AM_CFLAGS += -fpic -Wshadow -Wunused -Wformat=2 \ - -std=gnu99 - - INCLUDES = -I$(srcdir) -I$(top_srcdir)/libelf -I$(top_srcdir)/libdw \ - -I$(top_srcdir)/lib -I.. - VERSION = 1 ---- elfutils-0.131.orig/libelf/Makefile.am -+++ elfutils-0.131/libelf/Makefile.am -@@ -31,11 +31,11 @@ else - AM_CFLAGS = - endif - if BUILD_STATIC - AM_CFLAGS += -fpic - endif --AM_CFLAGS += -Wall -Wshadow -Werror -Wunused -Wextra -Wformat=2 -std=gnu99 \ -+AM_CFLAGS += -Wshadow -Wunused -Wformat=2 -std=gnu99 \ - $($(*F)_CFLAGS) - INCLUDES = -I$(srcdir) -I$(top_srcdir)/lib -I.. - GCC_INCLUDE = -I$(shell $(CC) -print-file-name=include) - VERSION = 1 - PACKAGE_VERSION = @PACKAGE_VERSION@ ---- elfutils-0.131.orig/src/Makefile.am -+++ elfutils-0.131/src/Makefile.am -@@ -30,11 +30,11 @@ if MUDFLAP - AM_CFLAGS = -fmudflap - else - AM_CFLAGS = - endif - AM_CFLAGS += -Wall -Wshadow -std=gnu99 $(native_ld_cflags) \ -- $(if $($(*F)_no_Werror),,-Werror) \ -+ $(if $($(*F)_no_Werror),,) \ - $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \ - $(if $($(*F)_no_Wformat),,-Wformat=2) $(CFLAGS_$(*F)) - - INCLUDES = -I$(srcdir) -I$(srcdir)/../libelf -I$(srcdir)/../libebl \ - -I$(srcdir)/../libdw -I$(srcdir)/../libdwfl \ ---- elfutils-0.131.orig/tests/Makefile.am -+++ elfutils-0.131/tests/Makefile.am -@@ -24,15 +24,15 @@ - ## Network licensing program, please visit www.openinventionnetwork.com - ## . - ## - DEFS = -DHAVE_CONFIG_H -D_GNU_SOURCE - if MUDFLAP --AM_CFLAGS = -Wall -Werror -Wextra -std=gnu99 -fmudflap\ -+AM_CFLAGS = -Wall -Wextra -std=gnu99 -fmudflap\ - $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2) - BUILD_RPATH = \$$ORIGIN/../backends - else --AM_CFLAGS = -Wall -Werror -Wextra -std=gnu99 \ -+AM_CFLAGS = -Wall -Wextra -std=gnu99 \ - $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2) - BUILT_RPATH = \$$ORIGIN/../libasm:\$$ORIGIN/../libdw:\$$ORIGIN/../backends:\$$ORIGIN/../libelf - endif - - AM_LDFLAGS = diff --git a/meta/packages/elfutils/elfutils-0.148/arm_backend.diff b/meta/packages/elfutils/elfutils-0.148/arm_backend.diff new file mode 100644 index 0000000000..a309d1ba1d --- /dev/null +++ b/meta/packages/elfutils/elfutils-0.148/arm_backend.diff @@ -0,0 +1,447 @@ +Index: elfutils-0.146/backends/arm_init.c +=================================================================== +--- elfutils-0.146.orig/backends/arm_init.c 2009-04-21 14:50:01.000000000 +0000 ++++ elfutils-0.146/backends/arm_init.c 2010-04-24 10:11:13.000000000 +0000 +@@ -32,21 +32,32 @@ + #define RELOC_PREFIX R_ARM_ + #include "libebl_CPU.h" + ++#include "libebl_arm.h" ++ + /* This defines the common reloc hooks based on arm_reloc.def. */ + #include "common-reloc.c" + + + const char * + arm_init (elf, machine, eh, ehlen) +- Elf *elf __attribute__ ((unused)); ++ Elf *elf; + GElf_Half machine __attribute__ ((unused)); + Ebl *eh; + size_t ehlen; + { ++ int soft_float = 0; ++ + /* Check whether the Elf_BH object has a sufficent size. */ + if (ehlen < sizeof (Ebl)) + return NULL; + ++ if (elf) { ++ GElf_Ehdr ehdr_mem; ++ GElf_Ehdr *ehdr = gelf_getehdr (elf, &ehdr_mem); ++ if (ehdr && (ehdr->e_flags & EF_ARM_SOFT_FLOAT)) ++ soft_float = 1; ++ } ++ + /* We handle it. */ + eh->name = "ARM"; + arm_init_reloc (eh); +@@ -58,7 +69,10 @@ + HOOK (eh, core_note); + HOOK (eh, auxv_info); + HOOK (eh, check_object_attribute); +- HOOK (eh, return_value_location); ++ if (soft_float) ++ eh->return_value_location = arm_return_value_location_soft; ++ else ++ eh->return_value_location = arm_return_value_location_hard; + + return MODVERSION; + } +Index: elfutils-0.146/backends/arm_regs.c +=================================================================== +--- elfutils-0.146.orig/backends/arm_regs.c 2009-04-21 14:50:01.000000000 +0000 ++++ elfutils-0.146/backends/arm_regs.c 2010-04-24 10:11:13.000000000 +0000 +@@ -28,6 +28,7 @@ + #endif + + #include ++#include + #include + + #define BACKEND arm_ +@@ -58,7 +59,15 @@ + namelen = 2; + break; + +- case 10 ... 12: ++ case 10 ... 11: ++ name[0] = 'r'; ++ name[1] = '1'; ++ name[2] = regno % 10 + '0'; ++ namelen = 3; ++ break; ++ ++ case 12: ++ *type = DW_ATE_unsigned; + name[0] = 'r'; + name[1] = '1'; + name[2] = regno % 10 + '0'; +@@ -73,6 +82,9 @@ + break; + + case 16 + 0 ... 16 + 7: ++ /* AADWARF says that there are no registers in that range, ++ * but gcc maps FPA registers here ++ */ + regno += 96 - 16; + /* Fall through. */ + case 96 + 0 ... 96 + 7: +@@ -84,11 +96,139 @@ + namelen = 2; + break; + ++ case 64 + 0 ... 64 + 9: ++ *setname = "VFP"; ++ *bits = 32; ++ *type = DW_ATE_float; ++ name[0] = 's'; ++ name[1] = regno - 64 + '0'; ++ namelen = 2; ++ break; ++ ++ case 64 + 10 ... 64 + 31: ++ *setname = "VFP"; ++ *bits = 32; ++ *type = DW_ATE_float; ++ name[0] = 's'; ++ name[1] = (regno - 64) / 10 + '0'; ++ name[2] = (regno - 64) % 10 + '0'; ++ namelen = 3; ++ break; ++ ++ case 104 + 0 ... 104 + 7: ++ /* XXX TODO: ++ * This can be either intel wireless MMX general purpose/control ++ * registers or xscale accumulator, which have different usage. ++ * We only have the intel wireless MMX here now. ++ * The name needs to be changed for the xscale accumulator too. */ ++ *setname = "MMX"; ++ *type = DW_ATE_unsigned; ++ *bits = 32; ++ memcpy(name, "wcgr", 4); ++ name[4] = regno - 104 + '0'; ++ namelen = 5; ++ break; ++ ++ case 112 + 0 ... 112 + 9: ++ *setname = "MMX"; ++ *type = DW_ATE_unsigned; ++ *bits = 64; ++ name[0] = 'w'; ++ name[1] = 'r'; ++ name[2] = regno - 112 + '0'; ++ namelen = 3; ++ break; ++ ++ case 112 + 10 ... 112 + 15: ++ *setname = "MMX"; ++ *type = DW_ATE_unsigned; ++ *bits = 64; ++ name[0] = 'w'; ++ name[1] = 'r'; ++ name[2] = '1'; ++ name[3] = regno - 112 - 10 + '0'; ++ namelen = 4; ++ break; ++ + case 128: ++ *setname = "special"; + *type = DW_ATE_unsigned; + return stpcpy (name, "spsr") + 1 - name; + ++ case 129: ++ *setname = "special"; ++ *type = DW_ATE_unsigned; ++ return stpcpy(name, "spsr_fiq") + 1 - name; ++ ++ case 130: ++ *setname = "special"; ++ *type = DW_ATE_unsigned; ++ return stpcpy(name, "spsr_irq") + 1 - name; ++ ++ case 131: ++ *setname = "special"; ++ *type = DW_ATE_unsigned; ++ return stpcpy(name, "spsr_abt") + 1 - name; ++ ++ case 132: ++ *setname = "special"; ++ *type = DW_ATE_unsigned; ++ return stpcpy(name, "spsr_und") + 1 - name; ++ ++ case 133: ++ *setname = "special"; ++ *type = DW_ATE_unsigned; ++ return stpcpy(name, "spsr_svc") + 1 - name; ++ ++ case 144 ... 150: ++ *setname = "integer"; ++ *type = DW_ATE_signed; ++ *bits = 32; ++ return sprintf(name, "r%d_usr", regno - 144 + 8) + 1; ++ ++ case 151 ... 157: ++ *setname = "integer"; ++ *type = DW_ATE_signed; ++ *bits = 32; ++ return sprintf(name, "r%d_fiq", regno - 151 + 8) + 1; ++ ++ case 158 ... 159: ++ *setname = "integer"; ++ *type = DW_ATE_signed; ++ *bits = 32; ++ return sprintf(name, "r%d_irq", regno - 158 + 13) + 1; ++ ++ case 160 ... 161: ++ *setname = "integer"; ++ *type = DW_ATE_signed; ++ *bits = 32; ++ return sprintf(name, "r%d_abt", regno - 160 + 13) + 1; ++ ++ case 162 ... 163: ++ *setname = "integer"; ++ *type = DW_ATE_signed; ++ *bits = 32; ++ return sprintf(name, "r%d_und", regno - 162 + 13) + 1; ++ ++ case 164 ... 165: ++ *setname = "integer"; ++ *type = DW_ATE_signed; ++ *bits = 32; ++ return sprintf(name, "r%d_svc", regno - 164 + 13) + 1; ++ ++ case 192 ... 199: ++ *setname = "MMX"; ++ *bits = 32; ++ *type = DW_ATE_unsigned; ++ name[0] = 'w'; ++ name[1] = 'c'; ++ name[2] = regno - 192 + '0'; ++ namelen = 3; ++ break; ++ + case 256 + 0 ... 256 + 9: ++ /* XXX TODO: Neon also uses those registers and can contain ++ * both float and integers */ + *setname = "VFP"; + *type = DW_ATE_float; + *bits = 64; +Index: elfutils-0.146/backends/arm_retval.c +=================================================================== +--- elfutils-0.146.orig/backends/arm_retval.c 2010-01-12 16:57:54.000000000 +0000 ++++ elfutils-0.146/backends/arm_retval.c 2010-04-24 10:11:13.000000000 +0000 +@@ -45,6 +45,13 @@ + #define nloc_intreg 1 + #define nloc_intregs(n) (2 * (n)) + ++/* f1 */ /* XXX TODO: f0 can also have number 96 if program was compiled with -mabi=aapcs */ ++static const Dwarf_Op loc_fpreg[] = ++ { ++ { .atom = DW_OP_reg16 }, ++ }; ++#define nloc_fpreg 1 ++ + /* The return value is a structure and is actually stored in stack space + passed in a hidden argument by the caller. But, the compiler + helpfully returns the address of that space in r0. */ +@@ -55,8 +62,9 @@ + #define nloc_aggregate 1 + + +-int +-arm_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp) ++static int ++arm_return_value_location_ (Dwarf_Die *functypedie, const Dwarf_Op **locp, ++ int soft_float) + { + /* Start with the function's type, and get the DW_AT_type attribute, + which is the type of the return value. */ +@@ -109,14 +117,31 @@ + else + return -1; + } ++ if (tag == DW_TAG_base_type) ++ { ++ Dwarf_Word encoding; ++ if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_encoding, ++ &attr_mem), &encoding) != 0) ++ return -1; ++ ++ if ((encoding == DW_ATE_float) && !soft_float) ++ { ++ *locp = loc_fpreg; ++ if (size <= 8) ++ return nloc_fpreg; ++ goto aggregate; ++ } ++ } + if (size <= 16) + { + intreg: + *locp = loc_intreg; + return size <= 4 ? nloc_intreg : nloc_intregs ((size + 3) / 4); + } ++ /* fall through. */ + + aggregate: ++ /* XXX TODO sometimes aggregates are returned in r0 (-mabi=aapcs) */ + *locp = loc_aggregate; + return nloc_aggregate; + +@@ -135,3 +160,18 @@ + DWARF and might be valid. */ + return -2; + } ++ ++/* return location for -mabi=apcs-gnu -msoft-float */ ++int ++arm_return_value_location_soft (Dwarf_Die *functypedie, const Dwarf_Op **locp) ++{ ++ return arm_return_value_location_ (functypedie, locp, 1); ++} ++ ++/* return location for -mabi=apcs-gnu -mhard-float (current default) */ ++int ++arm_return_value_location_hard (Dwarf_Die *functypedie, const Dwarf_Op **locp) ++{ ++ return arm_return_value_location_ (functypedie, locp, 0); ++} ++ +Index: elfutils-0.146/libelf/elf.h +=================================================================== +--- elfutils-0.146.orig/libelf/elf.h 2010-04-24 10:11:11.000000000 +0000 ++++ elfutils-0.146/libelf/elf.h 2010-04-24 10:11:13.000000000 +0000 +@@ -2290,6 +2290,9 @@ + #define EF_ARM_EABI_VER4 0x04000000 + #define EF_ARM_EABI_VER5 0x05000000 + ++/* EI_OSABI values */ ++#define ELFOSABI_ARM_AEABI 64 /* Contains symbol versioning. */ ++ + /* Additional symbol types for Thumb. */ + #define STT_ARM_TFUNC STT_LOPROC /* A Thumb function. */ + #define STT_ARM_16BIT STT_HIPROC /* A Thumb label. */ +@@ -2307,12 +2310,19 @@ + + /* Processor specific values for the Phdr p_type field. */ + #define PT_ARM_EXIDX (PT_LOPROC + 1) /* ARM unwind segment. */ ++#define PT_ARM_UNWIND PT_ARM_EXIDX + + /* Processor specific values for the Shdr sh_type field. */ + #define SHT_ARM_EXIDX (SHT_LOPROC + 1) /* ARM unwind section. */ + #define SHT_ARM_PREEMPTMAP (SHT_LOPROC + 2) /* Preemption details. */ + #define SHT_ARM_ATTRIBUTES (SHT_LOPROC + 3) /* ARM attributes section. */ + ++/* Processor specific values for the Dyn d_tag field. */ ++#define DT_ARM_RESERVED1 (DT_LOPROC + 0) ++#define DT_ARM_SYMTABSZ (DT_LOPROC + 1) ++#define DT_ARM_PREEMTMAB (DT_LOPROC + 2) ++#define DT_ARM_RESERVED2 (DT_LOPROC + 3) ++#define DT_ARM_NUM 4 + + /* ARM relocs. */ + +@@ -2344,12 +2354,75 @@ + #define R_ARM_GOTPC 25 /* 32 bit PC relative offset to GOT */ + #define R_ARM_GOT32 26 /* 32 bit GOT entry */ + #define R_ARM_PLT32 27 /* 32 bit PLT address */ ++#define R_ARM_CALL 28 ++#define R_ARM_JUMP24 29 ++#define R_ARM_THM_JUMP24 30 ++#define R_ARM_BASE_ABS 31 + #define R_ARM_ALU_PCREL_7_0 32 + #define R_ARM_ALU_PCREL_15_8 33 + #define R_ARM_ALU_PCREL_23_15 34 + #define R_ARM_LDR_SBREL_11_0 35 + #define R_ARM_ALU_SBREL_19_12 36 + #define R_ARM_ALU_SBREL_27_20 37 ++#define R_ARM_TARGET1 38 ++#define R_ARM_SBREL31 39 ++#define R_ARM_V4BX 40 ++#define R_ARM_TARGET2 41 ++#define R_ARM_PREL31 42 ++#define R_ARM_MOVW_ABS_NC 43 ++#define R_ARM_MOVT_ABS 44 ++#define R_ARM_MOVW_PREL_NC 45 ++#define R_ARM_MOVT_PREL 46 ++#define R_ARM_THM_MOVW_ABS_NC 47 ++#define R_ARM_THM_MOVT_ABS 48 ++#define R_ARM_THM_MOVW_PREL_NC 49 ++#define R_ARM_THM_MOVT_PREL 50 ++#define R_ARM_THM_JUMP19 51 ++#define R_ARM_THM_JUMP6 52 ++#define R_ARM_THM_ALU_PREL_11_0 53 ++#define R_ARM_THM_PC12 54 ++#define R_ARM_ABS32_NOI 55 ++#define R_ARM_REL32_NOI 56 ++#define R_ARM_ALU_PC_G0_NC 57 ++#define R_ARM_ALU_PC_G0 58 ++#define R_ARM_ALU_PC_G1_NC 59 ++#define R_ARM_ALU_PC_G1 60 ++#define R_ARM_ALU_PC_G2 61 ++#define R_ARM_LDR_PC_G1 62 ++#define R_ARM_LDR_PC_G2 63 ++#define R_ARM_LDRS_PC_G0 64 ++#define R_ARM_LDRS_PC_G1 65 ++#define R_ARM_LDRS_PC_G2 66 ++#define R_ARM_LDC_PC_G0 67 ++#define R_ARM_LDC_PC_G1 68 ++#define R_ARM_LDC_PC_G2 69 ++#define R_ARM_ALU_SB_G0_NC 70 ++#define R_ARM_ALU_SB_G0 71 ++#define R_ARM_ALU_SB_G1_NC 72 ++#define R_ARM_ALU_SB_G1 73 ++#define R_ARM_ALU_SB_G2 74 ++#define R_ARM_LDR_SB_G0 75 ++#define R_ARM_LDR_SB_G1 76 ++#define R_ARM_LDR_SB_G2 77 ++#define R_ARM_LDRS_SB_G0 78 ++#define R_ARM_LDRS_SB_G1 79 ++#define R_ARM_LDRS_SB_G2 80 ++#define R_ARM_LDC_G0 81 ++#define R_ARM_LDC_G1 82 ++#define R_ARM_LDC_G2 83 ++#define R_ARM_MOVW_BREL_NC 84 ++#define R_ARM_MOVT_BREL 85 ++#define R_ARM_MOVW_BREL 86 ++#define R_ARM_THM_MOVW_BREL_NC 87 ++#define R_ARM_THM_MOVT_BREL 88 ++#define R_ARM_THM_MOVW_BREL 89 ++/* 90-93 unallocated */ ++#define R_ARM_PLT32_ABS 94 ++#define R_ARM_GOT_ABS 95 ++#define R_ARM_GOT_PREL 96 ++#define R_ARM_GOT_BREL12 97 ++#define R_ARM_GOTOFF12 98 ++#define R_ARM_GOTRELAX 99 + #define R_ARM_GNU_VTENTRY 100 + #define R_ARM_GNU_VTINHERIT 101 + #define R_ARM_THM_PC11 102 /* thumb unconditional branch */ +@@ -2364,6 +2437,12 @@ + static TLS block offset */ + #define R_ARM_TLS_LE32 108 /* 32 bit offset relative to static + TLS block */ ++#define R_ARM_TLS_LDO12 109 ++#define R_ARM_TLS_LE12 110 ++#define R_ARM_TLS_IE12GP 111 ++/* 112 - 127 private range */ ++#define R_ARM_ME_TOO 128 /* obsolete */ ++ + #define R_ARM_RXPC25 249 + #define R_ARM_RSBREL32 250 + #define R_ARM_THM_RPC22 251 +Index: elfutils-0.146/backends/libebl_arm.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ elfutils-0.146/backends/libebl_arm.h 2010-04-24 10:11:13.000000000 +0000 +@@ -0,0 +1,9 @@ ++#ifndef _LIBEBL_ARM_H ++#define _LIBEBL_ARM_H 1 ++ ++#include ++ ++extern int arm_return_value_location_soft(Dwarf_Die *, const Dwarf_Op **locp); ++extern int arm_return_value_location_hard(Dwarf_Die *, const Dwarf_Op **locp); ++ ++#endif diff --git a/meta/packages/elfutils/elfutils-0.148/do-autoreconf.diff b/meta/packages/elfutils/elfutils-0.148/do-autoreconf.diff new file mode 100644 index 0000000000..41afa5ef36 --- /dev/null +++ b/meta/packages/elfutils/elfutils-0.148/do-autoreconf.diff @@ -0,0 +1,337 @@ +Generated by copying the whole dir, running `sh debian/autogen.sh` and diffing. + +Index: elfutils-0.148/backends/Makefile.in +=================================================================== +--- elfutils-0.148.orig/backends/Makefile.in 2010-07-03 13:07:10.000000000 +0000 ++++ elfutils-0.148/backends/Makefile.in 2010-07-03 13:13:52.000000000 +0000 +@@ -77,39 +77,54 @@ + am__objects_4 = ia64_init.$(OBJEXT) ia64_symbol.$(OBJEXT) \ + ia64_regs.$(OBJEXT) ia64_retval.$(OBJEXT) + libebl_ia64_pic_a_OBJECTS = $(am_libebl_ia64_pic_a_OBJECTS) ++libebl_m68k_pic_a_AR = $(AR) $(ARFLAGS) ++libebl_m68k_pic_a_LIBADD = ++am__objects_5 = m68k_init.$(OBJEXT) m68k_symbol.$(OBJEXT) \ ++ m68k_regs.$(OBJEXT) ++libebl_m68k_pic_a_OBJECTS = $(am_libebl_m68k_pic_a_OBJECTS) ++libebl_mips_pic_a_AR = $(AR) $(ARFLAGS) ++libebl_mips_pic_a_LIBADD = ++am__objects_6 = mips_init.$(OBJEXT) mips_symbol.$(OBJEXT) \ ++ mips_regs.$(OBJEXT) mips_retval.$(OBJEXT) ++libebl_mips_pic_a_OBJECTS = $(am_libebl_mips_pic_a_OBJECTS) ++libebl_parisc_pic_a_AR = $(AR) $(ARFLAGS) ++libebl_parisc_pic_a_LIBADD = ++am__objects_7 = parisc_init.$(OBJEXT) parisc_symbol.$(OBJEXT) \ ++ parisc_regs.$(OBJEXT) parisc_retval.$(OBJEXT) ++libebl_parisc_pic_a_OBJECTS = $(am_libebl_parisc_pic_a_OBJECTS) + libebl_ppc64_pic_a_AR = $(AR) $(ARFLAGS) + libebl_ppc64_pic_a_LIBADD = +-am__objects_5 = ppc64_init.$(OBJEXT) ppc64_symbol.$(OBJEXT) \ ++am__objects_8 = ppc64_init.$(OBJEXT) ppc64_symbol.$(OBJEXT) \ + ppc64_retval.$(OBJEXT) ppc64_corenote.$(OBJEXT) \ + ppc_regs.$(OBJEXT) ppc_auxv.$(OBJEXT) ppc_attrs.$(OBJEXT) \ + ppc_syscall.$(OBJEXT) + libebl_ppc64_pic_a_OBJECTS = $(am_libebl_ppc64_pic_a_OBJECTS) + libebl_ppc_pic_a_AR = $(AR) $(ARFLAGS) + libebl_ppc_pic_a_LIBADD = +-am__objects_6 = ppc_init.$(OBJEXT) ppc_symbol.$(OBJEXT) \ ++am__objects_9 = ppc_init.$(OBJEXT) ppc_symbol.$(OBJEXT) \ + ppc_retval.$(OBJEXT) ppc_regs.$(OBJEXT) ppc_corenote.$(OBJEXT) \ + ppc_auxv.$(OBJEXT) ppc_attrs.$(OBJEXT) ppc_syscall.$(OBJEXT) + libebl_ppc_pic_a_OBJECTS = $(am_libebl_ppc_pic_a_OBJECTS) + libebl_s390_pic_a_AR = $(AR) $(ARFLAGS) + libebl_s390_pic_a_LIBADD = +-am__objects_7 = s390_init.$(OBJEXT) s390_symbol.$(OBJEXT) \ ++am__objects_10 = s390_init.$(OBJEXT) s390_symbol.$(OBJEXT) \ + s390_regs.$(OBJEXT) s390_retval.$(OBJEXT) + libebl_s390_pic_a_OBJECTS = $(am_libebl_s390_pic_a_OBJECTS) + libebl_sh_pic_a_AR = $(AR) $(ARFLAGS) + libebl_sh_pic_a_LIBADD = +-am__objects_8 = sh_init.$(OBJEXT) sh_symbol.$(OBJEXT) \ ++am__objects_11 = sh_init.$(OBJEXT) sh_symbol.$(OBJEXT) \ + sh_corenote.$(OBJEXT) sh_regs.$(OBJEXT) sh_retval.$(OBJEXT) + libebl_sh_pic_a_OBJECTS = $(am_libebl_sh_pic_a_OBJECTS) + libebl_sparc_pic_a_AR = $(AR) $(ARFLAGS) + libebl_sparc_pic_a_LIBADD = +-am__objects_9 = sparc_init.$(OBJEXT) sparc_symbol.$(OBJEXT) \ ++am__objects_12 = sparc_init.$(OBJEXT) sparc_symbol.$(OBJEXT) \ + sparc_regs.$(OBJEXT) sparc_retval.$(OBJEXT) \ + sparc_corenote.$(OBJEXT) sparc64_corenote.$(OBJEXT) \ + sparc_auxv.$(OBJEXT) + libebl_sparc_pic_a_OBJECTS = $(am_libebl_sparc_pic_a_OBJECTS) + libebl_x86_64_pic_a_AR = $(AR) $(ARFLAGS) + libebl_x86_64_pic_a_LIBADD = +-am__objects_10 = x86_64_init.$(OBJEXT) x86_64_symbol.$(OBJEXT) \ ++am__objects_13 = x86_64_init.$(OBJEXT) x86_64_symbol.$(OBJEXT) \ + x86_64_corenote.$(OBJEXT) x86_64_cfi.$(OBJEXT) \ + x86_64_retval.$(OBJEXT) x86_64_regs.$(OBJEXT) \ + i386_auxv.$(OBJEXT) x86_64_syscall.$(OBJEXT) +@@ -124,15 +139,18 @@ + LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ + SOURCES = $(libebl_alpha_pic_a_SOURCES) $(libebl_arm_pic_a_SOURCES) \ + $(libebl_i386_pic_a_SOURCES) $(libebl_ia64_pic_a_SOURCES) \ +- $(libebl_ppc64_pic_a_SOURCES) $(libebl_ppc_pic_a_SOURCES) \ +- $(libebl_s390_pic_a_SOURCES) $(libebl_sh_pic_a_SOURCES) \ +- $(libebl_sparc_pic_a_SOURCES) $(libebl_x86_64_pic_a_SOURCES) +-DIST_SOURCES = $(libebl_alpha_pic_a_SOURCES) \ +- $(libebl_arm_pic_a_SOURCES) $(libebl_i386_pic_a_SOURCES) \ +- $(libebl_ia64_pic_a_SOURCES) $(libebl_ppc64_pic_a_SOURCES) \ ++ $(libebl_m68k_pic_a_SOURCES) $(libebl_mips_pic_a_SOURCES) \ ++ $(libebl_parisc_pic_a_SOURCES) $(libebl_ppc64_pic_a_SOURCES) \ + $(libebl_ppc_pic_a_SOURCES) $(libebl_s390_pic_a_SOURCES) \ + $(libebl_sh_pic_a_SOURCES) $(libebl_sparc_pic_a_SOURCES) \ + $(libebl_x86_64_pic_a_SOURCES) ++DIST_SOURCES = $(libebl_alpha_pic_a_SOURCES) \ ++ $(libebl_arm_pic_a_SOURCES) $(libebl_i386_pic_a_SOURCES) \ ++ $(libebl_ia64_pic_a_SOURCES) $(libebl_m68k_pic_a_SOURCES) \ ++ $(libebl_mips_pic_a_SOURCES) $(libebl_parisc_pic_a_SOURCES) \ ++ $(libebl_ppc64_pic_a_SOURCES) $(libebl_ppc_pic_a_SOURCES) \ ++ $(libebl_s390_pic_a_SOURCES) $(libebl_sh_pic_a_SOURCES) \ ++ $(libebl_sparc_pic_a_SOURCES) $(libebl_x86_64_pic_a_SOURCES) + DATA = $(noinst_DATA) + HEADERS = $(noinst_HEADERS) + ETAGS = etags +@@ -270,11 +288,12 @@ + CLEANFILES = *.gcno *.gcda $(foreach m,$(modules), libebl_$(m).map \ + libebl_$(m).so $(am_libebl_$(m)_pic_a_OBJECTS)) + textrel_check = if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi +-modules = i386 sh x86_64 ia64 alpha arm sparc ppc ppc64 s390 ++modules = i386 sh x86_64 ia64 alpha arm sparc ppc ppc64 s390 parisc mips m68k + libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a \ + libebl_ia64_pic.a libebl_alpha_pic.a libebl_arm_pic.a \ + libebl_sparc_pic.a libebl_ppc_pic.a libebl_ppc64_pic.a \ +- libebl_s390_pic.a ++ libebl_s390_pic.a libebl_parisc_pic.a libebl_mips_pic.a \ ++ libebl_m68k_pic.a + + noinst_LIBRARIES = $(libebl_pic) + noinst_DATA = $(libebl_pic:_pic.a=.so) +@@ -328,6 +347,15 @@ + s390_SRCS = s390_init.c s390_symbol.c s390_regs.c s390_retval.c + libebl_s390_pic_a_SOURCES = $(s390_SRCS) + am_libebl_s390_pic_a_OBJECTS = $(s390_SRCS:.c=.os) ++parisc_SRCS = parisc_init.c parisc_symbol.c parisc_regs.c parisc_retval.c ++libebl_parisc_pic_a_SOURCES = $(parisc_SRCS) ++am_libebl_parisc_pic_a_OBJECTS = $(parisc_SRCS:.c=.os) ++mips_SRCS = mips_init.c mips_symbol.c mips_regs.c mips_retval.c ++libebl_mips_pic_a_SOURCES = $(mips_SRCS) ++am_libebl_mips_pic_a_OBJECTS = $(mips_SRCS:.c=.os) ++m68k_SRCS = m68k_init.c m68k_symbol.c m68k_regs.c ++libebl_m68k_pic_a_SOURCES = $(m68k_SRCS) ++am_libebl_m68k_pic_a_OBJECTS = $(m68k_SRCS:.c=.os) + noinst_HEADERS = libebl_CPU.h common-reloc.c linux-core-note.c x86_corenote.c + EXTRA_DIST = $(foreach m,$(modules),$($(m)_SRCS)) $(modules:=_reloc.def) + all: all-am +@@ -383,6 +411,18 @@ + -rm -f libebl_ia64_pic.a + $(libebl_ia64_pic_a_AR) libebl_ia64_pic.a $(libebl_ia64_pic_a_OBJECTS) $(libebl_ia64_pic_a_LIBADD) + $(RANLIB) libebl_ia64_pic.a ++libebl_m68k_pic.a: $(libebl_m68k_pic_a_OBJECTS) $(libebl_m68k_pic_a_DEPENDENCIES) ++ -rm -f libebl_m68k_pic.a ++ $(libebl_m68k_pic_a_AR) libebl_m68k_pic.a $(libebl_m68k_pic_a_OBJECTS) $(libebl_m68k_pic_a_LIBADD) ++ $(RANLIB) libebl_m68k_pic.a ++libebl_mips_pic.a: $(libebl_mips_pic_a_OBJECTS) $(libebl_mips_pic_a_DEPENDENCIES) ++ -rm -f libebl_mips_pic.a ++ $(libebl_mips_pic_a_AR) libebl_mips_pic.a $(libebl_mips_pic_a_OBJECTS) $(libebl_mips_pic_a_LIBADD) ++ $(RANLIB) libebl_mips_pic.a ++libebl_parisc_pic.a: $(libebl_parisc_pic_a_OBJECTS) $(libebl_parisc_pic_a_DEPENDENCIES) ++ -rm -f libebl_parisc_pic.a ++ $(libebl_parisc_pic_a_AR) libebl_parisc_pic.a $(libebl_parisc_pic_a_OBJECTS) $(libebl_parisc_pic_a_LIBADD) ++ $(RANLIB) libebl_parisc_pic.a + libebl_ppc64_pic.a: $(libebl_ppc64_pic_a_OBJECTS) $(libebl_ppc64_pic_a_DEPENDENCIES) + -rm -f libebl_ppc64_pic.a + $(libebl_ppc64_pic_a_AR) libebl_ppc64_pic.a $(libebl_ppc64_pic_a_OBJECTS) $(libebl_ppc64_pic_a_LIBADD) +@@ -439,6 +479,17 @@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ia64_regs.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ia64_retval.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ia64_symbol.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/m68k_init.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/m68k_regs.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/m68k_symbol.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mips_init.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mips_regs.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mips_retval.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mips_symbol.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parisc_init.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parisc_regs.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parisc_retval.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parisc_symbol.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppc64_corenote.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppc64_init.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppc64_retval.Po@am__quote@ +Index: elfutils-0.148/configure +=================================================================== +--- elfutils-0.148.orig/configure 2010-07-03 13:06:16.000000000 +0000 ++++ elfutils-0.148/configure 2010-07-03 13:13:49.000000000 +0000 +@@ -602,6 +602,8 @@ + base_cpu + NATIVE_LD_FALSE + NATIVE_LD_TRUE ++LD_AS_NEEDED ++WEXTRA + LEXLIB + LEX_OUTPUT_ROOT + LEX +@@ -3852,6 +3854,130 @@ + as_fn_error "gcc with C99 support required" "$LINENO" 5 + fi + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra option to $CC" >&5 ++$as_echo_n "checking for -Wextra option to $CC... " >&6; } ++if test "${ac_cv_cc_wextra+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ old_CFLAGS="$CFLAGS" ++CFLAGS="$CFLAGS -Wextra" ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++void foo (void) { } ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ ac_cv_cc_wextra=yes ++else ++ ac_cv_cc_wextra=no ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++CFLAGS="$old_CFLAGS" ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_wextra" >&5 ++$as_echo "$ac_cv_cc_wextra" >&6; } ++ ++if test "x$ac_cv_cc_wextra" = xyes; then : ++ WEXTRA=-Wextra ++else ++ WEXTRA=-W ++fi ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fgnu89-inline option to $CC" >&5 ++$as_echo_n "checking for -fgnu89-inline option to $CC... " >&6; } ++if test "${ac_cv_cc_gnu89_inline+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ old_CFLAGS="$CFLAGS" ++CFLAGS="$CFLAGS -fgnu89-inline -Werror" ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++void foo (void) ++{ ++ inline void bar (void) {} ++ bar (); ++} ++extern inline void baz (void) {} ++ ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ ac_cv_cc_gnu89_inline=yes ++else ++ ac_cv_cc_gnu89_inline=no ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++CFLAGS="$old_CFLAGS" ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_gnu89_inline" >&5 ++$as_echo "$ac_cv_cc_gnu89_inline" >&6; } ++if test "x$ac_cv_cc_gnu89_inline" = xyes; then : ++ WEXTRA="${WEXTRA:+$WEXTRA }-fgnu89-inline" ++fi ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --as-needed linker option" >&5 ++$as_echo_n "checking for --as-needed linker option... " >&6; } ++if test "${ac_cv_as_needed+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat > conftest.c <&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; } ++then ++ ac_cv_as_needed=yes ++else ++ ac_cv_as_needed=no ++fi ++rm -f conftest* ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_as_needed" >&5 ++$as_echo "$ac_cv_as_needed" >&6; } ++if test "x$ac_cv_as_needed" = xyes; then : ++ LD_AS_NEEDED=-Wl,--as-needed ++else ++ LD_AS_NEEDED= ++fi ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_popcount" >&5 ++$as_echo_n "checking for __builtin_popcount... " >&6; } ++if test "${ac_cv_popcount+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++int ++main () ++{ ++exit (__builtin_popcount (127)); ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_popcount=yes ++else ++ ac_cv_popcount=no ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_popcount" >&5 ++$as_echo "$ac_cv_popcount" >&6; } ++if test "x$ac_cv_popcount" = xyes; then : ++ ++$as_echo "#define HAVE_BUILTIN_POPCOUNT 1" >>confdefs.h ++ ++fi ++ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __thread support" >&5 + $as_echo_n "checking for __thread support... " >&6; } + if test "${ac_cv_tls+set}" = set; then : +@@ -3888,7 +4014,13 @@ + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tls" >&5 + $as_echo "$ac_cv_tls" >&6; } + if test "x$ac_cv_tls" != xyes; then : +- as_fn_error "__thread support required" "$LINENO" 5 ++ if test "$use_locks" = yes; then : ++ as_fn_error "--enable-thread-safety requires __thread support" "$LINENO" 5 ++else ++ ++$as_echo "#define __thread /* empty: no multi-thread support */" >>confdefs.h ++ ++fi + fi + + # Check whether --enable-largefile was given. +@@ -4874,7 +5006,7 @@ + + # 1.234 -> 1234 + case "$PACKAGE_VERSION" in +-[0-9].*) eu_version="${PACKAGE_VERSION/./}" ;; ++[0-9].*) eu_version=`echo "$PACKAGE_VERSION" | sed 's@\.@@'` ;; + *) as_fn_error "confused by version number '$PACKAGE_VERSION'" "$LINENO" 5 ;; + esac + case "$eu_version" in +@@ -4903,7 +5035,7 @@ + esac + + # Round up to the next release API (x.y) version. +-eu_version=$[($eu_version + 999) / 1000] ++eu_version=`expr \( $eu_version + 999 \) / 1000` + + cat >confcache <<\_ACEOF + # This file is a shell script that caches the results of configure diff --git a/meta/packages/elfutils/elfutils-0.148/elf_additions.diff b/meta/packages/elfutils/elfutils-0.148/elf_additions.diff new file mode 100644 index 0000000000..59a082b6cf --- /dev/null +++ b/meta/packages/elfutils/elfutils-0.148/elf_additions.diff @@ -0,0 +1,69 @@ +Index: elfutils-0.146/libelf/elf.h +=================================================================== +--- elfutils-0.146.orig/libelf/elf.h 2010-04-24 10:13:50.000000000 +0000 ++++ elfutils-0.146/libelf/elf.h 2010-04-24 10:22:43.000000000 +0000 +@@ -143,6 +143,7 @@ + #define ELFOSABI_HPUX 1 /* HP-UX */ + #define ELFOSABI_NETBSD 2 /* NetBSD. */ + #define ELFOSABI_LINUX 3 /* Linux. */ ++#define ELFOSABI_HURD 4 /* GNU/Hurd */ + #define ELFOSABI_SOLARIS 6 /* Sun Solaris. */ + #define ELFOSABI_AIX 7 /* IBM AIX. */ + #define ELFOSABI_IRIX 8 /* SGI Irix. */ +@@ -150,8 +151,13 @@ + #define ELFOSABI_TRU64 10 /* Compaq TRU64 UNIX. */ + #define ELFOSABI_MODESTO 11 /* Novell Modesto. */ + #define ELFOSABI_OPENBSD 12 /* OpenBSD. */ ++#define ELFOSABI_OPENVMS 13 /* OpenVMS */ ++#define ELFOSABI_NSK 14 /* Hewlett-Packard Non-Stop Kernel */ ++#define ELFOSABI_AROS 15 /* Amiga Research OS */ ++/* 64-255 Architecture-specific value range */ + #define ELFOSABI_ARM_AEABI 64 /* ARM EABI */ + #define ELFOSABI_ARM 97 /* ARM */ ++/* This is deprecated? It's not in the latest version anymore. */ + #define ELFOSABI_STANDALONE 255 /* Standalone (embedded) application */ + + #define EI_ABIVERSION 8 /* ABI version */ +@@ -206,7 +212,7 @@ + #define EM_H8_300H 47 /* Hitachi H8/300H */ + #define EM_H8S 48 /* Hitachi H8S */ + #define EM_H8_500 49 /* Hitachi H8/500 */ +-#define EM_IA_64 50 /* Intel Merced */ ++#define EM_IA_64 50 /* Intel IA64 */ + #define EM_MIPS_X 51 /* Stanford MIPS-X */ + #define EM_COLDFIRE 52 /* Motorola Coldfire */ + #define EM_68HC12 53 /* Motorola M68HC12 */ +@@ -220,7 +226,8 @@ + #define EM_TINYJ 61 /* Advanced Logic Corp. Tinyj emb.fam*/ + #define EM_X86_64 62 /* AMD x86-64 architecture */ + #define EM_PDSP 63 /* Sony DSP Processor */ +- ++#define EM_PDP10 64 /* Digital Equipment Corp. PDP-10 */ ++#define EM_PDP11 65 /* Digital Equipment Corp. PDP-11 */ + #define EM_FX66 66 /* Siemens FX66 microcontroller */ + #define EM_ST9PLUS 67 /* STMicroelectronics ST9+ 8/16 mc */ + #define EM_ST7 68 /* STmicroelectronics ST7 8 bit mc */ +@@ -250,7 +257,22 @@ + #define EM_OPENRISC 92 /* OpenRISC 32-bit embedded processor */ + #define EM_ARC_A5 93 /* ARC Cores Tangent-A5 */ + #define EM_XTENSA 94 /* Tensilica Xtensa Architecture */ +-#define EM_NUM 95 ++#define EM_VIDEOCORE 95 /* Alphamosaic VideoCore processor */ ++#define EM_TMM_GPP 96 /* Thompson Multimedia General Purpose Processor */ ++#define EM_NS32K 97 /* National Semiconductor 32000 series */ ++#define EM_TPC 98 /* Tenor Network TPC processor */ ++#define EM_SNP1K 99 /* Trebia SNP 1000 processor */ ++#define EM_ST200 100 /* STMicroelectronics (www.st.com) ST200 microcontroller */ ++#define EM_IP2K 101 /* Ubicom IP2XXX microcontroller family */ ++#define EM_MAX 102 /* MAX Processor */ ++#define EM_CR 103 /* National Semiconductor CompactRISC */ ++#define EM_F2MC16 104 /* Fujitsu F2MC16 */ ++#define EM_MSP430 105 /* TI msp430 micro controller */ ++#define EM_BLACKFIN 106 /* Analog Devices Blackfin (DSP) processor */ ++#define EM_SE_C33 107 /* S1C33 Family of Seiko Epson processors */ ++#define EM_SEP 108 /* Sharp embedded microprocessor */ ++#define EM_ARCA 109 /* Arca RISC Microprocessor */ ++#define EM_NUM 110 + + /* If it is necessary to assign new unofficial EM_* values, please + pick large random numbers (0x8523, 0xa7f2, etc.) to minimize the diff --git a/meta/packages/elfutils/elfutils-0.148/hppa_backend.diff b/meta/packages/elfutils/elfutils-0.148/hppa_backend.diff new file mode 100644 index 0000000000..98353d5b4b --- /dev/null +++ b/meta/packages/elfutils/elfutils-0.148/hppa_backend.diff @@ -0,0 +1,799 @@ +Index: elfutils-0.146/backends/parisc_init.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ elfutils-0.146/backends/parisc_init.c 2010-04-24 10:10:50.000000000 +0000 +@@ -0,0 +1,74 @@ ++/* Initialization of PA-RISC specific backend library. ++ Copyright (C) 2002, 2005, 2006 Red Hat, Inc. ++ This file is part of Red Hat elfutils. ++ Written by Ulrich Drepper , 2002. ++ ++ Red Hat elfutils is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by the ++ Free Software Foundation; version 2 of the License. ++ ++ Red Hat elfutils is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License along ++ with Red Hat elfutils; if not, write to the Free Software Foundation, ++ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. ++ ++ Red Hat elfutils is an included package of the Open Invention Network. ++ An included package of the Open Invention Network is a package for which ++ Open Invention Network licensees cross-license their patents. No patent ++ license is granted, either expressly or impliedly, by designation as an ++ included package. Should you wish to participate in the Open Invention ++ Network licensing program, please visit www.openinventionnetwork.com ++ . */ ++ ++#ifdef HAVE_CONFIG_H ++# include ++#endif ++ ++#define BACKEND parisc_ ++#define RELOC_PREFIX R_PARISC_ ++#include "libebl_CPU.h" ++#include "libebl_parisc.h" ++ ++/* This defines the common reloc hooks based on parisc_reloc.def. */ ++#include "common-reloc.c" ++ ++ ++const char * ++parisc_init (elf, machine, eh, ehlen) ++ Elf *elf __attribute__ ((unused)); ++ GElf_Half machine __attribute__ ((unused)); ++ Ebl *eh; ++ size_t ehlen; ++{ ++ int pa64 = 0; ++ ++ /* Check whether the Elf_BH object has a sufficent size. */ ++ if (ehlen < sizeof (Ebl)) ++ return NULL; ++ ++ if (elf) { ++ GElf_Ehdr ehdr_mem; ++ GElf_Ehdr *ehdr = gelf_getehdr (elf, &ehdr_mem); ++ if (ehdr && (ehdr->e_flags & EF_PARISC_WIDE)) ++ pa64 = 1; ++ } ++ /* We handle it. */ ++ eh->name = "PA-RISC"; ++ parisc_init_reloc (eh); ++ HOOK (eh, reloc_simple_type); ++ HOOK (eh, machine_flag_check); ++ HOOK (eh, symbol_type_name); ++ HOOK (eh, segment_type_name); ++ HOOK (eh, section_type_name); ++ HOOK (eh, register_info); ++ if (pa64) ++ eh->return_value_location = parisc_return_value_location_64; ++ else ++ eh->return_value_location = parisc_return_value_location_32; ++ ++ return MODVERSION; ++} +Index: elfutils-0.146/backends/parisc_regs.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ elfutils-0.146/backends/parisc_regs.c 2010-04-24 10:10:50.000000000 +0000 +@@ -0,0 +1,159 @@ ++/* Register names and numbers for PA-RISC DWARF. ++ Copyright (C) 2005, 2006 Red Hat, Inc. ++ This file is part of Red Hat elfutils. ++ ++ Red Hat elfutils is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by the ++ Free Software Foundation; version 2 of the License. ++ ++ Red Hat elfutils is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License along ++ with Red Hat elfutils; if not, write to the Free Software Foundation, ++ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. ++ ++ Red Hat elfutils is an included package of the Open Invention Network. ++ An included package of the Open Invention Network is a package for which ++ Open Invention Network licensees cross-license their patents. No patent ++ license is granted, either expressly or impliedly, by designation as an ++ included package. Should you wish to participate in the Open Invention ++ Network licensing program, please visit www.openinventionnetwork.com ++ . */ ++ ++#ifdef HAVE_CONFIG_H ++# include ++#endif ++ ++#include ++#include ++ ++#define BACKEND parisc_ ++#include "libebl_CPU.h" ++ ++ssize_t ++parisc_register_info (Ebl *ebl, int regno, char *name, size_t namelen, ++ const char **prefix, const char **setname, ++ int *bits, int *type) ++{ ++ int pa64 = 0; ++ ++ if (ebl->elf) { ++ GElf_Ehdr ehdr_mem; ++ GElf_Ehdr *ehdr = gelf_getehdr (ebl->elf, &ehdr_mem); ++ if (ehdr->e_flags & EF_PARISC_WIDE) ++ pa64 = 1; ++ } ++ ++ int nregs = pa64 ? 127 : 128; ++ ++ if (name == NULL) ++ return nregs; ++ ++ if (regno < 0 || regno >= nregs || namelen < 6) ++ return -1; ++ ++ *prefix = "%"; ++ ++ if (regno < 32) ++ { ++ *setname = "integer"; ++ *type = DW_ATE_signed; ++ if (pa64) ++ { ++ *bits = 64; ++ } ++ else ++ { ++ *bits = 32; ++ } ++ } ++ else if (regno == 32) ++ { ++ *setname = "special"; ++ if (pa64) ++ { ++ *bits = 6; ++ } ++ else ++ { ++ *bits = 5; ++ } ++ *type = DW_ATE_unsigned; ++ } ++ else ++ { ++ *setname = "FPU"; ++ *type = DW_ATE_float; ++ if (pa64) ++ { ++ *bits = 64; ++ } ++ else ++ { ++ *bits = 32; ++ } ++ } ++ ++ if (regno < 33) { ++ switch (regno) ++ { ++ case 0 ... 9: ++ name[0] = 'r'; ++ name[1] = regno + '0'; ++ namelen = 2; ++ break; ++ case 10 ... 31: ++ name[0] = 'r'; ++ name[1] = regno / 10 + '0'; ++ name[2] = regno % 10 + '0'; ++ namelen = 3; ++ break; ++ case 32: ++ *prefix = NULL; ++ name[0] = 'S'; ++ name[1] = 'A'; ++ name[2] = 'R'; ++ namelen = 3; ++ break; ++ } ++ } ++ else { ++ if (pa64 && ((regno - 72) % 2)) { ++ *setname = NULL; ++ return 0; ++ } ++ ++ switch (regno) ++ { ++ case 72 + 0 ... 72 + 11: ++ name[0] = 'f'; ++ name[1] = 'r'; ++ name[2] = (regno + 8 - 72) / 2 + '0'; ++ namelen = 3; ++ if ((regno + 8 - 72) % 2) { ++ name[3] = 'R'; ++ namelen++; ++ } ++ break; ++ case 72 + 12 ... 72 + 55: ++ name[0] = 'f'; ++ name[1] = 'r'; ++ name[2] = (regno + 8 - 72) / 2 / 10 + '0'; ++ name[3] = (regno + 8 - 72) / 2 % 10 + '0'; ++ namelen = 4; ++ if ((regno + 8 - 72) % 2) { ++ name[4] = 'R'; ++ namelen++; ++ } ++ break; ++ default: ++ *setname = NULL; ++ return 0; ++ } ++ } ++ name[namelen++] = '\0'; ++ return namelen; ++} +Index: elfutils-0.146/backends/parisc_reloc.def +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ elfutils-0.146/backends/parisc_reloc.def 2010-04-24 10:10:50.000000000 +0000 +@@ -0,0 +1,128 @@ ++/* List the relocation types for PA-RISC. -*- C -*- ++ Copyright (C) 2005 Red Hat, Inc. ++ This file is part of Red Hat elfutils. ++ ++ Red Hat elfutils is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by the ++ Free Software Foundation; version 2 of the License. ++ ++ Red Hat elfutils is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License along ++ with Red Hat elfutils; if not, write to the Free Software Foundation, ++ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. ++ ++ Red Hat elfutils is an included package of the Open Invention Network. ++ An included package of the Open Invention Network is a package for which ++ Open Invention Network licensees cross-license their patents. No patent ++ license is granted, either expressly or impliedly, by designation as an ++ included package. Should you wish to participate in the Open Invention ++ Network licensing program, please visit www.openinventionnetwork.com ++ . */ ++ ++/* NAME, REL|EXEC|DYN */ ++ ++RELOC_TYPE (NONE, EXEC|DYN) ++RELOC_TYPE (DIR32, REL|EXEC|DYN) ++RELOC_TYPE (DIR21L, REL|EXEC|DYN) ++RELOC_TYPE (DIR17R, REL) ++RELOC_TYPE (DIR17F, REL) ++RELOC_TYPE (DIR14R, REL|DYN) ++RELOC_TYPE (PCREL32, REL) ++RELOC_TYPE (PCREL21L, REL) ++RELOC_TYPE (PCREL17R, REL) ++RELOC_TYPE (PCREL17F, REL) ++RELOC_TYPE (PCREL14R, REL|EXEC) ++RELOC_TYPE (DPREL21L, REL) ++RELOC_TYPE (DPREL14WR, REL) ++RELOC_TYPE (DPREL14DR, REL) ++RELOC_TYPE (DPREL14R, REL) ++RELOC_TYPE (GPREL21L, 0) ++RELOC_TYPE (GPREL14R, 0) ++RELOC_TYPE (LTOFF21L, REL) ++RELOC_TYPE (LTOFF14R, REL) ++RELOC_TYPE (DLTIND14F, 0) ++RELOC_TYPE (SETBASE, 0) ++RELOC_TYPE (SECREL32, REL) ++RELOC_TYPE (BASEREL21L, 0) ++RELOC_TYPE (BASEREL17R, 0) ++RELOC_TYPE (BASEREL14R, 0) ++RELOC_TYPE (SEGBASE, 0) ++RELOC_TYPE (SEGREL32, REL) ++RELOC_TYPE (PLTOFF21L, 0) ++RELOC_TYPE (PLTOFF14R, 0) ++RELOC_TYPE (PLTOFF14F, 0) ++RELOC_TYPE (LTOFF_FPTR32, 0) ++RELOC_TYPE (LTOFF_FPTR21L, 0) ++RELOC_TYPE (LTOFF_FPTR14R, 0) ++RELOC_TYPE (FPTR64, 0) ++RELOC_TYPE (PLABEL32, REL|DYN) ++RELOC_TYPE (PCREL64, 0) ++RELOC_TYPE (PCREL22C, 0) ++RELOC_TYPE (PCREL22F, 0) ++RELOC_TYPE (PCREL14WR, 0) ++RELOC_TYPE (PCREL14DR, 0) ++RELOC_TYPE (PCREL16F, 0) ++RELOC_TYPE (PCREL16WF, 0) ++RELOC_TYPE (PCREL16DF, 0) ++RELOC_TYPE (DIR64, REL|DYN) ++RELOC_TYPE (DIR14WR, REL) ++RELOC_TYPE (DIR14DR, REL) ++RELOC_TYPE (DIR16F, REL) ++RELOC_TYPE (DIR16WF, REL) ++RELOC_TYPE (DIR16DF, REL) ++RELOC_TYPE (GPREL64, 0) ++RELOC_TYPE (GPREL14WR, 0) ++RELOC_TYPE (GPREL14DR, 0) ++RELOC_TYPE (GPREL16F, 0) ++RELOC_TYPE (GPREL16WF, 0) ++RELOC_TYPE (GPREL16DF, 0) ++RELOC_TYPE (LTOFF64, 0) ++RELOC_TYPE (LTOFF14WR, 0) ++RELOC_TYPE (LTOFF14DR, 0) ++RELOC_TYPE (LTOFF16F, 0) ++RELOC_TYPE (LTOFF16WF, 0) ++RELOC_TYPE (LTOFF16DF, 0) ++RELOC_TYPE (SECREL64, 0) ++RELOC_TYPE (BASEREL14WR, 0) ++RELOC_TYPE (BASEREL14DR, 0) ++RELOC_TYPE (SEGREL64, 0) ++RELOC_TYPE (PLTOFF14WR, 0) ++RELOC_TYPE (PLTOFF14DR, 0) ++RELOC_TYPE (PLTOFF16F, 0) ++RELOC_TYPE (PLTOFF16WF, 0) ++RELOC_TYPE (PLTOFF16DF, 0) ++RELOC_TYPE (LTOFF_FPTR64, 0) ++RELOC_TYPE (LTOFF_FPTR14WR, 0) ++RELOC_TYPE (LTOFF_FPTR14DR, 0) ++RELOC_TYPE (LTOFF_FPTR16F, 0) ++RELOC_TYPE (LTOFF_FPTR16WF, 0) ++RELOC_TYPE (LTOFF_FPTR16DF, 0) ++RELOC_TYPE (COPY, EXEC) ++RELOC_TYPE (IPLT, EXEC|DYN) ++RELOC_TYPE (EPLT, 0) ++RELOC_TYPE (TPREL32, DYN) ++RELOC_TYPE (TPREL21L, 0) ++RELOC_TYPE (TPREL14R, 0) ++RELOC_TYPE (LTOFF_TP21L, 0) ++RELOC_TYPE (LTOFF_TP14R, 0) ++RELOC_TYPE (LTOFF_TP14F, 0) ++RELOC_TYPE (TPREL64, 0) ++RELOC_TYPE (TPREL14WR, 0) ++RELOC_TYPE (TPREL14DR, 0) ++RELOC_TYPE (TPREL16F, 0) ++RELOC_TYPE (TPREL16WF, 0) ++RELOC_TYPE (TPREL16DF, 0) ++RELOC_TYPE (LTOFF_TP64, 0) ++RELOC_TYPE (LTOFF_TP14WR, 0) ++RELOC_TYPE (LTOFF_TP14DR, 0) ++RELOC_TYPE (LTOFF_TP16F, 0) ++RELOC_TYPE (LTOFF_TP16WF, 0) ++RELOC_TYPE (LTOFF_TP16DF, 0) ++RELOC_TYPE (TLS_DTPMOD32, DYN) ++RELOC_TYPE (TLS_DTPMOD64, DYN) ++ ++#define NO_RELATIVE_RELOC 1 +Index: elfutils-0.146/backends/parisc_retval.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ elfutils-0.146/backends/parisc_retval.c 2010-04-24 10:10:50.000000000 +0000 +@@ -0,0 +1,213 @@ ++/* Function return value location for Linux/PA-RISC ABI. ++ Copyright (C) 2005 Red Hat, Inc. ++ This file is part of Red Hat elfutils. ++ ++ Red Hat elfutils is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by the ++ Free Software Foundation; version 2 of the License. ++ ++ Red Hat elfutils is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License along ++ with Red Hat elfutils; if not, write to the Free Software Foundation, ++ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. ++ ++ Red Hat elfutils is an included package of the Open Invention Network. ++ An included package of the Open Invention Network is a package for which ++ Open Invention Network licensees cross-license their patents. No patent ++ license is granted, either expressly or impliedly, by designation as an ++ included package. Should you wish to participate in the Open Invention ++ Network licensing program, please visit www.openinventionnetwork.com ++ . */ ++ ++#ifdef HAVE_CONFIG_H ++# include ++#endif ++ ++#include ++#include ++ ++#define BACKEND parisc_ ++#include "libebl_CPU.h" ++#include "libebl_parisc.h" ++ ++/* %r28, or pair %r28, %r29. */ ++static const Dwarf_Op loc_intreg32[] = ++ { ++ { .atom = DW_OP_reg28 }, { .atom = DW_OP_piece, .number = 4 }, ++ { .atom = DW_OP_reg29 }, { .atom = DW_OP_piece, .number = 4 }, ++ }; ++ ++static const Dwarf_Op loc_intreg[] = ++ { ++ { .atom = DW_OP_reg28 }, { .atom = DW_OP_piece, .number = 8 }, ++ { .atom = DW_OP_reg29 }, { .atom = DW_OP_piece, .number = 8 }, ++ }; ++#define nloc_intreg 1 ++#define nloc_intregpair 4 ++ ++/* %fr4L, or pair %fr4L, %fr4R on pa-32 */ ++static const Dwarf_Op loc_fpreg32[] = ++ { ++ { .atom = DW_OP_regx, .number = 72 }, { .atom = DW_OP_piece, .number = 4 }, ++ { .atom = DW_OP_regx, .number = 73 }, { .atom = DW_OP_piece, .number = 4 }, ++ }; ++#define nloc_fpreg32 2 ++#define nloc_fpregpair32 4 ++ ++/* $fr4 */ ++static const Dwarf_Op loc_fpreg[] = ++ { ++ { .atom = DW_OP_regx, .number = 72 }, ++ }; ++#define nloc_fpreg 1 ++ ++#if 0 ++/* The return value is a structure and is actually stored in stack space ++ passed in a hidden argument by the caller. Address of the location is stored ++ in %r28 before function call, but it may be changed by function. */ ++static const Dwarf_Op loc_aggregate[] = ++ { ++ { .atom = DW_OP_breg28 }, ++ }; ++#define nloc_aggrega