summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2016-01-11 08:30:32 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-15 11:54:48 +0000
commitaaafe33b791326a7f08f15ee97cbd7229ab40895 (patch)
treeda2df14ad7e6db54ffd7a93a8f190bf91ac59354 /meta/recipes-devtools
parent38901a79ac0540b3177b6f9304c37a5e75fea7e7 (diff)
downloadpoky-aaafe33b791326a7f08f15ee97cbd7229ab40895.tar.gz
elfutils: 0.163 -> 0.164
Update patches from debian http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.164-1.debian.tar.xz (From OE-Core rev: 5bf174ee745929a4f80095e9de3621d1ccfc9511) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.163/arm_func_value.patch165
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.163/arm_unwind_ret_mask.patch83
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.163/non_linux.patch35
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.163/redhat-portability.diff1021
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.163/scanf-format.patch40
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.163/uclibc-support-for-elfutils-0.161.patch106
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.164/0001-Ignore-differences-between-mips-machine-identifiers.patch34
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.164/0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch (renamed from meta/recipes-devtools/elfutils/elfutils-0.163/0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.164/0001-fix-a-stack-usage-warning.patch (renamed from meta/recipes-devtools/elfutils/elfutils-0.163/0001-fix-a-stack-usage-warning.patch)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.164/0001-remove-the-unneed-checking.patch (renamed from meta/recipes-devtools/elfutils/elfutils-0.163/0001-remove-the-unneed-checking.patch)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.164/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch168
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.164/0003-Add-mips-n64-relocation-format-hack.patch226
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.164/arm_backend.diff (renamed from meta/recipes-devtools/elfutils/elfutils-0.163/arm_backend.diff)389
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.164/fixheadercheck.patch (renamed from meta/recipes-devtools/elfutils/elfutils-0.163/fixheadercheck.patch)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.164/hppa_backend.diff (renamed from meta/recipes-devtools/elfutils/elfutils-0.163/hppa_backend.diff)69
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.164/kfreebsd_path.patch15
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.164/m68k_backend.diff (renamed from meta/recipes-devtools/elfutils/elfutils-0.163/m68k_backend.diff)61
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.164/mips_backend.diff (renamed from meta/recipes-devtools/elfutils/elfutils-0.163/mips_backend.diff)71
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.164/mips_readelf_w.patch (renamed from meta/recipes-devtools/elfutils/elfutils-0.163/mips_readelf_w.patch)8
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.164/testsuite-ignore-elflint.diff (renamed from meta/recipes-devtools/elfutils/elfutils-0.163/testsuite-ignore-elflint.diff)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils_0.164.bb (renamed from meta/recipes-devtools/elfutils/elfutils_0.163.bb)15
21 files changed, 735 insertions, 1771 deletions
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.163/arm_func_value.patch b/meta/recipes-devtools/elfutils/elfutils-0.163/arm_func_value.patch
deleted file mode 100644
index 2fe4df68b7..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.163/arm_func_value.patch
+++ /dev/null
@@ -1,165 +0,0 @@
1From: Mark Wielaard <mjw@redhat.com>
2Date: Sun, 15 Jun 2014 11:30:35 +0200
3Subject: libebl: Add sym_func_value hook.
4
5The ARM EABI says that the zero bit of function symbol st_value indicates
6whether the symbol points to a THUMB or ARM function. Add a new ebl hook
7to adjust the st_value in such a case so that we get the actual value that
8the symbol points to. It isn't easily possible to reuse the existing
9resolve_sym_value for this purpose, so we end up with another hook that
10can be used from dwfl_module_getsym and elflint.
11
12Rebase arm_func_value.patch from 0.159 to 0.160
13Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
14---
15 backends/arm_init.c | 1 +
16 backends/arm_symbol.c | 8 ++++++++
17 libdwfl/dwfl_module_getsym.c | 2 +-
18 libebl/Makefile.am | 3 ++-
19 libebl/ebl-hooks.h | 3 +++
20 libebl/eblsymfuncval.c | 43 ++++++++++++++++++++++++++++++++++++++++++
21 libebl/libebl.h | 11 +++++++++++
22 7 files changed, 69 insertions(+), 2 deletions(-)
23
24diff --git a/backends/arm_init.c b/backends/arm_init.c
25index 7171186..9f03630 100644
26--- a/backends/arm_init.c
27+++ b/backends/arm_init.c
28@@ -78,6 +78,7 @@ arm_init (elf, machine, eh, ehlen)
29 eh->return_value_location = arm_return_value_location_hard;
30 HOOK (eh, abi_cfi);
31 HOOK (eh, check_reloc_target_type);
32+ HOOK (eh, sym_func_value);
33 HOOK (eh, symbol_type_name);
34
35 /* We only unwind the core integer registers. */
36diff --git a/backends/arm_symbol.c b/backends/arm_symbol.c
37index da4a50a..ccea03b 100644
38--- a/backends/arm_symbol.c
39+++ b/backends/arm_symbol.c
40@@ -130,6 +130,14 @@ arm_check_reloc_target_type (Ebl *ebl __attribute__ ((unused)), Elf64_Word sh_ty
41 return sh_type == SHT_ARM_EXIDX;
42 }
43
44+/* ARM EABI says that the low bit indicates whether the function
45+ symbol value is a THUMB function or not. Mask it off. */
46+GElf_Addr
47+arm_sym_func_value (Ebl *ebl __attribute__ ((unused)), GElf_Addr val)
48+{
49+ return val & ~(GElf_Addr)1;
50+}
51+
52 const char *
53 arm_symbol_type_name (int type,
54 char *buf __attribute__ ((unused)),
55diff --git a/libdwfl/dwfl_module_getsym.c b/libdwfl/dwfl_module_getsym.c
56index 42d2b67..fb192d7 100644
57--- a/libdwfl/dwfl_module_getsym.c
58+++ b/libdwfl/dwfl_module_getsym.c
59@@ -119,7 +119,7 @@ __libdwfl_getsym (Dwfl_Module *mod, int ndx, GElf_Sym *sym, GElf_Addr *addr,
60 descriptors). */
61
62 char *ident;
63- GElf_Addr st_value = sym->st_value & ebl_func_addr_mask (mod->ebl);
64+ GElf_Addr st_value = ebl_sym_func_value (mod->ebl, sym->st_value);
65 *resolved = false;
66 if (! adjust_st_value && mod->e_type != ET_REL && alloc
67 && (GELF_ST_TYPE (sym->st_info) == STT_FUNC
68diff --git a/libebl/Makefile.am b/libebl/Makefile.am
69index ec4477b..889c21b 100644
70--- a/libebl/Makefile.am
71+++ b/libebl/Makefile.am
72@@ -55,7 +55,8 @@ gen_SOURCES = eblopenbackend.c eblclosebackend.c eblstrtab.c \
73 eblsysvhashentrysize.c eblauxvinfo.c eblcheckobjattr.c \
74 ebl_check_special_section.c ebl_syscall_abi.c eblabicfi.c \
75 eblstother.c eblinitreg.c ebldwarftoregno.c eblnormalizepc.c \
76- eblunwind.c eblresolvesym.c eblcheckreloctargettype.c
77+ eblunwind.c eblresolvesym.c eblcheckreloctargettype.c \
78+ eblsymfuncval.c
79
80 libebl_a_SOURCES = $(gen_SOURCES)
81
82diff --git a/libebl/ebl-hooks.h b/libebl/ebl-hooks.h
83index 2e31446..9df945d 100644
84--- a/libebl/ebl-hooks.h
85+++ b/libebl/ebl-hooks.h
86@@ -191,5 +191,8 @@ bool EBLHOOK(unwind) (Ebl *ebl, Dwarf_Addr pc, ebl_tid_registers_t *setfunc,
87 (e.g. function descriptor resolving) */
88 bool EBLHOOK(resolve_sym_value) (Ebl *ebl, GElf_Addr *addr);
89
90+/* Returns the real value of a symbol function address or offset. */
91+GElf_Addr EBLHOOK(sym_func_value) (Ebl *ebl, GElf_Addr val);
92+
93 /* Destructor for ELF backend handle. */
94 void EBLHOOK(destr) (struct ebl *);
95diff --git a/libebl/eblsymfuncval.c b/libebl/eblsymfuncval.c
96new file mode 100644
97index 0000000..c0b322f
98--- /dev/null
99+++ b/libebl/eblsymfuncval.c
100@@ -0,0 +1,43 @@
101+/* Turn a symbol function value into a real function address or offset.
102+ Copyright (C) 2014 Red Hat, Inc.
103+ This file is part of elfutils.
104+
105+ This file is free software; you can redistribute it and/or modify
106+ it under the terms of either
107+
108+ * the GNU Lesser General Public License as published by the Free
109+ Software Foundation; either version 3 of the License, or (at
110+ your option) any later version
111+
112+ or
113+
114+ * the GNU General Public License as published by the Free
115+ Software Foundation; either version 2 of the License, or (at
116+ your option) any later version
117+
118+ or both in parallel, as here.
119+
120+ elfutils is distributed in the hope that it will be useful, but
121+ WITHOUT ANY WARRANTY; without even the implied warranty of
122+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
123+ General Public License for more details.
124+
125+ You should have received copies of the GNU General Public License and
126+ the GNU Lesser General Public License along with this program. If
127+ not, see <http://www.gnu.org/licenses/>. */
128+
129+#ifdef HAVE_CONFIG_H
130+# include <config.h>
131+#endif
132+
133+#include <libeblP.h>
134+#include <assert.h>
135+
136+GElf_Addr
137+ebl_sym_func_value (Ebl *ebl, GElf_Addr val)
138+{
139+ if (ebl == NULL || ebl->sym_func_value == NULL)
140+ return val;
141+
142+ return ebl->sym_func_value (ebl, val);
143+}
144diff --git a/libebl/libebl.h b/libebl/libebl.h
145index 7dbf460..96c076b 100644
146--- a/libebl/libebl.h
147+++ b/libebl/libebl.h
148@@ -472,6 +472,17 @@ extern bool ebl_unwind (Ebl *ebl, Dwarf_Addr pc, ebl_tid_registers_t *setfunc,
149 extern bool ebl_resolve_sym_value (Ebl *ebl, GElf_Addr *addr)
150 __nonnull_attribute__ (2);
151
152+/* Returns the real value of a symbol function address or offset
153+ (e.g. when the st_value contains some flag bits that need to be
154+ masked off). This is different from ebl_resolve_sym_value which
155+ only works for actual symbol addresses (in non-ET_REL files) that
156+ might resolve to an address in a different section.
157+ ebl_sym_func_value is called to turn the given value into the a
158+ real address or offset (the original value might not be a real
159+ address). This works for both ET_REL when the value is a section
160+ offset or ET_EXEC or ET_DYN symbol values, which are addresses. */
161+extern GElf_Addr ebl_sym_func_value (Ebl *ebl, GElf_Addr val);
162+
163 #ifdef __cplusplus
164 }
165 #endif
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.163/arm_unwind_ret_mask.patch b/meta/recipes-devtools/elfutils/elfutils-0.163/arm_unwind_ret_mask.patch
deleted file mode 100644
index 8abb36bb49..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.163/arm_unwind_ret_mask.patch
+++ /dev/null
@@ -1,83 +0,0 @@
1From: Mark Wielaard <mjw@redhat.com>
2Date: Sun, 15 Jun 2014 12:30:02 +0200
3Subject: libebl: Add ebl_unwind_ret_mask.
4
5Another ARM oddity. A return value address in an unwind will contain an
6extra bit to indicate whether to return to a regular ARM or THUMB function.
7Add a new ebl function to return a mask to use to get the actual return
8address during an unwind ebl_unwind_ret_mask.
9
10Rebase arm_unwind_ret_mask.patch from 0.159 to 0.160
11
12Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
13---
14 backends/arm_init.c | 3 +++
15 libebl/eblinitreg.c | 8 ++++++++
16 libebl/libebl.h | 4 ++++
17 libebl/libeblP.h | 6 ++++++
18 4 files changed, 21 insertions(+)
19
20diff --git a/backends/arm_init.c b/backends/arm_init.c
21index 2266829..f8df042 100644
22--- a/backends/arm_init.c
23+++ b/backends/arm_init.c
24@@ -87,5 +87,8 @@ arm_init (elf, machine, eh, ehlen)
25 /* Bit zero encodes whether an function address is THUMB or ARM. */
26 eh->func_addr_mask = ~(GElf_Addr)1;
27
28+ /* Bit zero encodes whether to return to a THUMB or ARM function. */
29+ eh->unwind_ret_mask = ~(GElf_Addr)1;
30+
31 return MODVERSION;
32 }
33diff --git a/libebl/eblinitreg.c b/libebl/eblinitreg.c
34index 5729b3c..ca681c0 100644
35--- a/libebl/eblinitreg.c
36+++ b/libebl/eblinitreg.c
37@@ -56,3 +56,11 @@ ebl_func_addr_mask (Ebl *ebl)
38 return ((ebl == NULL || ebl->func_addr_mask == 0)
39 ? ~(GElf_Addr)0 : ebl->func_addr_mask);
40 }
41+
42+GElf_Addr
43+ebl_unwind_ret_mask (Ebl *ebl)
44+{
45+ return ((ebl == NULL || ebl->unwind_ret_mask == 0)
46+ ? ~(GElf_Addr)0 : ebl->unwind_ret_mask);
47+}
48+
49diff --git a/libebl/libebl.h b/libebl/libebl.h
50index 40cf635..be70027 100644
51--- a/libebl/libebl.h
52+++ b/libebl/libebl.h
53@@ -420,6 +420,10 @@ extern size_t ebl_frame_nregs (Ebl *ebl)
54 tables) is needed. */
55 extern GElf_Addr ebl_func_addr_mask (Ebl *ebl);
56
57+/* Mask to use for unwind return address in case the architecture adds
58+ some extra non-address bits to it. */
59+extern GElf_Addr ebl_unwind_ret_mask (Ebl *ebl);
60+
61 /* Convert *REGNO as is in DWARF to a lower range suitable for
62 Dwarf_Frame->REGS indexing. */
63 extern bool ebl_dwarf_to_regno (Ebl *ebl, unsigned *regno)
64diff --git a/libebl/libeblP.h b/libebl/libeblP.h
65index dbd67f3..e18ace6 100644
66--- a/libebl/libeblP.h
67+++ b/libebl/libeblP.h
68@@ -70,6 +70,12 @@ struct ebl
69 otherwise it should be the actual mask to use. */
70 GElf_Addr func_addr_mask;
71
72+ /* Mask to use to get the return address from an unwind in case the
73+ architecture adds some extra non-address bits to it. When not
74+ initialized (0) then ebl_unwind_ret_mask will return ~0, otherwise
75+ it should be the actual mask to use. */
76+ GElf_Addr unwind_ret_mask;
77+
78 /* Function descriptor load address and table as used by
79 ebl_resolve_sym_value if available for this arch. */
80 GElf_Addr fd_addr;
81--
821.9.1
83
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.163/non_linux.patch b/meta/recipes-devtools/elfutils/elfutils-0.163/non_linux.patch
deleted file mode 100644
index 35b1b389fb..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.163/non_linux.patch
+++ /dev/null
@@ -1,35 +0,0 @@
1Index: elfutils-0.159/libdwfl/linux-pid-attach.c
2===================================================================
3--- elfutils-0.159.orig/libdwfl/linux-pid-attach.c
4+++ elfutils-0.159/libdwfl/linux-pid-attach.c
5@@ -393,6 +393,16 @@ pid_getthread (Dwfl *dwfl __attribute__
6 return false;
7 }
8
9+bool
10+internal_function
11+__libdwfl_ptrace_attach (pid_t tid __attribute__ ((unused)),
12+ bool *tid_was_stoppedp __attribute__ ((unused)))
13+{
14+ errno = ENOSYS;
15+ __libdwfl_seterrno (DWFL_E_ERRNO);
16+ return false;
17+}
18+
19 static bool
20 pid_memory_read (Dwfl *dwfl __attribute__ ((unused)),
21 Dwarf_Addr addr __attribute__ ((unused)),
22@@ -419,6 +429,13 @@ pid_detach (Dwfl *dwfl __attribute__ ((u
23 {
24 }
25
26+void
27+internal_function
28+__libdwfl_ptrace_detach (pid_t tid __attribute__ ((unused)),
29+ bool tid_was_stopped __attribute__ ((unused)))
30+{
31+}
32+
33 static void
34 pid_thread_detach (Dwfl_Thread *thread __attribute__ ((unused)),
35 void *thread_arg __attribute__ ((unused)))
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.163/redhat-portability.diff b/meta/recipes-devtools/elfutils/elfutils-0.163/redhat-portability.diff
deleted file mode 100644
index a0ff07d397..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.163/redhat-portability.diff
+++ /dev/null
@@ -1,1021 +0,0 @@
1Rebase to 1.162
2
3Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
4---
5 ChangeLog | 30 +++++++++++++++++++++
6 backends/ChangeLog | 12 +++++++++
7 backends/Makefile.am | 2 +-
8 config/ChangeLog | 4 +++
9 config/eu.am | 14 +++++++---
10 configure.ac | 61 +++++++++++++++++++++++++++++++++++++++++--
11 lib/ChangeLog | 8 ++++++
12 lib/eu-config.h | 10 +++++++
13 libasm/ChangeLog | 5 ++++
14 libcpu/ChangeLog | 8 ++++++
15 libcpu/i386_disasm.c | 1 +
16 libdw/ChangeLog | 13 +++++++++
17 libdw/dwarf_begin_elf.c | 8 ++++++
18 libdw/libdw.h | 2 +-
19 libdwfl/ChangeLog | 20 ++++++++++++++
20 libdwfl/linux-core-attach.c | 29 ++++++++++++++++++++
21 libdwfl/linux-pid-attach.c | 14 ++++++++++
22 libebl/ChangeLog | 5 ++++
23 libelf/ChangeLog | 10 +++++++
24 libelf/common.h | 4 +--
25 libelf/gnuhash_xlate.h | 6 +++--
26 src/ChangeLog | 30 +++++++++++++++++++++
27 src/Makefile.am | 5 ++++
28 src/addr2line.c | 4 +--
29 src/findtextrel.c | 6 ++++-
30 src/ld.h | 2 ++
31 src/readelf.c | 15 +++++++----
32 src/strings.c | 11 ++++++++
33 src/strip.c | 6 +++++
34 tests/ChangeLog | 14 ++++++++++
35 tests/Makefile.am | 1 +
36 tests/backtrace.c | 1 +
37 tests/line2addr.c | 2 +-
38 33 files changed, 343 insertions(+), 20 deletions(-)
39
40diff --git a/ChangeLog b/ChangeLog
41index d829783..89bfd24 100644
42--- a/ChangeLog
43+++ b/ChangeLog
44@@ -253,6 +253,8 @@
45
46 2012-01-24 Mark Wielaard <mjw@redhat.com>
47
48+ * configure.ac: Wrap AC_COMPILE_IFELSE sources in AC_LANG_SOURCE.
49+
50 * COPYING: Fix address. Updated version from gnulib.
51
52 2012-01-23 Mark Wielaard <mjw@redhat.com>
53@@ -271,6 +273,9 @@
54
55 2011-10-08 Mike Frysinger <vapier@gentoo.org>
56
57+ * configure.ac (--disable-werror): Handle it, controlling BUILD_WERROR
58+ automake option.
59+
60 * configure.ac: Fix use of AC_ARG_ENABLE to handle $enableval correctly.
61
62 2011-10-02 Ulrich Drepper <drepper@gmail.com>
63@@ -292,6 +297,10 @@
64
65 * configure.ac (LOCALEDIR, DATADIRNAME): Removed.
66
67+2009-11-22 Roland McGrath <roland@redhat.com>
68+
69+ * configure.ac: Use sed and expr instead of modern bash extensions.
70+
71 2009-09-21 Ulrich Drepper <drepper@redhat.com>
72
73 * configure.ac: Update for more modern autoconf.
74@@ -300,6 +309,10 @@
75
76 * configure.ac (zip_LIBS): Check for liblzma too.
77
78+2009-08-17 Roland McGrath <roland@redhat.com>
79+
80+ * configure.ac: Check for -fgnu89-inline; add it to WEXTRA if it works.
81+
82 2009-04-19 Roland McGrath <roland@redhat.com>
83
84 * configure.ac (eu_version): Round down here, not in version.h macros.
85@@ -311,6 +324,8 @@
86
87 2009-01-23 Roland McGrath <roland@redhat.com>
88
89+ * configure.ac: Check for __builtin_popcount.
90+
91 * configure.ac (zlib check): Check for gzdirect, need zlib >= 1.2.2.3.
92
93 * configure.ac (__thread check): Use AC_LINK_IFELSE, in case of
94@@ -391,6 +406,10 @@
95 * configure.ac: Add dummy automake conditional to get dependencies
96 for non-generic linker right. See src/Makefile.am.
97
98+2005-11-22 Roland McGrath <roland@redhat.com>
99+
100+ * configure.ac: Check for --as-needed linker option.
101+
102 2005-11-18 Roland McGrath <roland@redhat.com>
103
104 * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New variable.
105@@ -438,6 +457,17 @@
106 * Makefile.am (all_SUBDIRS): Add libdwfl.
107 * configure.ac: Write libdwfl/Makefile.
108
109+2005-05-31 Roland McGrath <roland@redhat.com>
110+
111+ * configure.ac (WEXTRA): Check for -Wextra and set this substitution.
112+
113+ * configure.ac: Check for struct stat st_?tim members.
114+ * src/strip.c (process_file): Use st_?time if st_?tim are not there.
115+
116+ * configure.ac: Check for futimes function.
117+ * src/strip.c (handle_elf) [! HAVE_FUTIMES]: Use utimes instead.
118+ (handle_ar) [! HAVE_FUTIMES]: Likewise.
119+
120 2005-05-19 Roland McGrath <roland@redhat.com>
121
122 * configure.ac [AH_BOTTOM] (INTDECL, _INTDECL): New macros.
123diff --git a/backends/ChangeLog b/backends/ChangeLog
124index fe61d9c..9599623 100644
125--- a/backends/ChangeLog
126+++ b/backends/ChangeLog
127@@ -498,6 +498,10 @@
128 * ppc_attrs.c (ppc_check_object_attribute): Handle tag
129 GNU_Power_ABI_Struct_Return.
130
131+2009-01-23 Roland McGrath <roland@redhat.com>
132+
133+ * Makefile.am (libebl_%.so): Use $(LD_AS_NEEDED).
134+
135 2008-10-04 Ulrich Drepper <drepper@redhat.com>
136
137 * i386_reloc.def: Fix entries for TLS_GOTDESC, TLS_DESC_CALL, and
138@@ -825,6 +829,11 @@
139 * sparc_init.c: Likewise.
140 * x86_64_init.c: Likewise.
141
142+2005-11-22 Roland McGrath <roland@redhat.com>
143+
144+ * Makefile.am (LD_AS_NEEDED): New variable, substituted by configure.
145+ (libebl_%.so rule): Use it in place of -Wl,--as-needed.
146+
147 2005-11-19 Roland McGrath <roland@redhat.com>
148
149 * ppc64_reloc.def: REL30 -> ADDR30.
150@@ -847,6 +856,9 @@
151 * Makefile.am (uninstall): Don't try to remove $(pkgincludedir).
152 (CLEANFILES): Add libebl_$(m).so.
153
154+ * Makefile.am (WEXTRA): New variable, substituted by configure.
155+ (AM_CFLAGS): Use it in place of -Wextra.
156+
157 * ppc_reloc.def: Update bits per Alan Modra <amodra@bigpond.net.au>.
158 * ppc64_reloc.def: Likewise.
159
160diff --git a/backends/Makefile.am b/backends/Makefile.am
161index 21d7bd2..fe920c9 100644
162--- a/backends/Makefile.am
163+++ b/backends/Makefile.am
164@@ -119,7 +119,7 @@ libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw)
165 $(LINK) -shared -o $(@:.map=.so) \
166 -Wl,--whole-archive $< $(cpu_$*) -Wl,--no-whole-archive \
167 -Wl,--version-script,$(@:.so=.map) \
168- -Wl,-z,defs -Wl,--as-needed $(libelf) $(libdw)
169+ -Wl,-z,defs $(LD_AS_NEEDED) $(libelf) $(libdw)
170 @$(textrel_check)
171
172 libebl_i386.so: $(cpu_i386)
173diff --git a/config/ChangeLog b/config/ChangeLog
174index 64b58e1..63b3e90 100644
175--- a/config/ChangeLog
176+++ b/config/ChangeLog
177@@ -106,6 +106,10 @@
178
179 * known-dwarf.awk: Use gawk.
180
181+2011-10-08 Mike Frysinger <vapier@gentoo.org>
182+
183+ * eu.am [BUILD_WERROR]: Conditionalize -Werror use on this.
184+
185 2010-07-02 Ulrich Drepper <drepper@redhat.com>
186
187 * elfutils.spec.in: Add more BuildRequires.
188diff --git a/config/eu.am b/config/eu.am
189index 70d32de..65af085 100644
190--- a/config/eu.am
191+++ b/config/eu.am
192@@ -1,6 +1,6 @@
193 ## Common automake fragments for elfutils subdirectory makefiles.
194 ##
195-## Copyright (C) 2010, 2014 Red Hat, Inc.
196+## Copyright (C) 2010-2011, 2014 Red Hat, Inc.
197 ##
198 ## This file is part of elfutils.
199 ##
200@@ -29,6 +29,9 @@
201 ## not, see <http://www.gnu.org/licenses/>.
202 ##
203
204+WEXTRA = @WEXTRA@
205+LD_AS_NEEDED = @LD_AS_NEEDED@
206+
207 DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -DLOCALEDIR='"${localedir}"'
208 AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I..
209
210@@ -38,12 +41,17 @@ STACK_USAGE_WARNING=-Wstack-usage=262144
211 else
212 STACK_USAGE_WARNING=
213 endif
214-AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \
215+AM_CFLAGS = -std=gnu99 -Wall -Wshadow \
216 $(if $($(*F)_no_Werror),,-Werror) \
217- $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
218+ $(if $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) \
219+ $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2) \
220 $(if $($(*F)_no_Wstack_usage),,$(STACK_USAGE_WARNING)) \
221 $($(*F)_CFLAGS)
222
223+if BUILD_WERROR
224+AM_CFLAGS += $(if $($(*F)_no_Werror),,-Werror)
225+endif
226+
227 COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage, $(COMPILE))
228
229 DEFS.os = -DPIC -DSHARED
230diff --git a/configure.ac b/configure.ac
231index bc9ff56..27a1ef3 100644
232--- a/configure.ac
233+++ b/configure.ac
234@@ -106,6 +106,55 @@ CFLAGS="$old_CFLAGS"])
235 AS_IF([test "x$ac_cv_c99" != xyes],
236 AC_MSG_ERROR([gcc with GNU99 support required]))
237
238+AC_CACHE_CHECK([for -Wextra option to $CC], ac_cv_cc_wextra, [dnl
239+old_CFLAGS="$CFLAGS"
240+CFLAGS="$CFLAGS -Wextra"
241+AC_COMPILE_IFELSE([AC_LANG_SOURCE([void foo (void) { }])],
242+ ac_cv_cc_wextra=yes, ac_cv_cc_wextra=no)
243+CFLAGS="$old_CFLAGS"])
244+AC_SUBST(WEXTRA)
245+AS_IF([test "x$ac_cv_cc_wextra" = xyes], [WEXTRA=-Wextra], [WEXTRA=-W])
246+
247+AC_CACHE_CHECK([for -fgnu89-inline option to $CC], ac_cv_cc_gnu89_inline, [dnl
248+old_CFLAGS="$CFLAGS"
249+CFLAGS="$CFLAGS -fgnu89-inline -Werror"
250+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
251+void foo (void)
252+{
253+ inline void bar (void) {}
254+ bar ();
255+}
256+extern inline void baz (void) {}
257+])], ac_cv_cc_gnu89_inline=yes, ac_cv_cc_gnu89_inline=no)
258+CFLAGS="$old_CFLAGS"])
259+AS_IF([test "x$ac_cv_cc_gnu89_inline" = xyes],
260+ [WEXTRA="${WEXTRA:+$WEXTRA }-fgnu89-inline"])
261+
262+AC_CACHE_CHECK([for --as-needed linker option],
263+ ac_cv_as_needed, [dnl
264+cat > conftest.c <<EOF
265+int main (void) { return 0; }
266+EOF
267+if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
268+ -fPIC -shared -o conftest.so conftest.c
269+ -Wl,--as-needed 1>&AS_MESSAGE_LOG_FD])
270+then
271+ ac_cv_as_needed=yes
272+else
273+ ac_cv_as_needed=no
274+fi
275+rm -f conftest*])
276+AS_IF([test "x$ac_cv_as_needed" = xyes],
277+ [LD_AS_NEEDED=-Wl,--as-needed], [LD_AS_NEEDED=])
278+AC_SUBST(LD_AS_NEEDED)
279+
280+AC_CACHE_CHECK([for __builtin_popcount], ac_cv_popcount, [dnl
281+AC_LINK_IFELSE([AC_LANG_PROGRAM([], [[exit (__builtin_popcount (127));]])],
282+ ac_cv_popcount=yes, ac_cv_popcount=no)])
283+AS_IF([test "x$ac_cv_popcount" = xyes],
284+ [AC_DEFINE([HAVE_BUILTIN_POPCOUNT], [1], [Have __builtin_popcount.])])
285+
286+
287 AC_CACHE_CHECK([for __thread support], ac_cv_tls, [dnl
288 # Use the same flags that we use for our DSOs, so the test is representative.
289 # Some old compiler/linker/libc combinations fail some ways and not others.
290@@ -122,7 +171,10 @@ static __thread int a; int foo (int b) { return a + b; }]],
291 CFLAGS="$save_CFLAGS"
292 LDFLAGS="$save_LDFLAGS"])
293 AS_IF([test "x$ac_cv_tls" != xyes],
294- AC_MSG_ERROR([__thread support required]))
295+ [AS_IF([test "$use_locks" = yes],
296+ [AC_MSG_ERROR([--enable-thread-safety requires __thread support])],
297+ [AC_DEFINE([__thread], [/* empty: no multi-thread support */],
298+ [Stubbed out if missing compiler support.])])])
299
300 dnl This test must come as early as possible after the compiler configuration
301 dnl tests, because the choice of the file model can (in principle) affect
302@@ -224,6 +276,11 @@ AM_CONDITIONAL(USE_VALGRIND, test "$use_valgrind" = yes)
303 AM_CONDITIONAL(BUILD_STATIC, [dnl
304 test "$use_gprof" = yes -o "$use_gcov" = yes])
305
306+AC_ARG_ENABLE([werror],
307+AS_HELP_STRING([--disable-werror],[do not build with -Werror]),
308+ [enable_werror=$enableval], [enable_werror=yes])
309+AM_CONDITIONAL(BUILD_WERROR, test "$enable_werror" = yes)
310+
311 AC_ARG_ENABLE([tests-rpath],
312 AS_HELP_STRING([--enable-tests-rpath],[build $ORIGIN-using rpath into tests]),
313 [tests_use_rpath=$enableval], [tests_use_rpath=no])
314@@ -388,7 +445,7 @@ case "$eu_version" in
315 esac
316
317 # Round up to the next release API (x.y) version.
318-eu_version=$(( (eu_version + 999) / 1000 ))
319+eu_version=`expr \( $eu_version + 999 \) / 1000`
320
321 dnl Unique ID for this build.
322 MODVERSION="Build for ${LIBEBL_SUBDIR} ${eu_version} ${ac_cv_build}"
323diff --git a/lib/ChangeLog b/lib/ChangeLog
324index d04bf17..720c98d 100644
325--- a/lib/ChangeLog
326+++ b/lib/ChangeLog
327@@ -73,6 +73,9 @@
328
329 2009-01-23 Roland McGrath <roland@redhat.com>
330
331+ * eu-config.h [! HAVE_BUILTIN_POPCOUNT]
332+ (__builtin_popcount): New inline function.
333+
334 * eu-config.h: Add multiple inclusion protection.
335
336 2009-01-17 Ulrich Drepper <drepper@redhat.com>
337@@ -129,6 +132,11 @@
338 * Makefile.am (libeu_a_SOURCES): Add it.
339 * system.h: Declare crc32_file.
340
341+2005-02-07 Roland McGrath <roland@redhat.com>
342+
343+ * Makefile.am (WEXTRA): New variable, substituted by configure.
344+ (AM_CFLAGS): Use it in place of -Wextra.
345+
346 2005-04-30 Ulrich Drepper <drepper@redhat.com>
347
348 * Makefile.am: Use -ffunction-sections for xmalloc.c.
349diff --git a/lib/eu-config.h b/lib/eu-config.h
350index 400cdc6..872f6bc 100644
351--- a/lib/eu-config.h
352+++ b/lib/eu-config.h
353@@ -163,6 +163,16 @@ asm (".section predict_data, \"aw\"; .previous\n"
354 /* This macro is used by the tests conditionalize for standalone building. */
355 #define ELFUTILS_HEADER(name) <lib##name.h>
356
357+#ifndef HAVE_BUILTIN_POPCOUNT
358+# define __builtin_popcount hakmem_popcount
359+static inline unsigned int __attribute__ ((unused))
360+hakmem_popcount (unsigned int x)
361+{
362+ /* HAKMEM 169 */
363+ unsigned int n = x - ((x >> 1) & 033333333333) - ((x >> 2) & 011111111111);
364+ return ((n + (n >> 3)) & 030707070707) % 63;
365+}
366+#endif /* HAVE_BUILTIN_POPCOUNT */
367
368 #ifdef SYMBOL_VERSIONING
369 # define OLD_VERSION(name, version) \
370diff --git a/libasm/ChangeLog b/libasm/ChangeLog
371index 9b25af9..32b9fd0 100644
372--- a/libasm/ChangeLog
373+++ b/libasm/ChangeLog
374@@ -87,6 +87,11 @@
375 * asm_error.c: Add new error ASM_E_IOERROR.
376 * libasmP.h: Add ASM_E_IOERROR definition.
377
378+2005-05-31 Roland McGrath <roland@redhat.com>
379+
380+ * Makefile.am (WEXTRA): New variable, substituted by configure.
381+ (AM_CFLAGS): Use it in place of -Wextra.
382+
383 2005-02-15 Ulrich Drepper <drepper@redhat.com>
384
385 * Makefile.am (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
386diff --git a/libcpu/ChangeLog b/libcpu/ChangeLog
387index a20f440..5ea23b7 100644
388--- a/libcpu/ChangeLog
389+++ b/libcpu/ChangeLog
390@@ -51,6 +51,9 @@
391
392 2009-01-23 Roland McGrath <roland@redhat.com>
393
394+ * i386_disasm.c (i386_disasm): Add abort after assert-constant for old
395+ compilers that don't realize it's noreturn.
396+
397 * Makefile.am (i386_parse_CFLAGS): Use quotes around command
398 substitution that can produce leading whitespace.
399
400@@ -380,6 +383,11 @@
401 * defs/i386.doc: New file.
402 * defs/x86_64: New file.
403
404+2005-04-04 Roland McGrath <roland@redhat.com>
405+
406+ * Makefile.am (WEXTRA): New variable, substituted by configure.
407+ (AM_CFLAGS): Use it instead of -Wextra.
408+
409 2005-02-15 Ulrich Drepper <drepper@redhat.com>
410
411 * Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
412diff --git a/libcpu/i386_disasm.c b/libcpu/i386_disasm.c
413index 832241f..c7a0df0 100644
414--- a/libcpu/i386_disasm.c
415+++ b/libcpu/i386_disasm.c
416@@ -822,6 +822,7 @@ i386_disasm (const uint8_t **startp, const uint8_t *end, GElf_Addr addr,
417
418 default:
419 assert (! "INVALID not handled");
420+ abort ();
421 }
422 }
423 else
424diff --git a/libdw/ChangeLog b/libdw/ChangeLog
425index 487e34a..06c737b 100644
426--- a/libdw/ChangeLog
427+++ b/libdw/ChangeLog
428@@ -889,6 +889,10 @@
429
430 * Makefile.am (known-dwarf.h): Run gawk on config/known-dwarf.awk.
431
432+2011-07-20 Mark Wielaard <mjw@redhat.com>
433+
434+ * dwarf_begin_elf.c: Add fallback for be64toh if not defined.
435+
436 2011-07-14 Mark Wielaard <mjw@redhat.com>
437
438 * libdw.h (dwarf_offdie): Fix documentation to mention .debug_info.
439@@ -1248,6 +1252,10 @@
440
441 * dwarf_hasattr_integrate.c: Integrate DW_AT_specification too.
442
443+2009-08-17 Roland McGrath <roland@redhat.com>
444+
445+ * libdw.h: Disable extern inlines for GCC 4.2.
446+
447 2009-08-10 Roland McGrath <roland@redhat.com>
448
449 * dwarf_getscopevar.c: Use dwarf_diename.
450@@ -2016,6 +2024,11 @@
451
452 2005-05-31 Roland McGrath <roland@redhat.com>
453
454+ * Makefile.am (WEXTRA): New variable, substituted by configure.
455+ (AM_CFLAGS): Use it in place of -Wextra.
456+
457+2005-05-31 Roland McGrath <roland@redhat.com>
458+
459 * dwarf_formref_die.c (dwarf_formref_die): Add CU header offset to
460 formref offset.
461
462diff --git a/libdw/dwarf_begin_elf.c b/libdw/dwarf_begin_elf.c
463index 4e0d590..a6616a1 100644
464--- a/libdw/dwarf_begin_elf.c
465+++ b/libdw/dwarf_begin_elf.c
466@@ -47,6 +47,14 @@
467 #if USE_ZLIB
468 # include <endian.h>
469 # define crc32 loser_crc32
470+# ifndef be64toh
471+# include <byteswap.h>
472+# if __BYTE_ORDER == __LITTLE_ENDIAN
473+# define be64toh(x) bswap_64 (x)
474+# else
475+# define be64toh(x) (x)
476+# endif
477+# endif
478 # include <zlib.h>
479 # undef crc32
480 #endif
481diff --git a/libdw/libdw.h b/libdw/libdw.h
482index 473e1a2..5a511cd 100644
483--- a/libdw/libdw.h
484+++ b/libdw/libdw.h
485@@ -1004,7 +1004,7 @@ extern Dwarf_OOM dwarf_new_oom_handler (Dwarf *dbg, Dwarf_OOM handler);
486
487
488 /* Inline optimizations. */
489-#ifdef __OPTIMIZE__
490+#if defined __OPTIMIZE__ && !(__GNUC__ == 4 && __GNUC_MINOR__ == 2)
491 /* Return attribute code of given attribute. */
492 __libdw_extern_inline unsigned int
493 dwarf_whatattr (Dwarf_Attribute *attr)
494diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog
495index a5253e2..59abfac 100644
496--- a/libdwfl/ChangeLog
497+++ b/libdwfl/ChangeLog
498@@ -704,6 +704,21 @@
499 (dwfl_module_addrsym) (i_to_symfile): New function.
500 (dwfl_module_addrsym) (search_table): Use it.
501
502+2013-11-09 Jan Kratochvil <jan.kratochvil@redhat.com>
503+
504+ Older OS compatibility bits.
505+ * linux-core-attach.c (be64toh, le64toh, be32toh, le32toh): Provide
506+ fallbacks if not defined by system.
507+
508+2013-11-09 Jan Kratochvil <jan.kratochvil@redhat.com>
509+
510+ Handle T-stopped detach for old kernels.
511+ * linux-pid-attach.c (struct pid_arg): New field stopped.
512+ (ptrace_attach): New parameter stoppedp. Set it appropriately.
513+ (pid_set_initial_registers): Pass the new field.
514+ (pid_thread_detach): Handle the case of STOPPED for old kernels.
515+ (__libdwfl_attach_state_for_pid): Initialize STOPPED.
516+
517 2013-11-07 Jan Kratochvil <jan.kratochvil@redhat.com>
518 Mark Wielaard <mjw@redhat.com>
519
520@@ -2469,6 +2484,11 @@
521
522 2005-07-21 Roland McGrath <roland@redhat.com>
523
524+ * Makefile.am (WEXTRA): New variable, substituted by configure.
525+ (AM_CFLAGS): Use it in place of -Wextra.
526+
527+2005-07-21 Roland McGrath <roland@redhat.com>
528+
529 * Makefile.am (noinst_HEADERS): Add loc2c.c.
530
531 * test2.c (main): Check sscanf result to quiet warning.
532diff --git a/libdwfl/linux-core-attach.c b/libdwfl/linux-core-attach.c
533index 5a7b3b3..d05ac7e 100644
534--- a/libdwfl/linux-core-attach.c
535+++ b/libdwfl/linux-core-attach.c
536@@ -29,6 +29,35 @@
537 #include "libdwflP.h"
538 #include <fcntl.h>
539 #include "system.h"
540+#include <endian.h>
541+#include <byteswap.h>
542+#if __BYTE_ORDER == __LITTLE_ENDIAN
543+# ifndef be64toh
544+# define be64toh(x) bswap_64 (x)
545+# endif
546+# ifndef le64toh
547+# define le64toh(x) (x)
548+# endif
549+# ifndef be32toh
550+# define be32toh(x) bswap_32 (x)
551+# endif
552+# ifndef le32toh
553+# define le32toh(x) (x)
554+# endif
555+#else
556+# ifndef be64toh
557+# define be64toh(x) (x)
558+# endif
559+# ifndef le64toh
560+# define le64toh(x) bswap_64 (x)
561+# endif
562+# ifndef be32toh
563+# define be32toh(x) (x)
564+# endif
565+# ifndef le32toh
566+# define le32toh(x) bswap_32 (x)
567+# endif
568+#endif
569
570 #include "../libdw/memory-access.h"
571
572diff --git a/libdwfl/linux-pid-attach.c b/libdwfl/linux-pid-attach.c
573index ae71702..076b2c3 100644
574--- a/libdwfl/linux-pid-attach.c
575+++ b/libdwfl/linux-pid-attach.c
576@@ -255,6 +255,11 @@ void
577 internal_function
578 __libdwfl_ptrace_detach (pid_t tid, bool tid_was_stopped)
579 {
580+ // Older kernels (tested kernel-2.6.18-348.12.1.el5.x86_64) need special
581+ // handling of the detachment to keep the process State: T (stopped).
582+ if (tid_was_stopped)
583+ syscall (__NR_tkill, tid, SIGSTOP);
584+
585 /* This handling is needed only on older Linux kernels such as
586 2.6.32-358.23.2.el6.ppc64. Later kernels such as
587 3.11.7-200.fc19.x86_64 remember the T (stopped) state
588@@ -262,6 +267,15 @@ __libdwfl_ptrace_detach (pid_t tid, bool tid_was_stopped)
589 PTRACE_DETACH. */
590 ptrace (PTRACE_DETACH, tid, NULL,
591 (void *) (intptr_t) (tid_was_stopped ? SIGSTOP : 0));
592+
593+ if (tid_was_stopped)
594+ {
595+ // Wait till the SIGSTOP settles down.
596+ int i;
597+ for (i = 0; i < 100000; i++)
598+ if (linux_proc_pid_is_stopped (tid))
599+ break;
600+ }
601 }
602
603 static void
604diff --git a/libebl/ChangeLog b/libebl/ChangeLog
605index 51ae60f..aee0217 100644
606--- a/libebl/ChangeLog
607+++ b/libebl/ChangeLog
608@@ -780,6 +780,11 @@
609 * Makefile.am (libebl_*_so_SOURCES): Set to $(*_SRCS) so dependency
610 tracking works right.
611
612+2005-05-31 Roland McGrath <roland@redhat.com>
613+
614+ * Makefile.am (WEXTRA): New variable, substituted by configure.
615+ (AM_CFLAGS): Use it in place of -Wextra.
616+
617 2005-05-21 Ulrich Drepper <drepper@redhat.com>
618
619 * libebl_x86_64.map: Add x86_64_core_note.
620diff --git a/libelf/ChangeLog b/libelf/ChangeLog
621index 30017cd..9ca9c73 100644
622--- a/libelf/ChangeLog
623+++ b/libelf/ChangeLog
624@@ -398,6 +398,11 @@
625
626 * elf-knowledge.h (SECTION_STRIP_P): Remove < SHT_NUM check.
627
628+2011-03-10 Roland McGrath <roland@redhat.com>
629+
630+ * gnuhash_xlate.h (elf_cvt_gnuhash): Avoid post-increment in bswap_32
631+ argument, since some implementations are buggy macros.
632+
633 2011-02-26 Mark Wielaard <mjw@redhat.com>
634
635 * elf_end.c (elf_end): Call rwlock_unlock before rwlock_fini.
636@@ -1075,6 +1080,11 @@
637
638 * elf.h: Update from glibc.
639
640+2005-05-31 Roland McGrath <roland@redhat.com>
641+
642+ * Makefile.am (WEXTRA): New variable, substituted by configure.
643+ (AM_CFLAGS): Use it in place of -Wextra.
644+
645 2005-05-08 Roland McGrath <roland@redhat.com>
646
647 * elf_begin.c (read_file) [_MUDFLAP]: Don't use mmap for now.
648diff --git a/libelf/common.h b/libelf/common.h
649index 744f1bb..185ea59 100644
650--- a/libelf/common.h
651+++ b/libelf/common.h
652@@ -139,7 +139,7 @@ libelf_release_all (Elf *elf)
653 (Var) = (sizeof (Var) == 1 \
654 ? (unsigned char) (Var) \
655 : (sizeof (Var) == 2 \
656- ? bswap_16 (Var) \
657+ ? (unsigned short int) bswap_16 (Var) \
658 : (sizeof (Var) == 4 \
659 ? bswap_32 (Var) \
660 : bswap_64 (Var))))
661@@ -148,7 +148,7 @@ libelf_release_all (Elf *elf)
662 (Dst) = (sizeof (Var) == 1 \
663 ? (unsigned char) (Var) \
664 : (sizeof (Var) == 2 \
665- ? bswap_16 (Var) \
666+ ? (unsigned short int) bswap_16 (Var) \
667 : (sizeof (Var) == 4 \
668 ? bswap_32 (Var) \
669 : bswap_64 (Var))))
670diff --git a/libelf/gnuhash_xlate.h b/libelf/gnuhash_xlate.h
671index 04d9ca1..3e25936 100644
672--- a/libelf/gnuhash_xlate.h
673+++ b/libelf/gnuhash_xlate.h
674@@ -1,5 +1,5 @@
675 /* Conversion functions for versioning information.
676- Copyright (C) 2006, 2007 Red Hat, Inc.
677+ Copyright (C) 2006-2011 Red Hat, Inc.
678 This file is part of elfutils.
679 Written by Ulrich Drepper <drepper@redhat.com>, 2006.
680
681@@ -69,7 +69,9 @@ elf_cvt_gnuhash (void *dest, const void *src, size_t len, int encode)
682 dest32 = (Elf32_Word *) &dest64[bitmask_words];
683 while (len >= 4)
684 {
685- *dest32++ = bswap_32 (*src32++);
686+ *dest32 = bswap_32 (*src32);
687+ ++dest32;
688+ ++src32;
689 len -= 4;
690 }
691 }
692diff --git a/src/ChangeLog b/src/ChangeLog
693index 15e6fae..78535c8 100644
694--- a/src/ChangeLog
695+++ b/src/ChangeLog
696@@ -1598,8 +1598,16 @@
697 * readelf.c (attr_callback): Use print_block only when we don't use
698 print_ops.
699
700+2009-08-17 Roland McGrath <roland@redhat.com>
701+
702+ * ld.h: Disable extern inlines for GCC 4.2.
703+
704 2009-08-14 Roland McGrath <roland@redhat.com>
705
706+ * strings.c (read_block): Conditionalize posix_fadvise use
707+ on [POSIX_FADV_SEQUENTIAL].
708+ From Petr Salinger <Petr.Salinger@seznam.cz>.
709+
710 * ar.c (do_oper_extract): Use pathconf instead of statfs.
711
712 2009-08-01 Ulrich Drepper <drepper@redhat.com>
713@@ -1763,6 +1771,8 @@
714 * readelf.c (print_debug_frame_section): Use t instead of j formats
715 for ptrdiff_t OFFSET.
716
717+ * addr2line.c (handle_address): Use %a instead of %m for compatibility.
718+
719 2009-01-21 Ulrich Drepper <drepper@redhat.com>
720
721 * elflint.c (check_program_header): Fix typo in .eh_frame_hdr section
722@@ -1946,6 +1956,11 @@
723 that matches its PT_LOAD's p_flags &~ PF_W. On sparc, PF_X really
724 is valid in RELRO.
725
726+2008-03-01 Roland McGrath <roland@redhat.com>
727+
728+ * readelf.c (dump_archive_index): Tweak portability hack
729+ to match [__GNUC__ < 4] too.
730+
731 2008-02-29 Roland McGrath <roland@redhat.com>
732
733 * readelf.c (print_attributes): Add a cast.
734@@ -2197,6 +2212,8 @@
735
736 * readelf.c (hex_dump): Fix rounding error in whitespace calculation.
737
738+ * Makefile.am (readelf_no_Werror): New variable.
739+
740 2007-10-15 Roland McGrath <roland@redhat.com>
741
742 * make-debug-archive.in: New file.
743@@ -2636,6 +2653,10 @@
744 * elflint.c (valid_e_machine): Add EM_ALPHA.
745 Reported by Christian Aichinger <Greek0@gmx.net>.
746
747+ * strings.c (map_file): Define POSIX_MADV_SEQUENTIAL to
748+ MADV_SEQUENTIAL if undefined. Don't call posix_madvise
749+ if neither is defined.
750+
751 2006-08-08 Ulrich Drepper <drepper@redhat.com>
752
753 * elflint.c (check_dynamic): Don't require DT_HASH for DT_SYMTAB.
754@@ -2712,6 +2733,10 @@
755 * Makefile.am: Add hacks to create dependency files for non-generic
756 linker.
757
758+2006-04-05 Roland McGrath <roland@redhat.com>
759+
760+ * strings.c (MAP_POPULATE): Define to 0 if undefined.
761+
762 2006-06-12 Ulrich Drepper <drepper@redhat.com>
763
764 * ldgeneric.c (ld_generic_generate_sections): Don't create .interp
765@@ -3060,6 +3085,11 @@
766 * readelf.c (print_debug_loc_section): Fix indentation for larger
767 address size.
768
769+2005-05-31 Roland McGrath <roland@redhat.com>
770+
771+ * Makefile.am (WEXTRA): New variable, substituted by configure.
772+ (AM_CFLAGS): Use it in place of -Wextra.
773+
774 2005-05-30 Roland McGrath <roland@redhat.com>
775
776 * readelf.c (print_debug_line_section): Print section offset of each
777diff --git a/src/Makefile.am b/src/Makefile.am
778index dbac3eb..9028aa1 100644
779--- a/src/Makefile.am
780+++ b/src/Makefile.am
781@@ -90,6 +90,11 @@ endif
782 ldgeneric_no_Wunused = yes
783 ldgeneric_no_Wstack_usage = yes
784
785+# Buggy old compilers or libc headers.
786+readelf_no_Werror = yes
787+strings_no_Werror = yes
788+addr2line_no_Wformat = yes
789+
790 # Bad, bad stack usage...
791 readelf_no_Wstack_usage = yes
792 nm_no_Wstack_usage = yes
793diff --git a/src/addr2line.c b/src/addr2line.c
794index 0ce854f..d2d0c8c 100644
795--- a/src/addr2line.c
796+++ b/src/addr2line.c
797@@ -622,10 +622,10 @@ handle_address (const char *string, Dwfl *dwfl)
798 bool parsed = false;
799 int i, j;
800 char *name = NULL;
801- if (sscanf (string, "(%m[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
802+ if (sscanf (string, "(%a[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
803 && string[i] == '\0')
804 parsed = adjust_to_section (name, &addr, dwfl);
805- switch (sscanf (string, "%m[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
806+ switch (sscanf (string, "%a[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
807 {
808 default:
809 break;
810diff --git a/src/findtextrel.c b/src/findtextrel.c
811index 264a06b..d7de202 100644
812--- a/src/findtextrel.c
813+++ b/src/findtextrel.c
814@@ -502,7 +502,11 @@ ptrcompare (const void *p1, const void *p2)
815
816
817 static void
818-check_rel (size_t nsegments, struct segments segments[nsegments],
819+check_rel (size_t nsegments, struct segments segments[
820+#if __GNUC__ >= 4
821+ nsegments
822+#endif
823+ ],
824 GElf_Addr addr, Elf *elf, Elf_Scn *symscn, Dwarf *dw,
825 const char *fname, bool more_than_one, void **knownsrcs)
826 {
827diff --git a/src/ld.h b/src/ld.h
828index 29f4031..8695c31 100644
829--- a/src/ld.h
830+++ b/src/ld.h
831@@ -1114,6 +1114,7 @@ extern bool dynamically_linked_p (void);
832
833 /* Checked whether the symbol is undefined and referenced from a DSO. */
834 extern bool linked_from_dso_p (struct scninfo *scninfo, size_t symidx);
835+#if defined __OPTIMIZE__ && !(__GNUC__ == 4 && __GNUC_MINOR__ == 2)
836 #ifdef __GNUC_STDC_INLINE__
837 __attribute__ ((__gnu_inline__))
838 #endif
839@@ -1131,5 +1132,6 @@ linked_from_dso_p (struct scninfo *scninfo, size_t symidx)
840
841 return sym->defined && sym->in_dso;
842 }
843+#endif /* Optimizing and not GCC 4.2. */
844
845 #endif /* ld.h */
846diff --git a/src/readelf.c b/src/readelf.c
847index b4cb3a8..606d220 100644
848--- a/src/readelf.c
849+++ b/src/readelf.c
850@@ -4364,10 +4364,12 @@ listptr_base (struct listptr *p)
851 return base;
852 }
853
854+static const char *listptr_name;
855+
856 static int
857-compare_listptr (const void *a, const void *b, void *arg)
858+compare_listptr (const void *a, const void *b)
859 {
860- const char *name = arg;
861+ const char *const name = listptr_name;
862 struct listptr *p1 = (void *) a;
863 struct listptr *p2 = (void *) b;
864
865@@ -4463,8 +4465,11 @@ static void
866 sort_listptr (struct listptr_table *table, const char *name)
867 {
868 if (table->n > 0)
869- qsort_r (table->table, table->n, sizeof table->table[0],
870- &compare_listptr, (void *) name);
871+ {
872+ listptr_name = name;
873+ qsort (table->table, table->n, sizeof table->table[0],
874+ &compare_listptr);
875+ }
876 }
877
878 static bool
879@@ -9561,7 +9566,7 @@ dump_archive_index (Elf *elf, const char *fname)
880 if (unlikely (elf_rand (elf, as_off) == 0)
881 || unlikely ((subelf = elf_begin (-1, ELF_C_READ_MMAP, elf))
882 == NULL))
883-#if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 7)
884+#if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 7) || __GNUC__ < 4
885 while (1)
886 #endif
887 error (EXIT_FAILURE, 0,
888diff --git a/src/strings.c b/src/strings.c
889index b2bce7b..fe0ab6c 100644
890--- a/src/strings.c
891+++ b/src/strings.c
892@@ -43,6 +43,10 @@
893
894 #include <system.h>
895
896+#ifndef MAP_POPULATE
897+# define MAP_POPULATE 0
898+#endif
899+
900
901 /* Prototypes of local functions. */
902 static int read_fd (int fd, const char *fname, off64_t fdlen);
903@@ -489,8 +493,13 @@ map_file (int fd, off64_t start_off, off64_t fdlen, size_t *map_sizep)
904 fd, start_off);
905 if (mem != MAP_FAILED)
906 {
907+#if !defined POSIX_MADV_SEQUENTIAL && defined MADV_SEQUENTIAL
908+# define POSIX_MADV_SEQUENTIAL MADV_SEQUENTIAL
909+#endif
910+#ifdef POSIX_MADV_SEQUENTIAL
911 /* We will go through the mapping sequentially. */
912 (void) posix_madvise (mem, map_size, POSIX_MADV_SEQUENTIAL);
913+#endif
914 break;
915 }
916 if (errno != EINVAL && errno != ENOMEM)
917@@ -581,9 +590,11 @@ read_block (int fd, const char *fname, off64_t fdlen, off64_t from, off64_t to)
918 elfmap_off = from & ~(ps - 1);
919 elfmap_base = elfmap = map_file (fd, elfmap_off, fdlen, &elfmap_size);
920
921+#ifdef POSIX_FADV_SEQUENTIAL
922 if (unlikely (elfmap == MAP_FAILED))
923 /* Let the kernel know we are going to read everything in sequence. */
924 (void) posix_fadvise (fd, 0, 0, POSIX_FADV_SEQUENTIAL);
925+#endif
926 }
927
928 if (unlikely (elfmap == MAP_FAILED))
929diff --git a/src/strip.c b/src/strip.c
930index 5e69334..8bd1790 100644
931--- a/src/strip.c
932+++ b/src/strip.c
933@@ -44,6 +44,12 @@
934 #include <libebl.h>
935 #include <system.h>
936
937+#ifdef HAVE_FUTIMES
938+# define FUTIMES(fd, fname, tvp) futimes (fd, tvp)
939+#else
940+# define FUTIMES(fd, fname, tvp) utimes (fname, tvp)
941+#endif
942+
943 typedef uint8_t GElf_Byte;
944
945 /* Name and version of program. */
946diff --git a/tests/ChangeLog b/tests/ChangeLog
947index 19878ac..6815028 100644
948--- a/tests/ChangeLog
949+++ b/tests/ChangeLog
950@@ -609,6 +609,13 @@
951
952 2013-12-02 Jan Kratochvil <jan.kratochvil@redhat.com>
953
954+ Handle T-stopped detach for old kernels.
955+ * backtrace.c: Include sys/syscall.h.
956+ (linux_proc_pid_is_stopped): New function.
957+ (ptrace_detach_stopped): Handle old kernels.
958+
959+2013-12-02 Jan Kratochvil <jan.kratochvil@redhat.com>
960+
961 * Makefile.am (check_PROGRAMS): Add backtrace, backtrace-child,
962 backtrace-data and backtrace-dwarf.
963 (BUILT_SOURCES, clean-local, backtrace-child-biarch): New.
964@@ -1473,6 +1480,8 @@
965
966 2008-01-21 Roland McGrath <roland@redhat.com>
967
968+ * line2addr.c (main): Revert last change.
969+
970 * testfile45.S.bz2: Add tests for cltq, cqto.
971 * testfile45.expect.bz2: Adjust.
972
973@@ -2181,6 +2190,11 @@
974 * Makefile.am (TESTS): Add run-elflint-test.sh.
975 (EXTRA_DIST): Add run-elflint-test.sh and testfile18.bz2.
976
977+2005-05-31 Roland McGrath <roland@redhat.com>
978+
979+ * Makefile.am (WEXTRA): New variable, substituted by configure.
980+ (AM_CFLAGS): Use it in place of -Wextra.
981+
982 2005-05-24 Ulrich Drepper <drepper@redhat.com>
983
984 * get-files.c (main): Use correct format specifier.
985diff --git a/tests/Makefile.am b/tests/Makefile.am
986index 425f8cd..69760a4 100644
987--- a/tests/Makefile.am
988+++ b/tests/Makefile.am
989@@ -382,6 +382,7 @@ get_lines_LDADD = $(libdw) $(libelf)
990 get_files_LDADD = $(libdw) $(libelf)
991 get_aranges_LDADD = $(libdw) $(libelf)
992 allfcts_LDADD = $(libdw) $(libelf)
993+line2addr_no_Wformat = yes
994 line2addr_LDADD = $(libdw) $(argp_LDADD)
995 addrscopes_LDADD = $(libdw) $(argp_LDADD)
996 funcscopes_LDADD = $(libdw) $(argp_LDADD)
997diff --git a/tests/backtrace.c b/tests/backtrace.c
998index abd56ab..6a7c661 100644
999--- a/tests/backtrace.c
1000+++ b/tests/backtrace.c
1001@@ -36,6 +36,7 @@
1002 #include <fcntl.h>
1003 #include <string.h>
1004 #include <argp.h>
1005+#include <sys/syscall.h>
1006 #include ELFUTILS_HEADER(dwfl)
1007
1008 #ifndef __linux__
1009diff --git a/tests/line2addr.c b/tests/line2addr.c
1010index e0d65d3..7c171b9 100644
1011--- a/tests/line2addr.c
1012+++ b/tests/line2addr.c
1013@@ -124,7 +124,7 @@ main (int argc, char *argv[])
1014 {
1015 struct args a = { .arg = argv[cnt] };
1016
1017- switch (sscanf (a.arg, "%m[^:]:%d", &a.file, &a.line))
1018+ switch (sscanf (a.arg, "%a[^:]:%d", &a.file, &a.line))
1019 {
1020 default:
1021 case 0:
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.163/scanf-format.patch b/meta/recipes-devtools/elfutils/elfutils-0.163/scanf-format.patch
deleted file mode 100644
index c08519cf53..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.163/scanf-format.patch
+++ /dev/null
@@ -1,40 +0,0 @@
1From: Kurt Roeckx <kurt@roeckx.be>
2Subject: Use %m[ instead of %a[ in scanf()
3
4%a was a gnu extention, but C99 made this a float. So it got
5changed to %m (supported by glibc 2.7), but %a[ and %as are
6still supported by glibc. The portability branch changed this
7from %m to %a again since that's supported by more versions of
8glibc. However gcc gives a warning about this using -Wformat
9and we have a new enough libc to use %m.
10
11Index: elfutils-0.153/src/addr2line.c
12===================================================================
13--- elfutils-0.153.orig/src/addr2line.c 2012-02-24 22:29:50.000000000 +0000
14+++ elfutils-0.153/src/addr2line.c 2012-02-24 22:29:52.000000000 +0000
15@@ -455,10 +455,10 @@
16 bool parsed = false;
17 int i, j;
18 char *name = NULL;
19- if (sscanf (string, "(%a[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
20+ if (sscanf (string, "(%m[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
21 && string[i] == '\0')
22 parsed = adjust_to_section (name, &addr, dwfl);
23- switch (sscanf (string, "%a[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
24+ switch (sscanf (string, "%m[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
25 {
26 default:
27 break;
28Index: elfutils-0.153/tests/line2addr.c
29===================================================================
30--- elfutils-0.153.orig/tests/line2addr.c 2012-02-24 22:29:50.000000000 +0000
31+++ elfutils-0.153/tests/line2addr.c 2012-02-24 22:29:52.000000000 +0000
32@@ -132,7 +132,7 @@
33 {
34 struct args a = { .arg = argv[cnt] };
35
36- switch (sscanf (a.arg, "%a[^:]:%d", &a.file, &a.line))
37+ switch (sscanf (a.arg, "%m[^:]:%d", &a.file, &a.line))
38 {
39 default:
40 case 0:
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.163/uclibc-support-for-elfutils-0.161.patch b/meta/recipes-devtools/elfutils/elfutils-0.163/uclibc-support-for-elfutils-0.161.patch
deleted file mode 100644
index f1533bfd38..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.163/uclibc-support-for-elfutils-0.161.patch
+++ /dev/null
@@ -1,106 +0,0 @@
1From 3daec2dd11a04955f95e8f65a48820103d84dbec Mon Sep 17 00:00:00 2001
2From: Junling Zheng <zhengjunling@huawei.com>
3Date: Thu, 9 Apr 2015 12:12:49 +0000
4Subject: [PATCH] uclibc support for elfutils 0.161
5
6on uclibc systems libintl and libuargp are separate from libc.
7so they need to be specified on commandline when we use proxy-libintl
8then libintl is a static archive so it should be listed last since
9elfutils does not respect disable-nls we need to link in libintl
10
11We add a new option --enable-uclibc which will be used to control
12the uclibc specific configurations during build.
13
14Upstream-Status: Inappropriate [uclibc specific]
15
16Signed-off-by: Khem Raj <raj.khem>
17Signed-off-by: Junling Zheng <zhengjunling@huawei.com>
18[Junling Zheng:
19 - adjust context
20]
21---
22 configure.ac | 8 ++++++++
23 libcpu/Makefile.am | 4 ++++
24 libdw/Makefile.am | 7 ++++++-
25 libelf/Makefile.am | 5 +++++
26 4 files changed, 23 insertions(+), 1 deletion(-)
27
28diff --git a/configure.ac b/configure.ac
29index a1ad6db..81fc33f 100644
30--- a/configure.ac
31+++ b/configure.ac
32@@ -70,6 +70,14 @@ AS_IF([test "$use_locks" = yes],
33
34 AH_TEMPLATE([USE_LOCKS], [Defined if libraries should be thread-safe.])
35
36+AC_ARG_ENABLE([uclibc],
37+AS_HELP_STRING([--enable-uclibc], [Use uclibc for system libraries]),
38+use_uclibc=yes, use_uclibc=no)
39+AM_CONDITIONAL(USE_UCLIBC, test "$use_uclibc" = yes)
40+AS_IF([test "$use_uclibc" = yes], [AC_DEFINE(USE_UCLIBC)])
41+
42+AH_TEMPLATE([USE_UCLIBC], [Defined if uclibc libraries are used.])
43+
44 AC_PROG_CC
45 AC_PROG_RANLIB
46 AC_PROG_YACC
47diff --git a/libcpu/Makefile.am b/libcpu/Makefile.am
48index 3beccf3..9ba6c04 100644
49--- a/libcpu/Makefile.am
50+++ b/libcpu/Makefile.am
51@@ -80,6 +80,10 @@ i386_parse_CFLAGS = -DNMNES="`wc -l < i386.mnemonics`"
52 i386_lex.o: i386_parse.h
53 i386_gendis_LDADD = $(libeu) -lm
54
55+if USE_UCLIBC
56+i386_gendis_LDADD += -luargp -lintl
57+endif
58+
59 i386_parse.h: i386_parse.c ;
60
61 EXTRA_DIST = defs/i386
62diff --git a/libdw/Makefile.am b/libdw/Makefile.am
63index 887da6b..d31b428 100644
64--- a/libdw/Makefile.am
65+++ b/libdw/Makefile.am
66@@ -102,6 +102,11 @@ endif
67 libdw_pic_a_SOURCES =
68 am_libdw_pic_a_OBJECTS = $(libdw_a_SOURCES:.c=.os)
69
70+libdw_so_LDLIBS =
71+if USE_UCLIBC
72+libdw_so_LDLIBS += -lintl -luargp
73+endif
74+
75 libdw_so_SOURCES =
76 libdw.so$(EXEEXT): $(srcdir)/libdw.map libdw_pic.a ../libdwelf/libdwelf_pic.a \
77 ../libdwfl/libdwfl_pic.a ../libebl/libebl.a \
78@@ -112,7 +117,7 @@ libdw.so$(EXEEXT): $(srcdir)/libdw.map libdw_pic.a ../libdwelf/libdwelf_pic.a \
79 -Wl,--enable-new-dtags,-rpath,$(pkglibdir) \
80 -Wl,--version-script,$<,--no-undefined \
81 -Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive\
82- -ldl $(zip_LIBS)
83+ -ldl $(zip_LIBS) $(libdw_so_LDLIBS)
84 @$(textrel_check)
85 ln -fs $@ $@.$(VERSION)
86
87diff --git a/libelf/Makefile.am b/libelf/Makefile.am
88index afcb2aa..02836a1 100644
89--- a/libelf/Makefile.am
90+++ b/libelf/Makefile.am
91@@ -93,7 +93,12 @@ libelf_a_SOURCES = elf_version.c elf_hash.c elf_error.c elf_fill.c \
92 libelf_pic_a_SOURCES =
93 am_libelf_pic_a_OBJECTS = $(libelf_a_SOURCES:.c=.os)
94
95+
96 libelf_so_LDLIBS =
97+if USE_UCLIBC
98+libelf_so_LDLIBS += -lintl -luargp
99+endif
100+
101 if USE_LOCKS
102 libelf_so_LDLIBS += -lpthread
103 endif
104--
1051.8.3.4
106
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.164/0001-Ignore-differences-between-mips-machine-identifiers.patch b/meta/recipes-devtools/elfutils/elfutils-0.164/0001-Ignore-differences-between-mips-machine-identifiers.patch
new file mode 100644
index 0000000000..3f110f98fc
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.164/0001-Ignore-differences-between-mips-machine-identifiers.patch
@@ -0,0 +1,34 @@
1From 77cb4a53c270d5854d3af24f19547bc3de825233 Mon Sep 17 00:00:00 2001
2From: James Cowgill <james410@cowgill.org.uk>
3Date: Mon, 5 Jan 2015 15:16:58 +0000
4Subject: [PATCH 1/3] Ignore differences between mips machine identifiers
5
6Little endian binaries actually use EM_MIPS so you can't tell the endianness
7from the elf machine id. Also, the EM_MIPS_RS3_LE machine is dead anyway (the
8kernel will not load binaries containing it).
9
10Signed-off-by: James Cowgill <james410@cowgill.org.uk>
11---
12 backends/mips_init.c | 6 +-----
13 1 file changed, 1 insertion(+), 5 deletions(-)
14
15diff --git a/backends/mips_init.c b/backends/mips_init.c
16index 7429a89..d10e940 100644
17--- a/backends/mips_init.c
18+++ b/backends/mips_init.c
19@@ -46,11 +46,7 @@ mips_init (elf, machine, eh, ehlen)
20 return NULL;
21
22 /* We handle it. */
23- if (machine == EM_MIPS)
24- eh->name = "MIPS R3000 big-endian";
25- else if (machine == EM_MIPS_RS3_LE)
26- eh->name = "MIPS R3000 little-endian";
27-
28+ eh->name = "MIPS";
29 mips_init_reloc (eh);
30 HOOK (eh, reloc_simple_type);
31 HOOK (eh, return_value_location);
32--
332.1.4
34
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.163/0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch b/meta/recipes-devtools/elfutils/elfutils-0.164/0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch
index 3754c1c361..3754c1c361 100644
--- a/meta/recipes-devtools/elfutils/elfutils-0.163/0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch
+++ b/meta/recipes-devtools/elfutils/elfutils-0.164/0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.163/0001-fix-a-stack-usage-warning.patch b/meta/recipes-devtools/elfutils/elfutils-0.164/0001-fix-a-stack-usage-warning.patch
index 6923bf7053..6923bf7053 100644
--- a/meta/recipes-devtools/elfutils/elfutils-0.163/0001-fix-a-stack-usage-warning.patch
+++ b/meta/recipes-devtools/elfutils/elfutils-0.164/0001-fix-a-stack-usage-warning.patch
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.163/0001-remove-the-unneed-checking.patch b/meta/recipes-devtools/elfutils/elfutils-0.164/0001-remove-the-unneed-checking.patch
index 5be92d705a..5be92d705a 100644
--- a/meta/recipes-devtools/elfutils/elfutils-0.163/0001-remove-the-unneed-checking.patch
+++ b/meta/recipes-devtools/elfutils/elfutils-0.164/0001-remove-the-unneed-checking.patch
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.164/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch b/meta/recipes-devtools/elfutils/elfutils-0.164/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch
new file mode 100644
index 0000000000..72125c9ff0
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.164/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch
@@ -0,0 +1,168 @@
1From fdaab18a65ed2529656baa64cb6169f34d7e507b Mon Sep 17 00:00:00 2001
2From: James Cowgill <james410@cowgill.org.uk>
3Date: Mon, 5 Jan 2015 15:17:01 +0000
4Subject: [PATCH 2/3] Add support for mips64 abis in mips_retval.c
5
6Signed-off-by: James Cowgill <james410@cowgill.org.uk>
7---
8 backends/mips_retval.c | 104 ++++++++++++++++++++++++++++++++++++++++++++-----
9 1 file changed, 94 insertions(+), 10 deletions(-)
10
11diff --git a/backends/mips_retval.c b/backends/mips_retval.c
12index 33f12a7..d5c6ef0 100644
13--- a/backends/mips_retval.c
14+++ b/backends/mips_retval.c
15@@ -91,6 +91,8 @@ enum mips_abi find_mips_abi(Elf *elf)
16 default:
17 if ((elf_flags & EF_MIPS_ABI2))
18 return MIPS_ABI_N32;
19+ else if ((ehdr->e_ident[EI_CLASS] == ELFCLASS64))
20+ return MIPS_ABI_N64;
21 }
22
23 /* GCC creates a pseudo-section whose name describes the ABI. */
24@@ -195,6 +197,57 @@ static const Dwarf_Op loc_aggregate[] =
25 };
26 #define nloc_aggregate 1
27
28+/* Test if a struct member is a float */
29+static int is_float_child(Dwarf_Die *childdie)
30+{
31+ /* Test if this is actually a struct member */
32+ if (dwarf_tag(childdie) != DW_TAG_member)
33+ return 0;
34+
35+ /* Get type of member */
36+ Dwarf_Attribute attr_mem;
37+ Dwarf_Die child_type_mem;
38+ Dwarf_Die *child_typedie =
39+ dwarf_formref_die(dwarf_attr_integrate(childdie,
40+ DW_AT_type,
41+ &attr_mem), &child_type_mem);
42+
43+ if (dwarf_tag(child_typedie) != DW_TAG_base_type)
44+ return 0;
45+
46+ /* Get base subtype */
47+ Dwarf_Word encoding;
48+ if (dwarf_formudata (dwarf_attr_integrate (child_typedie,
49+ DW_AT_encoding,
50+ &attr_mem), &encoding) != 0)
51+ return 0;
52+
53+ return encoding == DW_ATE_float;
54+}
55+
56+/* Returns the number of fpregs which can be returned in the given struct */
57+static int get_struct_fpregs(Dwarf_Die *structtypedie)
58+{
59+ Dwarf_Die child_mem;
60+ int fpregs = 0;
61+
62+ /* Get first structure member */
63+ if (dwarf_child(structtypedie, &child_mem) != 0)
64+ return 0;
65+
66+ do
67+ {
68+ /* Ensure this register is a float */
69+ if (!is_float_child(&child_mem))
70+ return 0;
71+
72+ fpregs++;
73+ }
74+ while (dwarf_siblingof (&child_mem, &child_mem) == 0);
75+
76+ return fpregs;
77+}
78+
79 int
80 mips_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
81 {
82@@ -240,6 +293,7 @@ mips_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
83 tag = dwarf_tag (typedie);
84 }
85
86+ Dwarf_Word size;
87 switch (tag)
88 {
89 case -1:
90@@ -258,8 +312,6 @@ mips_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
91 case DW_TAG_enumeration_type:
92 case DW_TAG_pointer_type:
93 case DW_TAG_ptr_to_member_type:
94- {
95- Dwarf_Word size;
96 if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_byte_size,
97 &attr_mem), &size) != 0)
98 {
99@@ -289,7 +341,7 @@ mips_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
100 if (size <= 4*regsize && abi == MIPS_ABI_O32)
101 return nloc_fpregquad;
102
103- goto aggregate;
104+ goto large;
105 }
106 }
107 *locp = ABI_LOC(loc_intreg, regsize);
108@@ -298,18 +350,50 @@ mips_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
109 if (size <= 2*regsize)
110 return nloc_intregpair;
111
112- /* Else fall through. Shouldn't happen though (at least with gcc) */
113- }
114+ /* Else pass in memory. Shouldn't happen though (at least with gcc) */
115+ goto large;
116
117 case DW_TAG_structure_type:
118 case DW_TAG_class_type:
119 case DW_TAG_union_type:
120- case DW_TAG_array_type:
121- aggregate:
122- /* XXX TODO: Can't handle structure return with other ABI's yet :-/ */
123- if ((abi != MIPS_ABI_O32) && (abi != MIPS_ABI_O64))
124- return -2;
125+ /* Handle special cases for structures <= 128 bytes in newer ABIs */
126+ if (abi == MIPS_ABI_EABI32 || abi == MIPS_ABI_EABI64 ||
127+ abi == MIPS_ABI_N32 || abi == MIPS_ABI_N64)
128+ {
129+ if (dwarf_aggregate_size (typedie, &size) == 0 && size <= 16)
130+ {
131+ /*
132+ * Special case in N64 / N32 -
133+ * structures containing only floats are returned in fp regs.
134+ * Everything else is returned in integer regs.
135+ */
136+ if (tag != DW_TAG_union_type &&
137+ (abi == MIPS_ABI_N32 || abi == MIPS_ABI_N64))
138+ {
139+ int num_fpregs = get_struct_fpregs(typedie);
140+ if (num_fpregs == 1 || num_fpregs == 2)
141+ {
142+ *locp = loc_fpreg;
143+ if (num_fpregs == 1)
144+ return nloc_fpreg;
145+ else
146+ return nloc_fpregpair;
147+ }
148+ }
149+
150+ *locp = loc_intreg;
151+ if (size <= 8)
152+ return nloc_intreg;
153+ else
154+ return nloc_intregpair;
155+ }
156+ }
157+
158+ /* Fallthrough to handle large types */
159
160+ case DW_TAG_array_type:
161+ large:
162+ /* Return large structures in memory */
163 *locp = loc_aggregate;
164 return nloc_aggregate;
165 }
166--
1672.1.4
168
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.164/0003-Add-mips-n64-relocation-format-hack.patch b/meta/recipes-devtools/elfutils/elfutils-0.164/0003-Add-mips-n64-relocation-format-hack.patch
new file mode 100644
index 0000000000..14b7985ce8
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.164/0003-Add-mips-n64-relocation-format-hack.patch
@@ -0,0 +1,226 @@
1From 59d4b8c48e5040af7e02b34eb26ea602ec82a38e Mon Sep 17 00:00:00 2001
2From: James Cowgill <james410@cowgill.org.uk>
3Date: Mon, 5 Jan 2015 15:17:02 +0000
4Subject: [PATCH 3/3] Add mips n64 relocation format hack
5
6MIPSEL N64 ELF files use a slightly different format for storing relocation
7entries which is incompatible with the normal R_SYM / R_INFO macros.
8To workaround this, we rearrange the bytes in the relocation's r_info field
9when reading and writing the relocations.
10
11This patch also ensures that strip.c sets the correct value of e_machine
12before manipulating relocations so that these changes take effect.
13
14Signed-off-by: James Cowgill <james410@cowgill.org.uk>
15---
16 libelf/gelf_getrel.c | 25 +++++++++++++++++++++++--
17 libelf/gelf_getrela.c | 25 +++++++++++++++++++++++--
18 libelf/gelf_update_rel.c | 20 +++++++++++++++++++-
19 libelf/gelf_update_rela.c | 20 +++++++++++++++++++-
20 src/strip.c | 17 +++++++++++++++++
21 5 files changed, 101 insertions(+), 6 deletions(-)
22
23Index: elfutils-0.164/libelf/gelf_getrel.c
24===================================================================
25--- elfutils-0.164.orig/libelf/gelf_getrel.c
26+++ elfutils-0.164/libelf/gelf_getrel.c
27@@ -36,6 +36,7 @@
28
29 #include "libelfP.h"
30
31+#define EF_MIPS_ABI 0x0000F000
32
33 GElf_Rel *
34 gelf_getrel (Elf_Data *data, int ndx, GElf_Rel *dst)
35@@ -89,8 +90,28 @@ gelf_getrel (Elf_Data *data, int ndx, GE
36 result = NULL;
37 }
38 else
39- result = memcpy (dst, &((Elf64_Rel *) data_scn->d.d_buf)[ndx],
40- sizeof (Elf64_Rel));
41+ {
42+ GElf_Ehdr hdr;
43+ result = memcpy (dst, &((Elf64_Rel *) data_scn->d.d_buf)[ndx],
44+ sizeof (Elf64_Rel));
45+
46+ if (gelf_getehdr(scn->elf, &hdr) != NULL &&
47+ hdr.e_ident[EI_DATA] == ELFDATA2LSB &&
48+ hdr.e_machine == EM_MIPS &&
49+ (hdr.e_flags & EF_MIPS_ABI) == 0)
50+ {
51+ /*
52+ * The relocation format is mangled on MIPSEL N64
53+ * We'll adjust it so at least R_SYM will work on it
54+ */
55+ GElf_Xword r_info = dst->r_info;
56+ dst->r_info = (r_info << 32) |
57+ ((r_info >> 8) & 0xFF000000) |
58+ ((r_info >> 24) & 0x00FF0000) |
59+ ((r_info >> 40) & 0x0000FF00) |
60+ ((r_info >> 56) & 0x000000FF);
61+ }
62+ }
63 }
64
65 rwlock_unlock (scn->elf->lock);
66Index: elfutils-0.164/libelf/gelf_getrela.c
67===================================================================
68--- elfutils-0.164.orig/libelf/gelf_getrela.c
69+++ elfutils-0.164/libelf/gelf_getrela.c
70@@ -36,6 +36,7 @@
71
72 #include "libelfP.h"
73
74+#define EF_MIPS_ABI 0x0000F000
75
76 GElf_Rela *
77 gelf_getrela (Elf_Data *data, int ndx, GElf_Rela *dst)
78@@ -90,8 +91,28 @@ gelf_getrela (Elf_Data *data, int ndx, G
79 result = NULL;
80 }
81 else
82- result = memcpy (dst, &((Elf64_Rela *) data_scn->d.d_buf)[ndx],
83- sizeof (Elf64_Rela));
84+ {
85+ GElf_Ehdr hdr;
86+ result = memcpy (dst, &((Elf64_Rela *) data_scn->d.d_buf)[ndx],
87+ sizeof (Elf64_Rela));
88+
89+ if (gelf_getehdr(scn->elf, &hdr) != NULL &&
90+ hdr.e_ident[EI_DATA] == ELFDATA2LSB &&
91+ hdr.e_machine == EM_MIPS &&
92+ (hdr.e_flags & EF_MIPS_ABI) == 0)
93+ {
94+ /*
95+ * The relocation format is mangled on MIPSEL N64
96+ * We'll adjust it so at least R_SYM will work on it
97+ */
98+ GElf_Xword r_info = dst->r_info;
99+ dst->r_info = (r_info << 32) |
100+ ((r_info >> 8) & 0xFF000000) |
101+ ((r_info >> 24) & 0x00FF0000) |
102+ ((r_info >> 40) & 0x0000FF00) |
103+ ((r_info >> 56) & 0x000000FF);
104+ }
105+ }
106 }
107
108 rwlock_unlock (scn->elf->lock);
109Index: elfutils-0.164/libelf/gelf_update_rel.c
110===================================================================
111--- elfutils-0.164.orig/libelf/gelf_update_rel.c
112+++ elfutils-0.164/libelf/gelf_update_rel.c
113@@ -36,6 +36,7 @@
114
115 #include "libelfP.h"
116
117+#define EF_MIPS_ABI 0x0000F000
118
119 int
120 gelf_update_rel (Elf_Data *dst, int ndx, GElf_Rel *src)
121@@ -86,6 +87,9 @@ gelf_update_rel (Elf_Data *dst, int ndx,
122 }
123 else
124 {
125+ GElf_Ehdr hdr;
126+ GElf_Rel value = *src;
127+
128 /* Check whether we have to resize the data buffer. */
129 if (INVALID_NDX (ndx, Elf64_Rel, &data_scn->d))
130 {
131@@ -93,7 +97,21 @@ gelf_update_rel (Elf_Data *dst, int ndx,
132 goto out;
133 }
134
135- ((Elf64_Rel *) data_scn->d.d_buf)[ndx] = *src;
136+ if (gelf_getehdr(scn->elf, &hdr) != NULL &&
137+ hdr.e_ident[EI_DATA] == ELFDATA2LSB &&
138+ hdr.e_machine == EM_MIPS &&
139+ (hdr.e_flags & EF_MIPS_ABI) == 0)
140+ {
141+ /* Undo the MIPSEL N64 hack from gelf_getrel */
142+ GElf_Xword r_info = value.r_info;
143+ value.r_info = (r_info >> 32) |
144+ ((r_info << 8) & 0x000000FF00000000) |
145+ ((r_info << 24) & 0x0000FF0000000000) |
146+ ((r_info << 40) & 0x00FF000000000000) |
147+ ((r_info << 56) & 0xFF00000000000000);
148+ }
149+
150+ ((Elf64_Rel *) data_scn->d.d_buf)[ndx] = value;
151 }
152
153 result = 1;
154Index: elfutils-0.164/libelf/gelf_update_rela.c
155===================================================================
156--- elfutils-0.164.orig/libelf/gelf_update_rela.c
157+++ elfutils-0.164/libelf/gelf_update_rela.c
158@@ -36,6 +36,7 @@
159
160 #include "libelfP.h"
161
162+#define EF_MIPS_ABI 0x0000F000
163
164 int
165 gelf_update_rela (Elf_Data *dst, int ndx, GElf_Rela *src)
166@@ -89,6 +90,9 @@ gelf_update_rela (Elf_Data *dst, int ndx
167 }
168 else
169 {
170+ GElf_Ehdr hdr;
171+ GElf_Rela value = *src;
172+
173 /* Check whether we have to resize the data buffer. */
174 if (INVALID_NDX (ndx, Elf64_Rela, &data_scn->d))
175 {
176@@ -96,7 +100,21 @@ gelf_update_rela (Elf_Data *dst, int ndx
177 goto out;
178 }
179
180- ((Elf64_Rela *) data_scn->d.d_buf)[ndx] = *src;
181+ if (gelf_getehdr(scn->elf, &hdr) != NULL &&
182+ hdr.e_ident[EI_DATA] == ELFDATA2LSB &&
183+ hdr.e_machine == EM_MIPS &&
184+ (hdr.e_flags & EF_MIPS_ABI) == 0)
185+ {
186+ /* Undo the MIPSEL N64 hack from gelf_getrel */
187+ GElf_Xword r_info = value.r_info;
188+ value.r_info = (r_info >> 32) |
189+ ((r_info << 8) & 0x000000FF00000000) |
190+ ((r_info << 24) & 0x0000FF0000000000) |
191+ ((r_info << 40) & 0x00FF000000000000) |
192+ ((r_info << 56) & 0xFF00000000000000);
193+ }
194+
195+ ((Elf64_Rela *) data_scn->d.d_buf)[ndx] = value;
196 }
197
198 result = 1;
199Index: elfutils-0.164/src/strip.c
200===================================================================
201--- elfutils-0.164.orig/src/strip.c
202+++ elfutils-0.164/src/strip.c
203@@ -546,6 +546,23 @@ handle_elf (int fd, Elf *elf, const char
204 goto fail;
205 }
206
207+ /* Copy identity part of the ELF header now */
208+ newehdr = gelf_getehdr (newelf, &newehdr_mem);
209+ if (newehdr == NULL)
210+ INTERNAL_ERROR (fname);
211+
212+ memcpy (newehdr->e_ident, ehdr->e_ident, EI_NIDENT);
213+ newehdr->e_type = ehdr->e_type;
214+ newehdr->e_machine = ehdr->e_machine;
215+ newehdr->e_version = ehdr->e_version;
216+
217+ if (gelf_update_ehdr (newelf, newehdr) == 0)
218+ {
219+ error (0, 0, gettext ("%s: error while creating ELF header: %s"),
220+ fname, elf_errmsg (-1));
221+ return 1;
222+ }
223+
224 /* Copy over the old program header if needed. */
225 if (ehdr->e_type != ET_REL)
226 for (cnt = 0; cnt < phnum; ++cnt)
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.163/arm_backend.diff b/meta/recipes-devtools/elfutils/elfutils-0.164/arm_backend.diff
index c97c4e470d..9d47f95f26 100644
--- a/meta/recipes-devtools/elfutils/elfutils-0.163/arm_backend.diff
+++ b/meta/recipes-devtools/elfutils/elfutils-0.164/arm_backend.diff
@@ -1,26 +1,8 @@
1From 0db1687eee0b4d16ccbc40db5a06b574fca6614c Mon Sep 17 00:00:00 2001 1Index: elfutils-0.164/backends/arm_init.c
2From: Hongxu Jia <hongxu.jia@windriver.com> 2===================================================================
3Date: Fri, 14 Nov 2014 15:25:42 +0800 3--- elfutils-0.164.orig/backends/arm_init.c
4Subject: [PATCH] Rebase arm_backend.diff from 0.159 to 0.160 4+++ elfutils-0.164/backends/arm_init.c
5 5@@ -35,20 +35,31 @@
6Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
7---
8 backends/arm_init.c | 18 ++++-
9 backends/arm_regs.c | 132 ++++++++++++++++++++++++++++++++++++
10 backends/arm_retval.c | 44 +++++++++++-
11 backends/libebl_arm.h | 9 +++
12 libelf/elf.h | 11 +++
13 tests/run-addrcfi.sh | 93 ++++++++++++++++++++++++-
14 tests/run-allregs.sh | 95 +++++++++++++++++++++++++-
15 tests/run-readelf-mixed-corenote.sh | 11 ++-
16 8 files changed, 401 insertions(+), 12 deletions(-)
17 create mode 100644 backends/libebl_arm.h
18
19diff --git a/backends/arm_init.c b/backends/arm_init.c
20index 3283c97..8b57d3f 100644
21--- a/backends/arm_init.c
22+++ b/backends/arm_init.c
23@@ -35,21 +35,32 @@
24 #define RELOC_PREFIX R_ARM_ 6 #define RELOC_PREFIX R_ARM_
25 #include "libebl_CPU.h" 7 #include "libebl_CPU.h"
26 8
@@ -31,12 +13,11 @@ index 3283c97..8b57d3f 100644
31 13
32 14
33 const char * 15 const char *
34 arm_init (elf, machine, eh, ehlen) 16-arm_init (Elf *elf __attribute__ ((unused)),
35- Elf *elf __attribute__ ((unused)); 17+arm_init (Elf *elf,
36+ Elf *elf; 18 GElf_Half machine __attribute__ ((unused)),
37 GElf_Half machine __attribute__ ((unused)); 19 Ebl *eh,
38 Ebl *eh; 20 size_t ehlen)
39 size_t ehlen;
40 { 21 {
41+ int soft_float = 0; 22+ int soft_float = 0;
42+ 23+
@@ -54,7 +35,7 @@ index 3283c97..8b57d3f 100644
54 /* We handle it. */ 35 /* We handle it. */
55 eh->name = "ARM"; 36 eh->name = "ARM";
56 arm_init_reloc (eh); 37 arm_init_reloc (eh);
57@@ -61,7 +72,10 @@ arm_init (elf, machine, eh, ehlen) 38@@ -60,7 +71,10 @@ arm_init (Elf *elf __attribute__ ((unuse
58 HOOK (eh, core_note); 39 HOOK (eh, core_note);
59 HOOK (eh, auxv_info); 40 HOOK (eh, auxv_info);
60 HOOK (eh, check_object_attribute); 41 HOOK (eh, check_object_attribute);
@@ -65,11 +46,11 @@ index 3283c97..8b57d3f 100644
65+ eh->return_value_location = arm_return_value_location_hard; 46+ eh->return_value_location = arm_return_value_location_hard;
66 HOOK (eh, abi_cfi); 47 HOOK (eh, abi_cfi);
67 HOOK (eh, check_reloc_target_type); 48 HOOK (eh, check_reloc_target_type);
68 49 HOOK (eh, symbol_type_name);
69diff --git a/backends/arm_regs.c b/backends/arm_regs.c 50Index: elfutils-0.164/backends/arm_regs.c
70index 21c5ad3..4ee1039 100644 51===================================================================
71--- a/backends/arm_regs.c 52--- elfutils-0.164.orig/backends/arm_regs.c
72+++ b/backends/arm_regs.c 53+++ elfutils-0.164/backends/arm_regs.c
73@@ -31,6 +31,7 @@ 54@@ -31,6 +31,7 @@
74 #endif 55 #endif
75 56
@@ -78,7 +59,7 @@ index 21c5ad3..4ee1039 100644
78 #include <dwarf.h> 59 #include <dwarf.h>
79 60
80 #define BACKEND arm_ 61 #define BACKEND arm_
81@@ -76,6 +77,9 @@ arm_register_info (Ebl *ebl __attribute__ ((unused)), 62@@ -76,6 +77,9 @@ arm_register_info (Ebl *ebl __attribute_
82 break; 63 break;
83 64
84 case 16 + 0 ... 16 + 7: 65 case 16 + 0 ... 16 + 7:
@@ -88,7 +69,7 @@ index 21c5ad3..4ee1039 100644
88 regno += 96 - 16; 69 regno += 96 - 16;
89 /* Fall through. */ 70 /* Fall through. */
90 case 96 + 0 ... 96 + 7: 71 case 96 + 0 ... 96 + 7:
91@@ -87,11 +91,139 @@ arm_register_info (Ebl *ebl __attribute__ ((unused)), 72@@ -87,11 +91,139 @@ arm_register_info (Ebl *ebl __attribute_
92 namelen = 2; 73 namelen = 2;
93 break; 74 break;
94 75
@@ -228,10 +209,10 @@ index 21c5ad3..4ee1039 100644
228 *setname = "VFP"; 209 *setname = "VFP";
229 *type = DW_ATE_float; 210 *type = DW_ATE_float;
230 *bits = 64; 211 *bits = 64;
231diff --git a/backends/arm_retval.c b/backends/arm_retval.c 212Index: elfutils-0.164/backends/arm_retval.c
232index 7aced74..052132e 100644 213===================================================================
233--- a/backends/arm_retval.c 214--- elfutils-0.164.orig/backends/arm_retval.c
234+++ b/backends/arm_retval.c 215+++ elfutils-0.164/backends/arm_retval.c
235@@ -48,6 +48,13 @@ static const Dwarf_Op loc_intreg[] = 216@@ -48,6 +48,13 @@ static const Dwarf_Op loc_intreg[] =
236 #define nloc_intreg 1 217 #define nloc_intreg 1
237 #define nloc_intregs(n) (2 * (n)) 218 #define nloc_intregs(n) (2 * (n))
@@ -258,39 +239,37 @@ index 7aced74..052132e 100644
258 { 239 {
259 /* Start with the function's type, and get the DW_AT_type attribute, 240 /* Start with the function's type, and get the DW_AT_type attribute,
260 which is the type of the return value. */ 241 which is the type of the return value. */
261@@ -98,14 +106,31 @@ arm_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp) 242@@ -98,6 +106,21 @@ arm_return_value_location (Dwarf_Die *fu
262 else 243 else
263 return -1; 244 return -1;
264 } 245 }
265+ if (tag == DW_TAG_base_type) 246+ if (tag == DW_TAG_base_type)
266+ { 247+ {
267+ Dwarf_Word encoding; 248+ Dwarf_Word encoding;
268+ if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_encoding, 249+ if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_encoding,
269+ &attr_mem), &encoding) != 0) 250+ &attr_mem), &encoding) != 0)
270+ return -1; 251+ return -1;
271+ 252+
272+ if ((encoding == DW_ATE_float) && !soft_float) 253+ if ((encoding == DW_ATE_float) && !soft_float)
273+ { 254+ {
274+ *locp = loc_fpreg; 255+ *locp = loc_fpreg;
275+ if (size <= 8) 256+ if (size <= 8)
276+ return nloc_fpreg; 257+ return nloc_fpreg;
277+ goto aggregate; 258+ goto aggregate;
278+ } 259+ }
279+ } 260+ }
280 if (size <= 16) 261 if (size <= 16)
281 { 262 {
282 intreg: 263 intreg:
283 *locp = loc_intreg; 264@@ -106,6 +129,7 @@ arm_return_value_location (Dwarf_Die *fu
284 return size <= 4 ? nloc_intreg : nloc_intregs ((size + 3) / 4);
285 } 265 }
286+ /* fall through. */
287 266
288 aggregate: 267 aggregate:
289+ /* XXX TODO sometimes aggregates are returned in r0 (-mabi=aapcs) */ 268+ /* XXX TODO sometimes aggregates are returned in r0 (-mabi=aapcs) */
290 *locp = loc_aggregate; 269 *locp = loc_aggregate;
291 return nloc_aggregate; 270 return nloc_aggregate;
292 } 271 }
293@@ -125,3 +150,18 @@ arm_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp) 272@@ -125,3 +149,18 @@ arm_return_value_location (Dwarf_Die *fu
294 DWARF and might be valid. */ 273 DWARF and might be valid. */
295 return -2; 274 return -2;
296 } 275 }
@@ -309,26 +288,11 @@ index 7aced74..052132e 100644
309+ return arm_return_value_location_ (functypedie, locp, 0); 288+ return arm_return_value_location_ (functypedie, locp, 0);
310+} 289+}
311+ 290+
312diff --git a/backends/libebl_arm.h b/backends/libebl_arm.h 291Index: elfutils-0.164/libelf/elf.h
313new file mode 100644 292===================================================================
314index 0000000..c00770c 293--- elfutils-0.164.orig/libelf/elf.h
315--- /dev/null 294+++ elfutils-0.164/libelf/elf.h
316+++ b/backends/libebl_arm.h 295@@ -2450,6 +2450,9 @@ enum
317@@ -0,0 +1,9 @@
318+#ifndef _LIBEBL_ARM_H
319+#define _LIBEBL_ARM_H 1
320+
321+#include <libdw.h>
322+
323+extern int arm_return_value_location_soft(Dwarf_Die *, const Dwarf_Op **locp);
324+extern int arm_return_value_location_hard(Dwarf_Die *, const Dwarf_Op **locp);
325+
326+#endif
327diff --git a/libelf/elf.h b/libelf/elf.h
328index a3cce3e..0891674 100644
329--- a/libelf/elf.h
330+++ b/libelf/elf.h
331@@ -2346,6 +2346,9 @@ typedef Elf32_Addr Elf32_Conflict;
332 #define EF_ARM_EABI_VER4 0x04000000 296 #define EF_ARM_EABI_VER4 0x04000000
333 #define EF_ARM_EABI_VER5 0x05000000 297 #define EF_ARM_EABI_VER5 0x05000000
334 298
@@ -338,7 +302,7 @@ index a3cce3e..0891674 100644
338 /* Additional symbol types for Thumb. */ 302 /* Additional symbol types for Thumb. */
339 #define STT_ARM_TFUNC STT_LOPROC /* A Thumb function. */ 303 #define STT_ARM_TFUNC STT_LOPROC /* A Thumb function. */
340 #define STT_ARM_16BIT STT_HIPROC /* A Thumb label. */ 304 #define STT_ARM_16BIT STT_HIPROC /* A Thumb label. */
341@@ -2363,12 +2366,19 @@ typedef Elf32_Addr Elf32_Conflict; 305@@ -2467,12 +2470,19 @@ enum
342 306
343 /* Processor specific values for the Phdr p_type field. */ 307 /* Processor specific values for the Phdr p_type field. */
344 #define PT_ARM_EXIDX (PT_LOPROC + 1) /* ARM unwind segment. */ 308 #define PT_ARM_EXIDX (PT_LOPROC + 1) /* ARM unwind segment. */
@@ -358,7 +322,7 @@ index a3cce3e..0891674 100644
358 322
359 /* AArch64 relocs. */ 323 /* AArch64 relocs. */
360 324
361@@ -2647,6 +2657,7 @@ typedef Elf32_Addr Elf32_Conflict; 325@@ -2765,6 +2775,7 @@ enum
362 TLS block (LDR, STR). */ 326 TLS block (LDR, STR). */
363 #define R_ARM_TLS_IE12GP 111 /* 12 bit GOT entry relative 327 #define R_ARM_TLS_IE12GP 111 /* 12 bit GOT entry relative
364 to GOT origin (LDR). */ 328 to GOT origin (LDR). */
@@ -366,122 +330,25 @@ index a3cce3e..0891674 100644
366 #define R_ARM_ME_TOO 128 /* Obsolete. */ 330 #define R_ARM_ME_TOO 128 /* Obsolete. */
367 #define R_ARM_THM_TLS_DESCSEQ 129 331 #define R_ARM_THM_TLS_DESCSEQ 129
368 #define R_ARM_THM_TLS_DESCSEQ16 129 332 #define R_ARM_THM_TLS_DESCSEQ16 129
369diff --git a/tests/run-addrcfi.sh b/tests/run-addrcfi.sh 333Index: elfutils-0.164/backends/libebl_arm.h
370index 5d33246..78464a8 100755 334===================================================================
371--- a/tests/run-addrcfi.sh 335--- /dev/null
372+++ b/tests/run-addrcfi.sh 336+++ elfutils-0.164/backends/libebl_arm.h
373@@ -2530,6 +2530,38 @@ dwarf_cfi_addrframe (.eh_frame): no matching address range 337@@ -0,0 +1,9 @@
374 FPA reg21 (f5): undefined 338+#ifndef _LIBEBL_ARM_H
375 FPA reg22 (f6): undefined 339+#define _LIBEBL_ARM_H 1
376 FPA reg23 (f7): undefined 340+
377+ VFP reg64 (s0): undefined 341+#include <libdw.h>
378+ VFP reg65 (s1): undefined 342+
379+ VFP reg66 (s2): undefined 343+extern int arm_return_value_location_soft(Dwarf_Die *, const Dwarf_Op **locp);
380+ VFP reg67 (s3): undefined 344+extern int arm_return_value_location_hard(Dwarf_Die *, const Dwarf_Op **locp);
381+ VFP reg68 (s4): undefined 345+
382+ VFP reg69 (s5): undefined 346+#endif
383+ VFP reg70 (s6): undefined 347Index: elfutils-0.164/tests/run-allregs.sh
384+ VFP reg71 (s7): undefined 348===================================================================
385+ VFP reg72 (s8): undefined 349--- elfutils-0.164.orig/tests/run-allregs.sh
386+ VFP reg73 (s9): undefined 350+++ elfutils-0.164/tests/run-allregs.sh
387+ VFP reg74 (s10): undefined 351@@ -2672,7 +2672,28 @@ integer registers:
388+ VFP reg75 (s11): undefined
389+ VFP reg76 (s12): undefined
390+ VFP reg77 (s13): undefined
391+ VFP reg78 (s14): undefined
392+ VFP reg79 (s15): undefined
393+ VFP reg80 (s16): undefined
394+ VFP reg81 (s17): undefined
395+ VFP reg82 (s18): undefined
396+ VFP reg83 (s19): undefined
397+ VFP reg84 (s20): undefined
398+ VFP reg85 (s21): undefined
399+ VFP reg86 (s22): undefined
400+ VFP reg87 (s23): undefined
401+ VFP reg88 (s24): undefined
402+ VFP reg89 (s25): undefined
403+ VFP reg90 (s26): undefined
404+ VFP reg91 (s27): undefined
405+ VFP reg92 (s28): undefined
406+ VFP reg93 (s29): undefined
407+ VFP reg94 (s30): undefined
408+ VFP reg95 (s31): undefined
409 FPA reg96 (f0): undefined
410 FPA reg97 (f1): undefined
411 FPA reg98 (f2): undefined
412@@ -2538,7 +2570,66 @@ dwarf_cfi_addrframe (.eh_frame): no matching address range
413 FPA reg101 (f5): undefined
414 FPA reg102 (f6): undefined
415 FPA reg103 (f7): undefined
416- integer reg128 (spsr): undefined
417+ MMX reg104 (wcgr0): undefined
418+ MMX reg105 (wcgr1): undefined
419+ MMX reg106 (wcgr2): undefined
420+ MMX reg107 (wcgr3): undefined
421+ MMX reg108 (wcgr4): undefined
422+ MMX reg109 (wcgr5): undefined
423+ MMX reg110 (wcgr6): undefined
424+ MMX reg111 (wcgr7): undefined
425+ MMX reg112 (wr0): undefined
426+ MMX reg113 (wr1): undefined
427+ MMX reg114 (wr2): undefined
428+ MMX reg115 (wr3): undefined
429+ MMX reg116 (wr4): undefined
430+ MMX reg117 (wr5): undefined
431+ MMX reg118 (wr6): undefined
432+ MMX reg119 (wr7): undefined
433+ MMX reg120 (wr8): undefined
434+ MMX reg121 (wr9): undefined
435+ MMX reg122 (wr10): undefined
436+ MMX reg123 (wr11): undefined
437+ MMX reg124 (wr12): undefined
438+ MMX reg125 (wr13): undefined
439+ MMX reg126 (wr14): undefined
440+ MMX reg127 (wr15): undefined
441+ state reg128 (spsr): undefined
442+ state reg129 (spsr_fiq): undefined
443+ state reg130 (spsr_irq): undefined
444+ state reg131 (spsr_abt): undefined
445+ state reg132 (spsr_und): undefined
446+ state reg133 (spsr_svc): undefined
447+ integer reg144 (r8_usr): undefined
448+ integer reg145 (r9_usr): undefined
449+ integer reg146 (r10_usr): undefined
450+ integer reg147 (r11_usr): undefined
451+ integer reg148 (r12_usr): undefined
452+ integer reg149 (r13_usr): undefined
453+ integer reg150 (r14_usr): undefined
454+ integer reg151 (r8_fiq): undefined
455+ integer reg152 (r9_fiq): undefined
456+ integer reg153 (r10_fiq): undefined
457+ integer reg154 (r11_fiq): undefined
458+ integer reg155 (r12_fiq): undefined
459+ integer reg156 (r13_fiq): undefined
460+ integer reg157 (r14_fiq): undefined
461+ integer reg158 (r13_irq): undefined
462+ integer reg159 (r14_irq): undefined
463+ integer reg160 (r13_abt): undefined
464+ integer reg161 (r14_abt): undefined
465+ integer reg162 (r13_und): undefined
466+ integer reg163 (r14_und): undefined
467+ integer reg164 (r13_svc): undefined
468+ integer reg165 (r14_svc): undefined
469+ MMX reg192 (wc0): undefined
470+ MMX reg193 (wc1): undefined
471+ MMX reg194 (wc2): undefined
472+ MMX reg195 (wc3): undefined
473+ MMX reg196 (wc4): undefined
474+ MMX reg197 (wc5): undefined
475+ MMX reg198 (wc6): undefined
476+ MMX reg199 (wc7): undefined
477 VFP reg256 (d0): undefined
478 VFP reg257 (d1): undefined
479 VFP reg258 (d2): undefined
480diff --git a/tests/run-allregs.sh b/tests/run-allregs.sh
481index 6f3862e..13557d5 100755
482--- a/tests/run-allregs.sh
483+++ b/tests/run-allregs.sh
484@@ -2671,7 +2671,28 @@ integer registers:
485 13: sp (sp), address 32 bits 352 13: sp (sp), address 32 bits
486 14: lr (lr), address 32 bits 353 14: lr (lr), address 32 bits
487 15: pc (pc), address 32 bits 354 15: pc (pc), address 32 bits
@@ -511,7 +378,7 @@ index 6f3862e..13557d5 100755
511 FPA registers: 378 FPA registers:
512 16: f0 (f0), float 96 bits 379 16: f0 (f0), float 96 bits
513 17: f1 (f1), float 96 bits 380 17: f1 (f1), float 96 bits
514@@ -2689,7 +2710,72 @@ FPA registers: 381@@ -2690,7 +2711,72 @@ FPA registers:
515 101: f5 (f5), float 96 bits 382 101: f5 (f5), float 96 bits
516 102: f6 (f6), float 96 bits 383 102: f6 (f6), float 96 bits
517 103: f7 (f7), float 96 bits 384 103: f7 (f7), float 96 bits
@@ -584,7 +451,7 @@ index 6f3862e..13557d5 100755
584 256: d0 (d0), float 64 bits 451 256: d0 (d0), float 64 bits
585 257: d1 (d1), float 64 bits 452 257: d1 (d1), float 64 bits
586 258: d2 (d2), float 64 bits 453 258: d2 (d2), float 64 bits
587@@ -2722,6 +2808,13 @@ VFP registers: 454@@ -2723,6 +2809,13 @@ VFP registers:
588 285: d29 (d29), float 64 bits 455 285: d29 (d29), float 64 bits
589 286: d30 (d30), float 64 bits 456 286: d30 (d30), float 64 bits
590 287: d31 (d31), float 64 bits 457 287: d31 (d31), float 64 bits
@@ -598,11 +465,11 @@ index 6f3862e..13557d5 100755
598 EOF 465 EOF
599 466
600 # See run-readelf-mixed-corenote.sh for instructions to regenerate 467 # See run-readelf-mixed-corenote.sh for instructions to regenerate
601diff --git a/tests/run-readelf-mixed-corenote.sh b/tests/run-readelf-mixed-corenote.sh 468Index: elfutils-0.164/tests/run-readelf-mixed-corenote.sh
602index 01e4594..9a8a380 100755 469===================================================================
603--- a/tests/run-readelf-mixed-corenote.sh 470--- elfutils-0.164.orig/tests/run-readelf-mixed-corenote.sh
604+++ b/tests/run-readelf-mixed-corenote.sh 471+++ elfutils-0.164/tests/run-readelf-mixed-corenote.sh
605@@ -30,12 +30,11 @@ Note segment of 892 bytes at offset 0x274: 472@@ -31,12 +31,11 @@ Note segment of 892 bytes at offset 0x27
606 pid: 11087, ppid: 11063, pgrp: 11087, sid: 11063 473 pid: 11087, ppid: 11063, pgrp: 11087, sid: 11063
607 utime: 0.000000, stime: 0.010000, cutime: 0.000000, cstime: 0.000000 474 utime: 0.000000, stime: 0.010000, cutime: 0.000000, cstime: 0.000000
608 orig_r0: -1, fpvalid: 1 475 orig_r0: -1, fpvalid: 1
@@ -620,6 +487,114 @@ index 01e4594..9a8a380 100755
620 CORE 124 PRPSINFO 487 CORE 124 PRPSINFO
621 state: 0, sname: R, zomb: 0, nice: 0, flag: 0x00400500 488 state: 0, sname: R, zomb: 0, nice: 0, flag: 0x00400500
622 uid: 0, gid: 0, pid: 11087, ppid: 11063, pgrp: 11087, sid: 11063 489 uid: 0, gid: 0, pid: 11087, ppid: 11063, pgrp: 11087, sid: 11063
623-- 490Index: elfutils-0.164/tests/run-addrcfi.sh
6241.9.1 491===================================================================
625 492--- elfutils-0.164.orig/tests/run-addrcfi.sh
493+++ elfutils-0.164/tests/run-addrcfi.sh
494@@ -3554,6 +3554,38 @@ dwarf_cfi_addrframe (.eh_frame): no matc
495 FPA reg21 (f5): undefined
496 FPA reg22 (f6): undefined
497 FPA reg23 (f7): undefined
498+ VFP reg64 (s0): undefined
499+ VFP reg65 (s1): undefined
500+ VFP reg66 (s2): undefined
501+ VFP reg67 (s3): undefined
502+ VFP reg68 (s4): undefined
503+ VFP reg69 (s5): undefined
504+ VFP reg70 (s6): undefined
505+ VFP reg71 (s7): undefined
506+ VFP reg72 (s8): undefined
507+ VFP reg73 (s9): undefined
508+ VFP reg74 (s10): undefined
509+ VFP reg75 (s11): undefined
510+ VFP reg76 (s12): undefined
511+ VFP reg77 (s13): undefined
512+ VFP reg78 (s14): undefined
513+ VFP reg79 (s15): undefined
514+ VFP reg80 (s16): undefined
515+ VFP reg81 (s17): undefined
516+ VFP reg82 (s18): undefined
517+ VFP reg83 (s19): undefined
518+ VFP reg84 (s20): undefined
519+ VFP reg85 (s21): undefined
520+ VFP reg86 (s22): undefined
521+ VFP reg87 (s23): undefined
522+ VFP reg88 (s24): undefined
523+ VFP reg89 (s25): undefined
524+ VFP reg90 (s26): undefined
525+ VFP reg91 (s27): undefined
526+ VFP reg92 (s28): undefined
527+ VFP reg93 (s29): undefined
528+ VFP reg94 (s30): undefined
529+ VFP reg95 (s31): undefined
530 FPA reg96 (f0): undefined
531 FPA reg97 (f1): undefined
532 FPA reg98 (f2): undefined
533@@ -3562,7 +3594,66 @@ dwarf_cfi_addrframe (.eh_frame): no matc
534 FPA reg101 (f5): undefined
535 FPA reg102 (f6): undefined
536 FPA reg103 (f7): undefined
537- integer reg128 (spsr): undefined
538+ MMX reg104 (wcgr0): undefined
539+ MMX reg105 (wcgr1): undefined
540+ MMX reg106 (wcgr2): undefined
541+ MMX reg107 (wcgr3): undefined
542+ MMX reg108 (wcgr4): undefined
543+ MMX reg109 (wcgr5): undefined
544+ MMX reg110 (wcgr6): undefined
545+ MMX reg111 (wcgr7): undefined
546+ MMX reg112 (wr0): undefined
547+ MMX reg113 (wr1): undefined
548+ MMX reg114 (wr2): undefined
549+ MMX reg115 (wr3): undefined
550+ MMX reg116 (wr4): undefined
551+ MMX reg117 (wr5): undefined
552+ MMX reg118 (wr6): undefined
553+ MMX reg119 (wr7): undefined
554+ MMX reg120 (wr8): undefined
555+ MMX reg121 (wr9): undefined
556+ MMX reg122 (wr10): undefined
557+ MMX reg123 (wr11): undefined
558+ MMX reg124 (wr12): undefined
559+ MMX reg125 (wr13): undefined
560+ MMX reg126 (wr14): undefined
561+ MMX reg127 (wr15): undefined
562+ state reg128 (spsr): undefined
563+ state reg129 (spsr_fiq): undefined
564+ state reg130 (spsr_irq): undefined
565+ state reg131 (spsr_abt): undefined
566+ state reg132 (spsr_und): undefined
567+ state reg133 (spsr_svc): undefined
568+ integer reg144 (r8_usr): undefined
569+ integer reg145 (r9_usr): undefined
570+ integer reg146 (r10_usr): undefined
571+ integer reg147 (r11_usr): undefined
572+ integer reg148 (r12_usr): undefined
573+ integer reg149 (r13_usr): undefined
574+ integer reg150 (r14_usr): undefined
575+ integer reg151 (r8_fiq): undefined
576+ integer reg152 (r9_fiq): undefined
577+ integer reg153 (r10_fiq): undefined
578+ integer reg154 (r11_fiq): undefined
579+ integer reg155 (r12_fiq): undefined
580+ integer reg156 (r13_fiq): undefined
581+ integer reg157 (r14_fiq): undefined
582+ integer reg158 (r13_irq): undefined
583+ integer reg159 (r14_irq): undefined
584+ integer reg160 (r13_abt): undefined
585+ integer reg161 (r14_abt): undefined
586+ integer reg162 (r13_und): undefined
587+ integer reg163 (r14_und): undefined
588+ integer reg164 (r13_svc): undefined
589+ integer reg165 (r14_svc): undefined
590+ MMX reg192 (wc0): undefined
591+ MMX reg193 (wc1): undefined
592+ MMX reg194 (wc2): undefined
593+ MMX reg195 (wc3): undefined
594+ MMX reg196 (wc4): undefined
595+ MMX reg197 (wc5): undefined
596+ MMX reg198 (wc6): undefined
597+ MMX reg199 (wc7): undefined
598 VFP reg256 (d0): undefined
599 VFP reg257 (d1): undefined
600 VFP reg258 (d2): undefined
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.163/fixheadercheck.patch b/meta/recipes-devtools/elfutils/elfutils-0.164/fixheadercheck.patch
index 5de3b24c85..5de3b24c85 100644
--- a/meta/recipes-devtools/elfutils/elfutils-0.163/fixheadercheck.patch
+++ b/meta/recipes-devtools/elfutils/elfutils-0.164/fixheadercheck.patch
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.163/hppa_backend.diff b/meta/recipes-devtools/elfutils/elfutils-0.164/hppa_backend.diff
index d51a720073..45456715a3 100644
--- a/meta/recipes-devtools/elfutils/elfutils-0.163/hppa_backend.diff
+++ b/meta/recipes-devtools/elfutils/elfutils-0.164/hppa_backend.diff
@@ -1,8 +1,8 @@
1Index: elfutils-0.158/backends/parisc_init.c 1Index: elfutils-0.164/backends/parisc_init.c
2=================================================================== 2===================================================================
3--- /dev/null 1970-01-01 00:00:00.000000000 +0000 3--- /dev/null
4+++ elfutils-0.158/backends/parisc_init.c 2014-04-21 11:12:12.228150280 +0000 4+++ elfutils-0.164/backends/parisc_init.c
5@@ -0,0 +1,74 @@ 5@@ -0,0 +1,73 @@
6+/* Initialization of PA-RISC specific backend library. 6+/* Initialization of PA-RISC specific backend library.
7+ Copyright (C) 2002, 2005, 2006 Red Hat, Inc. 7+ Copyright (C) 2002, 2005, 2006 Red Hat, Inc.
8+ This file is part of Red Hat elfutils. 8+ This file is part of Red Hat elfutils.
@@ -43,11 +43,10 @@ Index: elfutils-0.158/backends/parisc_init.c
43+ 43+
44+ 44+
45+const char * 45+const char *
46+parisc_init (elf, machine, eh, ehlen) 46+parisc_init (Elf *elf __attribute__ ((unused)),
47+ Elf *elf __attribute__ ((unused)); 47+ GElf_Half machine __attribute__ ((unused)),
48+ GElf_Half machine __attribute__ ((unused)); 48+ Ebl *eh,
49+ Ebl *eh; 49+ size_t ehlen)
50+ size_t ehlen;
51+{ 50+{
52+ int pa64 = 0; 51+ int pa64 = 0;
53+ 52+
@@ -77,10 +76,10 @@ Index: elfutils-0.158/backends/parisc_init.c
77+ 76+
78+ return MODVERSION; 77+ return MODVERSION;
79+} 78+}
80Index: elfutils-0.158/backends/parisc_regs.c 79Index: elfutils-0.164/backends/parisc_regs.c
81=================================================================== 80===================================================================
82--- /dev/null 1970-01-01 00:00:00.000000000 +0000 81--- /dev/null
83+++ elfutils-0.158/backends/parisc_regs.c 2014-04-21 11:12:12.228150280 +0000 82+++ elfutils-0.164/backends/parisc_regs.c
84@@ -0,0 +1,159 @@ 83@@ -0,0 +1,159 @@
85+/* Register names and numbers for PA-RISC DWARF. 84+/* Register names and numbers for PA-RISC DWARF.
86+ Copyright (C) 2005, 2006 Red Hat, Inc. 85+ Copyright (C) 2005, 2006 Red Hat, Inc.
@@ -241,10 +240,10 @@ Index: elfutils-0.158/backends/parisc_regs.c
241+ name[namelen++] = '\0'; 240+ name[namelen++] = '\0';
242+ return namelen; 241+ return namelen;
243+} 242+}
244Index: elfutils-0.158/backends/parisc_reloc.def 243Index: elfutils-0.164/backends/parisc_reloc.def
245=================================================================== 244===================================================================
246--- /dev/null 1970-01-01 00:00:00.000000000 +0000 245--- /dev/null
247+++ elfutils-0.158/backends/parisc_reloc.def 2014-04-21 11:12:12.228150280 +0000 246+++ elfutils-0.164/backends/parisc_reloc.def
248@@ -0,0 +1,128 @@ 247@@ -0,0 +1,128 @@
249+/* List the relocation types for PA-RISC. -*- C -*- 248+/* List the relocation types for PA-RISC. -*- C -*-
250+ Copyright (C) 2005 Red Hat, Inc. 249+ Copyright (C) 2005 Red Hat, Inc.
@@ -374,10 +373,10 @@ Index: elfutils-0.158/backends/parisc_reloc.def
374+RELOC_TYPE (TLS_DTPMOD64, DYN) 373+RELOC_TYPE (TLS_DTPMOD64, DYN)
375+ 374+
376+#define NO_RELATIVE_RELOC 1 375+#define NO_RELATIVE_RELOC 1
377Index: elfutils-0.158/backends/parisc_retval.c 376Index: elfutils-0.164/backends/parisc_retval.c
378=================================================================== 377===================================================================
379--- /dev/null 1970-01-01 00:00:00.000000000 +0000 378--- /dev/null
380+++ elfutils-0.158/backends/parisc_retval.c 2014-04-21 11:12:12.228150280 +0000 379+++ elfutils-0.164/backends/parisc_retval.c
381@@ -0,0 +1,213 @@ 380@@ -0,0 +1,213 @@
382+/* Function return value location for Linux/PA-RISC ABI. 381+/* Function return value location for Linux/PA-RISC ABI.
383+ Copyright (C) 2005 Red Hat, Inc. 382+ Copyright (C) 2005 Red Hat, Inc.
@@ -592,10 +591,10 @@ Index: elfutils-0.158/backends/parisc_retval.c
592+ return parisc_return_value_location_ (functypedie, locp, 1); 591+ return parisc_return_value_location_ (functypedie, locp, 1);
593+} 592+}
594+ 593+
595Index: elfutils-0.158/backends/parisc_symbol.c 594Index: elfutils-0.164/backends/parisc_symbol.c
596=================================================================== 595===================================================================
597--- /dev/null 1970-01-01 00:00:00.000000000 +0000 596--- /dev/null
598+++ elfutils-0.158/backends/parisc_symbol.c 2014-04-21 11:12:12.228150280 +0000 597+++ elfutils-0.164/backends/parisc_symbol.c
599@@ -0,0 +1,112 @@ 598@@ -0,0 +1,112 @@
600+/* PA-RISC specific symbolic name handling. 599+/* PA-RISC specific symbolic name handling.
601+ Copyright (C) 2002, 2005 Red Hat, Inc. 600+ Copyright (C) 2002, 2005 Red Hat, Inc.
@@ -709,10 +708,10 @@ Index: elfutils-0.158/backends/parisc_symbol.c
709+ return ELF_T_NUM; 708+ return ELF_T_NUM;
710+ } 709+ }
711+} 710+}
712Index: elfutils-0.158/backends/libebl_parisc.h 711Index: elfutils-0.164/backends/libebl_parisc.h
713=================================================================== 712===================================================================
714--- /dev/null 1970-01-01 00:00:00.000000000 +0000 713--- /dev/null
715+++ elfutils-0.158/backends/libebl_parisc.h 2014-04-21 11:12:12.228150280 +0000 714+++ elfutils-0.164/backends/libebl_parisc.h
716@@ -0,0 +1,9 @@ 715@@ -0,0 +1,9 @@
717+#ifndef _LIBEBL_HPPA_H 716+#ifndef _LIBEBL_HPPA_H
718+#define _LIBEBL_HPPA_H 1 717+#define _LIBEBL_HPPA_H 1
@@ -723,11 +722,11 @@ Index: elfutils-0.158/backends/libebl_parisc.h
723+extern int parisc_return_value_location_64(Dwarf_Die *, const Dwarf_Op **locp); 722+extern int parisc_return_value_location_64(Dwarf_Die *, const Dwarf_Op **locp);
724+ 723+
725+#endif 724+#endif
726Index: elfutils-0.158/backends/Makefile.am 725Index: elfutils-0.164/backends/Makefile.am
727=================================================================== 726===================================================================
728--- elfutils-0.158.orig/backends/Makefile.am 2014-04-21 11:12:12.252149737 +0000 727--- elfutils-0.164.orig/backends/Makefile.am
729+++ elfutils-0.158/backends/Makefile.am 2014-04-21 11:13:11.910801105 +0000 728+++ elfutils-0.164/backends/Makefile.am
730@@ -33,11 +33,12 @@ 729@@ -33,11 +33,12 @@ AM_CPPFLAGS += -I$(top_srcdir)/libebl -I
731 730
732 731
733 modules = i386 sh x86_64 ia64 alpha arm aarch64 sparc ppc ppc64 s390 \ 732 modules = i386 sh x86_64 ia64 alpha arm aarch64 sparc ppc ppc64 s390 \
@@ -742,7 +741,7 @@ Index: elfutils-0.158/backends/Makefile.am
742 noinst_LIBRARIES = $(libebl_pic) 741 noinst_LIBRARIES = $(libebl_pic)
743 noinst_DATA = $(libebl_pic:_pic.a=.so) 742 noinst_DATA = $(libebl_pic:_pic.a=.so)
744 743
745@@ -116,6 +117,9 @@ 744@@ -111,6 +112,9 @@ tilegx_SRCS = tilegx_init.c tilegx_symbo
746 libebl_tilegx_pic_a_SOURCES = $(tilegx_SRCS) 745 libebl_tilegx_pic_a_SOURCES = $(tilegx_SRCS)
747 am_libebl_tilegx_pic_a_OBJECTS = $(tilegx_SRCS:.c=.os) 746 am_libebl_tilegx_pic_a_OBJECTS = $(tilegx_SRCS:.c=.os)
748 747
@@ -752,11 +751,11 @@ Index: elfutils-0.158/backends/Makefile.am
752 751
753 libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw) 752 libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw)
754 @rm -f $(@:.so=.map) 753 @rm -f $(@:.so=.map)
755Index: elfutils-0.158/libelf/elf.h 754Index: elfutils-0.164/libelf/elf.h
756=================================================================== 755===================================================================
757--- elfutils-0.158.orig/libelf/elf.h 2014-04-21 11:12:12.252149737 +0000 756--- elfutils-0.164.orig/libelf/elf.h
758+++ elfutils-0.158/libelf/elf.h 2014-04-21 11:12:12.228150280 +0000 757+++ elfutils-0.164/libelf/elf.h
759@@ -1814,16 +1814,24 @@ 758@@ -1912,16 +1912,24 @@ enum
760 #define R_PARISC_PCREL17F 12 /* 17 bits of rel. address. */ 759 #define R_PARISC_PCREL17F 12 /* 17 bits of rel. address. */
761 #define R_PARISC_PCREL14R 14 /* Right 14 bits of rel. address. */ 760 #define R_PARISC_PCREL14R 14 /* Right 14 bits of rel. address. */
762 #define R_PARISC_DPREL21L 18 /* Left 21 bits of rel. address. */ 761 #define R_PARISC_DPREL21L 18 /* Left 21 bits of rel. address. */
@@ -781,7 +780,7 @@ Index: elfutils-0.158/libelf/elf.h
781 #define R_PARISC_LTOFF_FPTR32 57 /* 32 bits LT-rel. function pointer. */ 780 #define R_PARISC_LTOFF_FPTR32 57 /* 32 bits LT-rel. function pointer. */
782 #define R_PARISC_LTOFF_FPTR21L 58 /* LT-rel. fct ptr, left 21 bits. */ 781 #define R_PARISC_LTOFF_FPTR21L 58 /* LT-rel. fct ptr, left 21 bits. */
783 #define R_PARISC_LTOFF_FPTR14R 62 /* LT-rel. fct ptr, right 14 bits. */ 782 #define R_PARISC_LTOFF_FPTR14R 62 /* LT-rel. fct ptr, right 14 bits. */
784@@ -1832,6 +1840,7 @@ 783@@ -1930,6 +1938,7 @@ enum
785 #define R_PARISC_PLABEL21L 66 /* Left 21 bits of fdesc address. */ 784 #define R_PARISC_PLABEL21L 66 /* Left 21 bits of fdesc address. */
786 #define R_PARISC_PLABEL14R 70 /* Right 14 bits of fdesc address. */ 785 #define R_PARISC_PLABEL14R 70 /* Right 14 bits of fdesc address. */
787 #define R_PARISC_PCREL64 72 /* 64 bits PC-rel. address. */ 786 #define R_PARISC_PCREL64 72 /* 64 bits PC-rel. address. */
@@ -789,7 +788,7 @@ Index: elfutils-0.158/libelf/elf.h
789 #define R_PARISC_PCREL22F 74 /* 22 bits PC-rel. address. */ 788 #define R_PARISC_PCREL22F 74 /* 22 bits PC-rel. address. */
790 #define R_PARISC_PCREL14WR 75 /* PC-rel. address, right 14 bits. */ 789 #define R_PARISC_PCREL14WR 75 /* PC-rel. address, right 14 bits. */
791 #define R_PARISC_PCREL14DR 76 /* PC rel. address, right 14 bits. */ 790 #define R_PARISC_PCREL14DR 76 /* PC rel. address, right 14 bits. */
792@@ -1857,6 +1866,8 @@ 791@@ -1955,6 +1964,8 @@ enum
793 #define R_PARISC_LTOFF16WF 102 /* 16 bits LT-rel. address. */ 792 #define R_PARISC_LTOFF16WF 102 /* 16 bits LT-rel. address. */
794 #define R_PARISC_LTOFF16DF 103 /* 16 bits LT-rel. address. */ 793 #define R_PARISC_LTOFF16DF 103 /* 16 bits LT-rel. address. */
795 #define R_PARISC_SECREL64 104 /* 64 bits section rel. address. */ 794 #define R_PARISC_SECREL64 104 /* 64 bits section rel. address. */
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.164/kfreebsd_path.patch b/meta/recipes-devtools/elfutils/elfutils-0.164/kfreebsd_path.patch
new file mode 100644
index 0000000000..ba454ee77c
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.164/kfreebsd_path.patch
@@ -0,0 +1,15 @@
1--- elfutils/tests/run-native-test.sh.orig
2+++ elfutils/tests/run-native-test.sh
3@@ -78,6 +78,12 @@
4 test $native -eq 0 || testrun "$@" -p $native > /dev/null
5 }
6
7+# On the Debian buildds, GNU/kFreeBSD linprocfs /proc/$PID/maps does
8+# not give absolute paths due to sbuild's bind mounts (bug #570805)
9+# therefore the next two test programs are expected to fail with
10+# "cannot attach to process: Function not implemented".
11+[ "$(uname)" = "GNU/kFreeBSD" ] && exit 77
12+
13 native_test ${abs_builddir}/allregs
14 native_test ${abs_builddir}/funcretval
15
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.163/m68k_backend.diff b/meta/recipes-devtools/elfutils/elfutils-0.164/m68k_backend.diff
index f5b566f2d5..d73855b601 100644
--- a/meta/recipes-devtools/elfutils/elfutils-0.163/m68k_backend.diff
+++ b/meta/recipes-devtools/elfutils/elfutils-0.164/m68k_backend.diff
@@ -6,11 +6,11 @@ Written by Kurt Roeckx, except for the retval support which was written
6by Thorsten Glaser 6by Thorsten Glaser
7 7
8 8
9Index: elfutils-0.158/backends/m68k_init.c 9Index: elfutils-0.164/backends/m68k_init.c
10=================================================================== 10===================================================================
11--- /dev/null 1970-01-01 00:00:00.000000000 +0000 11--- /dev/null
12+++ elfutils-0.158/backends/m68k_init.c 2014-04-21 11:14:23.813175704 +0000 12+++ elfutils-0.164/backends/m68k_init.c
13@@ -0,0 +1,50 @@ 13@@ -0,0 +1,49 @@
14+/* Initialization of m68k specific backend library. 14+/* Initialization of m68k specific backend library.
15+ Copyright (C) 2007 Kurt Roeckx <kurt@roeckx.be> 15+ Copyright (C) 2007 Kurt Roeckx <kurt@roeckx.be>
16+ 16+
@@ -42,11 +42,10 @@ Index: elfutils-0.158/backends/m68k_init.c
42+ 42+
43+ 43+
44+const char * 44+const char *
45+m68k_init (elf, machine, eh, ehlen) 45+m68k_init (Elf *elf __attribute__ ((unused)),
46+ Elf *elf __attribute__ ((unused)); 46+ GElf_Half machine __attribute__ ((unused)),
47+ GElf_Half machine __attribute__ ((unused)); 47+ Ebl *eh,
48+ Ebl *eh; 48+ size_t ehlen)
49+ size_t ehlen;
50+{ 49+{
51+ /* Check whether the Elf_BH object has a sufficent size. */ 50+ /* Check whether the Elf_BH object has a sufficent size. */
52+ if (ehlen < sizeof (Ebl)) 51+ if (ehlen < sizeof (Ebl))
@@ -61,10 +60,10 @@ Index: elfutils-0.158/backends/m68k_init.c
61+ 60+
62+ return MODVERSION; 61+ return MODVERSION;
63+} 62+}
64Index: elfutils-0.158/backends/m68k_regs.c 63Index: elfutils-0.164/backends/m68k_regs.c
65=================================================================== 64===================================================================
66--- /dev/null 1970-01-01 00:00:00.000000000 +0000 65--- /dev/null
67+++ elfutils-0.158/backends/m68k_regs.c 2014-04-21 11:14:23.813175704 +0000 66+++ elfutils-0.164/backends/m68k_regs.c
68@@ -0,0 +1,106 @@ 67@@ -0,0 +1,106 @@
69+/* Register names and numbers for m68k DWARF. 68+/* Register names and numbers for m68k DWARF.
70+ Copyright (C) 2007 Kurt Roeckx <kurt@roeckx.be> 69+ Copyright (C) 2007 Kurt Roeckx <kurt@roeckx.be>
@@ -172,10 +171,10 @@ Index: elfutils-0.158/backends/m68k_regs.c
172+ return namelen; 171+ return namelen;
173+} 172+}
174+ 173+
175Index: elfutils-0.158/backends/m68k_reloc.def 174Index: elfutils-0.164/backends/m68k_reloc.def
176=================================================================== 175===================================================================
177--- /dev/null 1970-01-01 00:00:00.000000000 +0000 176--- /dev/null
178+++ elfutils-0.158/backends/m68k_reloc.def 2014-04-21 11:14:23.813175704 +0000 177+++ elfutils-0.164/backends/m68k_reloc.def
179@@ -0,0 +1,45 @@ 178@@ -0,0 +1,45 @@
180+/* List the relocation types for m68k. -*- C -*- 179+/* List the relocation types for m68k. -*- C -*-
181+ Copyright (C) 2007 Kurt Roeckx <kurt@roeckx.be> 180+ Copyright (C) 2007 Kurt Roeckx <kurt@roeckx.be>
@@ -222,11 +221,11 @@ Index: elfutils-0.158/backends/m68k_reloc.def
222+RELOC_TYPE (GNU_VTINHERIT, REL) 221+RELOC_TYPE (GNU_VTINHERIT, REL)
223+RELOC_TYPE (GNU_VTENTRY, REL) 222+RELOC_TYPE (GNU_VTENTRY, REL)
224+ 223+
225Index: elfutils-0.158/libelf/elf.h 224Index: elfutils-0.164/libelf/elf.h
226=================================================================== 225===================================================================
227--- elfutils-0.158.orig/libelf/elf.h 2014-04-21 11:14:23.813175704 +0000 226--- elfutils-0.164.orig/libelf/elf.h
228+++ elfutils-0.158/libelf/elf.h 2014-04-21 11:14:23.813175704 +0000 227+++ elfutils-0.164/libelf/elf.h
229@@ -1157,6 +1157,9 @@ 228@@ -1158,6 +1158,9 @@ typedef struct
230 #define R_68K_GLOB_DAT 20 /* Create GOT entry */ 229 #define R_68K_GLOB_DAT 20 /* Create GOT entry */
231 #define R_68K_JMP_SLOT 21 /* Create PLT entry */ 230 #define R_68K_JMP_SLOT 21 /* Create PLT entry */
232 #define R_68K_RELATIVE 22 /* Adjust by program base */ 231 #define R_68K_RELATIVE 22 /* Adjust by program base */
@@ -236,11 +235,11 @@ Index: elfutils-0.158/libelf/elf.h
236 #define R_68K_TLS_GD32 25 /* 32 bit GOT offset for GD */ 235 #define R_68K_TLS_GD32 25 /* 32 bit GOT offset for GD */
237 #define R_68K_TLS_GD16 26 /* 16 bit GOT offset for GD */ 236 #define R_68K_TLS_GD16 26 /* 16 bit GOT offset for GD */
238 #define R_68K_TLS_GD8 27 /* 8 bit GOT offset for GD */ 237 #define R_68K_TLS_GD8 27 /* 8 bit GOT offset for GD */
239Index: elfutils-0.158/backends/Makefile.am 238Index: elfutils-0.164/backends/Makefile.am
240=================================================================== 239===================================================================
241--- elfutils-0.158.orig/backends/Makefile.am 2014-04-21 11:14:23.813175704 +0000 240--- elfutils-0.164.orig/backends/Makefile.am
242+++ elfutils-0.158/backends/Makefile.am 2014-04-21 11:14:48.344621167 +0000 241+++ elfutils-0.164/backends/Makefile.am
243@@ -33,12 +33,12 @@ 242@@ -33,12 +33,12 @@ AM_CPPFLAGS += -I$(top_srcdir)/libebl -I
244 243
245 244
246 modules = i386 sh x86_64 ia64 alpha arm aarch64 sparc ppc ppc64 s390 \ 245 modules = i386 sh x86_64 ia64 alpha arm aarch64 sparc ppc ppc64 s390 \
@@ -255,7 +254,7 @@ Index: elfutils-0.158/backends/Makefile.am
255 noinst_LIBRARIES = $(libebl_pic) 254 noinst_LIBRARIES = $(libebl_pic)
256 noinst_DATA = $(libebl_pic:_pic.a=.so) 255 noinst_DATA = $(libebl_pic:_pic.a=.so)
257 256
258@@ -125,6 +125,10 @@ 257@@ -120,6 +120,10 @@ mips_SRCS = mips_init.c mips_symbol.c mi
259 libebl_mips_pic_a_SOURCES = $(mips_SRCS) 258 libebl_mips_pic_a_SOURCES = $(mips_SRCS)
260 am_libebl_mips_pic_a_OBJECTS = $(mips_SRCS:.c=.os) 259 am_libebl_mips_pic_a_OBJECTS = $(mips_SRCS:.c=.os)
261 260
@@ -265,11 +264,11 @@ Index: elfutils-0.158/backends/Makefile.am
265+ 264+
266 libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw) 265 libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw)
267 @rm -f $(@:.so=.map) 266 @rm -f $(@:.so=.map)
268 echo 'ELFUTILS_$(PACKAGE_VERSION) { global: $*_init; local: *; };' \ 267 $(AM_V_at)echo 'ELFUTILS_$(PACKAGE_VERSION) { global: $*_init; local: *; };' \
269Index: elfutils-0.158/backends/m68k_symbol.c 268Index: elfutils-0.164/backends/m68k_symbol.c
270=================================================================== 269===================================================================
271--- /dev/null 1970-01-01 00:00:00.000000000 +0000 270--- /dev/null
272+++ elfutils-0.158/backends/m68k_symbol.c 2014-04-21 11:14:23.813175704 +0000 271+++ elfutils-0.164/backends/m68k_symbol.c
273@@ -0,0 +1,43 @@ 272@@ -0,0 +1,43 @@
274+/* m68k specific symbolic name handling. 273+/* m68k specific symbolic name handling.
275+ Copyright (C) 2007 Kurt Roeckx <kurt@roeckx.be> 274+ Copyright (C) 2007 Kurt Roeckx <kurt@roeckx.be>
@@ -314,10 +313,10 @@ Index: elfutils-0.158/backends/m68k_symbol.c
314+ return ELF_T_NUM; 313+ return ELF_T_NUM;
315+ } 314+ }
316+} 315+}
317Index: elfutils-0.158/backends/m68k_retval.c 316Index: elfutils-0.164/backends/m68k_retval.c
318=================================================================== 317===================================================================
319--- /dev/null 1970-01-01 00:00:00.000000000 +0000 318--- /dev/null
320+++ elfutils-0.158/backends/m68k_retval.c 2014-04-21 11:14:23.813175704 +0000 319+++ elfutils-0.164/backends/m68k_retval.c
321@@ -0,0 +1,172 @@ 320@@ -0,0 +1,172 @@
322+/* Function return value location for Linux/m68k ABI. 321+/* Function return value location for Linux/m68k ABI.
323+ Copyright (C) 2005-2010 Red Hat, Inc. 322+ Copyright (C) 2005-2010 Red Hat, Inc.
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.163/mips_backend.diff b/meta/recipes-devtools/elfutils/elfutils-0.164/mips_backend.diff
index d73a3f2869..de1237be09 100644
--- a/meta/recipes-devtools/elfutils/elfutils-0.163/mips_backend.diff
+++ b/meta/recipes-devtools/elfutils/elfutils-0.164/mips_backend.diff
@@ -1,8 +1,8 @@
1Index: elfutils-0.158/backends/mips_init.c 1Index: elfutils-0.164/backends/mips_init.c
2=================================================================== 2===================================================================
3--- /dev/null 1970-01-01 00:00:00.000000000 +0000 3--- /dev/null
4+++ elfutils-0.158/backends/mips_init.c 2014-04-21 11:13:36.910235965 +0000 4+++ elfutils-0.164/backends/mips_init.c
5@@ -0,0 +1,60 @@ 5@@ -0,0 +1,59 @@
6+/* Initialization of mips specific backend library. 6+/* Initialization of mips specific backend library.
7+ Copyright (C) 2006 Red Hat, Inc. 7+ Copyright (C) 2006 Red Hat, Inc.
8+ This file is part of Red Hat elfutils. 8+ This file is part of Red Hat elfutils.
@@ -40,11 +40,10 @@ Index: elfutils-0.158/backends/mips_init.c
40+#include "common-reloc.c" 40+#include "common-reloc.c"
41+ 41+
42+const char * 42+const char *
43+mips_init (elf, machine, eh, ehlen) 43+mips_init (Elf *elf __attribute__ ((unused)),
44+ Elf *elf __attribute__ ((unused)); 44+ GElf_Half machine __attribute__ ((unused)),
45+ GElf_Half machine __attribute__ ((unused)); 45+ Ebl *eh,
46+ Ebl *eh; 46+ size_t ehlen)
47+ size_t ehlen;
48+{ 47+{
49+ /* Check whether the Elf_BH object has a sufficent size. */ 48+ /* Check whether the Elf_BH object has a sufficent size. */
50+ if (ehlen < sizeof (Ebl)) 49+ if (ehlen < sizeof (Ebl))
@@ -63,10 +62,10 @@ Index: elfutils-0.158/backends/mips_init.c
63+ 62+
64+ return MODVERSION; 63+ return MODVERSION;
65+} 64+}
66Index: elfutils-0.158/backends/mips_regs.c 65Index: elfutils-0.164/backends/mips_regs.c
67=================================================================== 66===================================================================
68--- /dev/null 1970-01-01 00:00:00.000000000 +0000 67--- /dev/null
69+++ elfutils-0.158/backends/mips_regs.c 2014-04-21 11:13:36.910235965 +0000 68+++ elfutils-0.164/backends/mips_regs.c
70@@ -0,0 +1,104 @@ 69@@ -0,0 +1,104 @@
71+/* Register names and numbers for MIPS DWARF. 70+/* Register names and numbers for MIPS DWARF.
72+ Copyright (C) 2006 Red Hat, Inc. 71+ Copyright (C) 2006 Red Hat, Inc.
@@ -172,10 +171,10 @@ Index: elfutils-0.158/backends/mips_regs.c
172+ name[namelen++] = '\0'; 171+ name[namelen++] = '\0';
173+ return namelen; 172+ return namelen;
174+} 173+}
175Index: elfutils-0.158/backends/mips_reloc.def 174Index: elfutils-0.164/backends/mips_reloc.def
176=================================================================== 175===================================================================
177--- /dev/null 1970-01-01 00:00:00.000000000 +0000 176--- /dev/null
178+++ elfutils-0.158/backends/mips_reloc.def 2014-04-21 11:13:36.910235965 +0000 177+++ elfutils-0.164/backends/mips_reloc.def
179@@ -0,0 +1,79 @@ 178@@ -0,0 +1,79 @@
180+/* List the relocation types for mips. -*- C -*- 179+/* List the relocation types for mips. -*- C -*-
181+ Copyright (C) 2006 Red Hat, Inc. 180+ Copyright (C) 2006 Red Hat, Inc.
@@ -256,10 +255,10 @@ Index: elfutils-0.158/backends/mips_reloc.def
256+ 255+
257+#define NO_COPY_RELOC 1 256+#define NO_COPY_RELOC 1
258+#define NO_RELATIVE_RELOC 1 257+#define NO_RELATIVE_RELOC 1
259Index: elfutils-0.158/backends/mips_retval.c 258Index: elfutils-0.164/backends/mips_retval.c
260=================================================================== 259===================================================================
261--- /dev/null 1970-01-01 00:00:00.000000000 +0000 260--- /dev/null
262+++ elfutils-0.158/backends/mips_retval.c 2014-04-21 11:13:36.910235965 +0000 261+++ elfutils-0.164/backends/mips_retval.c
263@@ -0,0 +1,321 @@ 262@@ -0,0 +1,321 @@
264+/* Function return value location for Linux/mips ABI. 263+/* Function return value location for Linux/mips ABI.
265+ Copyright (C) 2005 Red Hat, Inc. 264+ Copyright (C) 2005 Red Hat, Inc.
@@ -582,10 +581,10 @@ Index: elfutils-0.158/backends/mips_retval.c
582+ DWARF and might be valid. */ 581+ DWARF and might be valid. */
583+ return -2; 582+ return -2;
584+} 583+}
585Index: elfutils-0.158/backends/mips_symbol.c 584Index: elfutils-0.164/backends/mips_symbol.c
586=================================================================== 585===================================================================
587--- /dev/null 1970-01-01 00:00:00.000000000 +0000 586--- /dev/null
588+++ elfutils-0.158/backends/mips_symbol.c 2014-04-21 11:13:36.910235965 +0000 587+++ elfutils-0.164/backends/mips_symbol.c
589@@ -0,0 +1,52 @@ 588@@ -0,0 +1,52 @@
590+/* MIPS specific symbolic name handling. 589+/* MIPS specific symbolic name handling.
591+ Copyright (C) 2002, 2003, 2005 Red Hat, Inc. 590+ Copyright (C) 2002, 2003, 2005 Red Hat, Inc.
@@ -639,11 +638,11 @@ Index: elfutils-0.158/backends/mips_symbol.c
639+ return ELF_T_NUM; 638+ return ELF_T_NUM;
640+ } 639+ }
641+} 640+}
642Index: elfutils-0.158/libebl/eblopenbackend.c 641Index: elfutils-0.164/libebl/eblopenbackend.c
643=================================================================== 642===================================================================
644--- elfutils-0.158.orig/libebl/eblopenbackend.c 2014-04-21 11:13:36.914235875 +0000 643--- elfutils-0.164.orig/libebl/eblopenbackend.c
645+++ elfutils-0.158/libebl/eblopenbackend.c 2014-04-21 11:13:36.910235965 +0000 644+++ elfutils-0.164/libebl/eblopenbackend.c
646@@ -71,6 +71,8 @@ 645@@ -71,6 +71,8 @@ static const struct
647 { "sparc", "elf_sparc", "sparc", 5, EM_SPARC, 0, 0 }, 646 { "sparc", "elf_sparc", "sparc", 5, EM_SPARC, 0, 0 },
648 { "sparc", "elf_sparcv8plus", "sparc", 5, EM_SPARC32PLUS, 0, 0 }, 647 { "sparc", "elf_sparcv8plus", "sparc", 5, EM_SPARC32PLUS, 0, 0 },
649 { "s390", "ebl_s390", "s390", 4, EM_S390, 0, 0 }, 648 { "s390", "ebl_s390", "s390", 4, EM_S390, 0, 0 },
@@ -652,11 +651,11 @@ Index: elfutils-0.158/libebl/eblopenbackend.c
652 651
653 { "m32", "elf_m32", "m32", 3, EM_M32, 0, 0 }, 652 { "m32", "elf_m32", "m32", 3, EM_M32, 0, 0 },
654 { "m68k", "elf_m68k", "m68k", 4, EM_68K, 0, 0 }, 653 { "m68k", "elf_m68k", "m68k", 4, EM_68K, 0, 0 },
655Index: elfutils-0.158/backends/common-reloc.c 654Index: elfutils-0.164/backends/common-reloc.c
656=================================================================== 655===================================================================
657--- elfutils-0.158.orig/backends/common-reloc.c 2014-04-21 11:13:36.914235875 +0000 656--- elfutils-0.164.orig/backends/common-reloc.c
658+++ elfutils-0.158/backends/common-reloc.c 2014-04-21 11:13:36.910235965 +0000 657+++ elfutils-0.164/backends/common-reloc.c
659@@ -112,11 +112,13 @@ 658@@ -125,11 +125,13 @@ EBLHOOK(reloc_valid_use) (Elf *elf, int
660 } 659 }
661 660
662 661
@@ -670,7 +669,7 @@ Index: elfutils-0.158/backends/common-reloc.c
670 669
671 bool 670 bool
672 EBLHOOK(none_reloc_p) (int reloc) 671 EBLHOOK(none_reloc_p) (int reloc)
673@@ -138,7 +140,9 @@ 672@@ -151,7 +153,9 @@ EBLHOOK(init_reloc) (Ebl *ebl)
674 ebl->reloc_type_name = EBLHOOK(reloc_type_name); 673 ebl->reloc_type_name = EBLHOOK(reloc_type_name);
675 ebl->reloc_type_check = EBLHOOK(reloc_type_check); 674 ebl->reloc_type_check = EBLHOOK(reloc_type_check);
676 ebl->reloc_valid_use = EBLHOOK(reloc_valid_use); 675 ebl->reloc_valid_use = EBLHOOK(reloc_valid_use);
@@ -680,11 +679,11 @@ Index: elfutils-0.158/backends/common-reloc.c
680 ebl->none_reloc_p = EBLHOOK(none_reloc_p); 679 ebl->none_reloc_p = EBLHOOK(none_reloc_p);
681 #ifndef NO_RELATIVE_RELOC 680 #ifndef NO_RELATIVE_RELOC
682 ebl->relative_reloc_p = EBLHOOK(relative_reloc_p); 681 ebl->relative_reloc_p = EBLHOOK(relative_reloc_p);
683Index: elfutils-0.158/backends/Makefile.am 682Index: elfutils-0.164/backends/Makefile.am
684=================================================================== 683===================================================================
685--- elfutils-0.158.orig/backends/Makefile.am 2014-04-21 11:13:36.914235875 +0000 684--- elfutils-0.164.orig/backends/Makefile.am
686+++ elfutils-0.158/backends/Makefile.am 2014-04-21 11:14:10.841468934 +0000 685+++ elfutils-0.164/backends/Makefile.am
687@@ -33,12 +33,12 @@ 686@@ -33,12 +33,12 @@ AM_CPPFLAGS += -I$(top_srcdir)/libebl -I
688 687
689 688
690 modules = i386 sh x86_64 ia64 alpha arm aarch64 sparc ppc ppc64 s390 \ 689 modules = i386 sh x86_64 ia64 alpha arm aarch64 sparc ppc ppc64 s390 \
@@ -699,7 +698,7 @@ Index: elfutils-0.158/backends/Makefile.am
699 noinst_LIBRARIES = $(libebl_pic) 698 noinst_LIBRARIES = $(libebl_pic)
700 noinst_DATA = $(libebl_pic:_pic.a=.so) 699 noinst_DATA = $(libebl_pic:_pic.a=.so)
701 700
702@@ -121,6 +121,10 @@ 701@@ -116,6 +116,10 @@ parisc_SRCS = parisc_init.c parisc_symbo
703 libebl_parisc_pic_a_SOURCES = $(parisc_SRCS) 702 libebl_parisc_pic_a_SOURCES = $(parisc_SRCS)
704 am_libebl_parisc_pic_a_OBJECTS = $(parisc_SRCS:.c=.os) 703 am_libebl_parisc_pic_a_OBJECTS = $(parisc_SRCS:.c=.os)
705 704
@@ -709,4 +708,4 @@ Index: elfutils-0.158/backends/Makefile.am
709+ 708+
710 libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw) 709 libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw)
711 @rm -f $(@:.so=.map) 710 @rm -f $(@:.so=.map)
712 echo 'ELFUTILS_$(PACKAGE_VERSION) { global: $*_init; local: *; };' \ 711 $(AM_V_at)echo 'ELFUTILS_$(PACKAGE_VERSION) { global: $*_init; local: *; };' \
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.163/mips_readelf_w.patch b/meta/recipes-devtools/elfutils/elfutils-0.164/mips_readelf_w.patch
index 8e669e7199..930d6f664e 100644
--- a/meta/recipes-devtools/elfutils/elfutils-0.163/mips_readelf_w.patch
+++ b/meta/recipes-devtools/elfutils/elfutils-0.164/mips_readelf_w.patch
@@ -6,11 +6,11 @@ Forwarded: not-needed
6Upstreams wants a change where this is handled by a hook that needs 6Upstreams wants a change where this is handled by a hook that needs
7to be filled in by the backend for the arch. 7to be filled in by the backend for the arch.
8 8
9Index: elfutils-0.153/src/readelf.c 9Index: elfutils-0.164/src/readelf.c
10=================================================================== 10===================================================================
11--- elfutils-0.153.orig/src/readelf.c 2012-08-10 22:01:55.000000000 +0200 11--- elfutils-0.164.orig/src/readelf.c
12+++ elfutils-0.153/src/readelf.c 2012-09-18 21:46:27.000000000 +0200 12+++ elfutils-0.164/src/readelf.c
13@@ -7364,7 +7364,8 @@ 13@@ -8218,7 +8218,8 @@ print_debug (Dwfl_Module *dwflmod, Ebl *
14 GElf_Shdr shdr_mem; 14 GElf_Shdr shdr_mem;
15 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); 15 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem);
16 16
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.163/testsuite-ignore-elflint.diff b/meta/recipes-devtools/elfutils/elfutils-0.164/testsuite-ignore-elflint.diff
index eae5796de3..eae5796de3 100644
--- a/meta/recipes-devtools/elfutils/elfutils-0.163/testsuite-ignore-elflint.diff
+++ b/meta/recipes-devtools/elfutils/elfutils-0.164/testsuite-ignore-elflint.diff
diff --git a/meta/recipes-devtools/elfutils/elfutils_0.163.bb b/meta/recipes-devtools/elfutils/elfutils_0.164.bb
index e391813639..c27635dda3 100644
--- a/meta/recipes-devtools/elfutils/elfutils_0.163.bb
+++ b/meta/recipes-devtools/elfutils/elfutils_0.164.bb
@@ -7,8 +7,8 @@ DEPENDS = "libtool bzip2 zlib virtual/libintl"
7 7
8SRC_URI = "https://fedorahosted.org/releases/e/l/elfutils/${PV}/${BP}.tar.bz2" 8SRC_URI = "https://fedorahosted.org/releases/e/l/elfutils/${PV}/${BP}.tar.bz2"
9 9
10SRC_URI[md5sum] = "77ce87f259987d2e54e4d87b86cbee41" 10SRC_URI[md5sum] = "2e4536c1c48034f188a80789a59114d8"
11SRC_URI[sha256sum] = "7c774f1eef329309f3b05e730bdac50013155d437518a2ec0e24871d312f2e23" 11SRC_URI[sha256sum] = "9683c025928a12d06b7fe812928aa6235249e22d197d086f7084606a48165900"
12 12
13SRC_URI += "\ 13SRC_URI += "\
14 file://mempcpy.patch \ 14 file://mempcpy.patch \
@@ -21,19 +21,18 @@ SRC_URI += "\
21" 21"
22 22
23# pick the patch from debian 23# pick the patch from debian
24# http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.159-4.debian.tar.xz 24# http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.164-1.debian.tar.xz
25SRC_URI += "\ 25SRC_URI += "\
26 file://redhat-portability.diff \
27 file://hppa_backend.diff \ 26 file://hppa_backend.diff \
28 file://arm_backend.diff \ 27 file://arm_backend.diff \
29 file://mips_backend.diff \ 28 file://mips_backend.diff \
30 file://m68k_backend.diff \ 29 file://m68k_backend.diff \
31 file://testsuite-ignore-elflint.diff \ 30 file://testsuite-ignore-elflint.diff \
32 file://scanf-format.patch \
33 file://mips_readelf_w.patch \ 31 file://mips_readelf_w.patch \
34 file://arm_func_value.patch \ 32 file://kfreebsd_path.patch \
35 file://arm_unwind_ret_mask.patch \ 33 file://0001-Ignore-differences-between-mips-machine-identifiers.patch \
36 file://non_linux.patch \ 34 file://0002-Add-support-for-mips64-abis-in-mips_retval.c.patch \
35 file://0003-Add-mips-n64-relocation-format-hack.patch \
37" 36"
38 37
39# Only apply when building uclibc based target recipe 38# Only apply when building uclibc based target recipe