summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--patches/elfutils-0.176/0001-hppa_backend.patch (renamed from patches/elfutils-0.176/hppa_backend.diff)156
-rw-r--r--patches/elfutils-0.176/0002-arm_backend.patch (renamed from patches/elfutils-0.176/arm_backend.diff)332
-rw-r--r--patches/elfutils-0.176/0003-mips_backend.patch (renamed from patches/elfutils-0.176/mips_backend.diff)127
-rw-r--r--patches/elfutils-0.176/0004-Make-readelf-w-output-debug-information-on-mips.patch29
-rw-r--r--patches/elfutils-0.176/0005-Ignore-differences-between-mips-machine-identifiers.patch (renamed from patches/elfutils-0.176/0001-Ignore-differences-between-mips-machine-identifiers.patch)13
-rw-r--r--patches/elfutils-0.176/0006-Add-support-for-mips64-abis-in-mips_retval.c.patch (renamed from patches/elfutils-0.176/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch)12
-rw-r--r--patches/elfutils-0.176/0007-Add-mips-n64-relocation-format-hack.patch (renamed from patches/elfutils-0.176/0003-Add-mips-n64-relocation-format-hack.patch)61
-rw-r--r--patches/elfutils-0.176/0008-disable-Werror-as-it-tends-to-break-with-new-gcc-ver.patch23
-rw-r--r--patches/elfutils-0.176/0009-mips_cfi.patch (renamed from patches/elfutils-0.176/mips_cfi.patch)43
-rw-r--r--patches/elfutils-0.176/disable_werror.patch17
-rw-r--r--patches/elfutils-0.176/hurd_path.patch14
-rw-r--r--patches/elfutils-0.176/ignore_strmerge.diff11
-rw-r--r--patches/elfutils-0.176/kfreebsd_path.patch17
-rw-r--r--patches/elfutils-0.176/mips_readelf_w.patch22
-rw-r--r--patches/elfutils-0.176/series25
-rw-r--r--patches/elfutils-0.176/testsuite-ignore-elflint.diff40
16 files changed, 483 insertions, 459 deletions
diff --git a/patches/elfutils-0.176/hppa_backend.diff b/patches/elfutils-0.176/0001-hppa_backend.patch
index 336ee2ba1..dcb4f1eeb 100644
--- a/patches/elfutils-0.176/hppa_backend.diff
+++ b/patches/elfutils-0.176/0001-hppa_backend.patch
@@ -1,7 +1,77 @@
-Index: elfutils-0.175/backends/parisc_init.c
-===================================================================
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Date: Mon, 4 Mar 2019 13:20:35 +0100
+Subject: [PATCH] hppa_backend
+
+Imported from elfutils_0.176-1.debian.tar.xz
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+---
+ backends/Makefile.am | 8 +-
+ backends/libebl_parisc.h | 9 ++
+ backends/parisc_init.c | 73 ++++++++++++++++
+ backends/parisc_regs.c | 159 ++++++++++++++++++++++++++++++++++
+ backends/parisc_reloc.def | 128 ++++++++++++++++++++++++++++
+ backends/parisc_retval.c | 213 ++++++++++++++++++++++++++++++++++++++++++++++
+ backends/parisc_symbol.c | 113 ++++++++++++++++++++++++
+ libelf/elf.h | 11 +++
+ 8 files changed, 712 insertions(+), 2 deletions(-)
+ create mode 100644 backends/libebl_parisc.h
+ create mode 100644 backends/parisc_init.c
+ create mode 100644 backends/parisc_regs.c
+ create mode 100644 backends/parisc_reloc.def
+ create mode 100644 backends/parisc_retval.c
+ create mode 100644 backends/parisc_symbol.c
+
+diff --git a/backends/Makefile.am b/backends/Makefile.am
+index 2126a2eca42e..5671a32c4210 100644
+--- a/backends/Makefile.am
++++ b/backends/Makefile.am
+@@ -33,12 +33,13 @@ AM_CPPFLAGS += -I$(top_srcdir)/libebl -I$(top_srcdir)/libasm \
+
+
+ modules = i386 sh x86_64 ia64 alpha arm aarch64 sparc ppc ppc64 s390 \
+- tilegx m68k bpf riscv
++ tilegx m68k bpf riscv parisc
+ libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a \
+ libebl_ia64_pic.a libebl_alpha_pic.a libebl_arm_pic.a \
+ libebl_aarch64_pic.a libebl_sparc_pic.a libebl_ppc_pic.a \
+ libebl_ppc64_pic.a libebl_s390_pic.a libebl_tilegx_pic.a \
+- libebl_m68k_pic.a libebl_bpf_pic.a libebl_riscv_pic.a
++ libebl_m68k_pic.a libebl_bpf_pic.a libebl_riscv_pic.a \
++ libebl_parisc_pic.a
+ noinst_LIBRARIES = $(libebl_pic)
+ noinst_DATA = $(libebl_pic:_pic.a=.so)
+
+@@ -136,6 +137,9 @@ riscv_SRCS = riscv_init.c riscv_symbol.c riscv_cfi.c riscv_regs.c \
+ libebl_riscv_pic_a_SOURCES = $(riscv_SRCS)
+ am_libebl_riscv_pic_a_OBJECTS = $(riscv_SRCS:.c=.os)
+
++parisc_SRCS = parisc_init.c parisc_symbol.c parisc_regs.c parisc_retval.c
++libebl_parisc_pic_a_SOURCES = $(parisc_SRCS)
++am_libebl_parisc_pic_a_OBJECTS = $(parisc_SRCS:.c=.os)
+
+ libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw) $(libeu)
+ @rm -f $(@:.so=.map)
+diff --git a/backends/libebl_parisc.h b/backends/libebl_parisc.h
+new file mode 100644
+index 000000000000..f473b793e533
+--- /dev/null
++++ b/backends/libebl_parisc.h
+@@ -0,0 +1,9 @@
++#ifndef _LIBEBL_HPPA_H
++#define _LIBEBL_HPPA_H 1
++
++#include <libdw.h>
++
++extern int parisc_return_value_location_32(Dwarf_Die *, const Dwarf_Op **locp);
++extern int parisc_return_value_location_64(Dwarf_Die *, const Dwarf_Op **locp);
++
++#endif
+diff --git a/backends/parisc_init.c b/backends/parisc_init.c
+new file mode 100644
+index 000000000000..f1e401cfe1d2
--- /dev/null
-+++ elfutils-0.175/backends/parisc_init.c
++++ b/backends/parisc_init.c
@@ -0,0 +1,73 @@
+/* Initialization of PA-RISC specific backend library.
+ Copyright (C) 2002, 2005, 2006 Red Hat, Inc.
@@ -76,10 +146,11 @@ Index: elfutils-0.175/backends/parisc_init.c
+
+ return MODVERSION;
+}
-Index: elfutils-0.175/backends/parisc_regs.c
-===================================================================
+diff --git a/backends/parisc_regs.c b/backends/parisc_regs.c
+new file mode 100644
+index 000000000000..3895f8eb00b6
--- /dev/null
-+++ elfutils-0.175/backends/parisc_regs.c
++++ b/backends/parisc_regs.c
@@ -0,0 +1,159 @@
+/* Register names and numbers for PA-RISC DWARF.
+ Copyright (C) 2005, 2006 Red Hat, Inc.
@@ -240,10 +311,11 @@ Index: elfutils-0.175/backends/parisc_regs.c
+ name[namelen++] = '\0';
+ return namelen;
+}
-Index: elfutils-0.175/backends/parisc_reloc.def
-===================================================================
+diff --git a/backends/parisc_reloc.def b/backends/parisc_reloc.def
+new file mode 100644
+index 000000000000..1f875bab33a0
--- /dev/null
-+++ elfutils-0.175/backends/parisc_reloc.def
++++ b/backends/parisc_reloc.def
@@ -0,0 +1,128 @@
+/* List the relocation types for PA-RISC. -*- C -*-
+ Copyright (C) 2005 Red Hat, Inc.
@@ -373,10 +445,11 @@ Index: elfutils-0.175/backends/parisc_reloc.def
+RELOC_TYPE (TLS_DTPMOD64, DYN)
+
+#define NO_RELATIVE_RELOC 1
-Index: elfutils-0.175/backends/parisc_retval.c
-===================================================================
+diff --git a/backends/parisc_retval.c b/backends/parisc_retval.c
+new file mode 100644
+index 000000000000..df7ec3a06e85
--- /dev/null
-+++ elfutils-0.175/backends/parisc_retval.c
++++ b/backends/parisc_retval.c
@@ -0,0 +1,213 @@
+/* Function return value location for Linux/PA-RISC ABI.
+ Copyright (C) 2005 Red Hat, Inc.
@@ -591,10 +664,11 @@ Index: elfutils-0.175/backends/parisc_retval.c
+ return parisc_return_value_location_ (functypedie, locp, 1);
+}
+
-Index: elfutils-0.175/backends/parisc_symbol.c
-===================================================================
+diff --git a/backends/parisc_symbol.c b/backends/parisc_symbol.c
+new file mode 100644
+index 000000000000..5754bd8a2384
--- /dev/null
-+++ elfutils-0.175/backends/parisc_symbol.c
++++ b/backends/parisc_symbol.c
@@ -0,0 +1,113 @@
+/* PA-RISC specific symbolic name handling.
+ Copyright (C) 2002, 2005 Red Hat, Inc.
@@ -709,54 +783,10 @@ Index: elfutils-0.175/backends/parisc_symbol.c
+ return ELF_T_NUM;
+ }
+}
-Index: elfutils-0.175/backends/libebl_parisc.h
-===================================================================
---- /dev/null
-+++ elfutils-0.175/backends/libebl_parisc.h
-@@ -0,0 +1,9 @@
-+#ifndef _LIBEBL_HPPA_H
-+#define _LIBEBL_HPPA_H 1
-+
-+#include <libdw.h>
-+
-+extern int parisc_return_value_location_32(Dwarf_Die *, const Dwarf_Op **locp);
-+extern int parisc_return_value_location_64(Dwarf_Die *, const Dwarf_Op **locp);
-+
-+#endif
-Index: elfutils-0.175/backends/Makefile.am
-===================================================================
---- elfutils-0.175.orig/backends/Makefile.am
-+++ elfutils-0.175/backends/Makefile.am
-@@ -33,12 +33,13 @@ AM_CPPFLAGS += -I$(top_srcdir)/libebl -I
-
-
- modules = i386 sh x86_64 ia64 alpha arm aarch64 sparc ppc ppc64 s390 \
-- tilegx m68k bpf riscv
-+ tilegx m68k bpf riscv parisc
- libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a \
- libebl_ia64_pic.a libebl_alpha_pic.a libebl_arm_pic.a \
- libebl_aarch64_pic.a libebl_sparc_pic.a libebl_ppc_pic.a \
- libebl_ppc64_pic.a libebl_s390_pic.a libebl_tilegx_pic.a \
-- libebl_m68k_pic.a libebl_bpf_pic.a libebl_riscv_pic.a
-+ libebl_m68k_pic.a libebl_bpf_pic.a libebl_riscv_pic.a \
-+ libebl_parisc_pic.a
- noinst_LIBRARIES = $(libebl_pic)
- noinst_DATA = $(libebl_pic:_pic.a=.so)
-
-@@ -136,6 +137,9 @@ riscv_SRCS = riscv_init.c riscv_symbol.c
- libebl_riscv_pic_a_SOURCES = $(riscv_SRCS)
- am_libebl_riscv_pic_a_OBJECTS = $(riscv_SRCS:.c=.os)
-
-+parisc_SRCS = parisc_init.c parisc_symbol.c parisc_regs.c parisc_retval.c
-+libebl_parisc_pic_a_SOURCES = $(parisc_SRCS)
-+am_libebl_parisc_pic_a_OBJECTS = $(parisc_SRCS:.c=.os)
-
- libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw) $(libeu)
- @rm -f $(@:.so=.map)
-Index: elfutils-0.175/libelf/elf.h
-===================================================================
---- elfutils-0.175.orig/libelf/elf.h
-+++ elfutils-0.175/libelf/elf.h
+diff --git a/libelf/elf.h b/libelf/elf.h
+index 75043bcbf900..631005418650 100644
+--- a/libelf/elf.h
++++ b/libelf/elf.h
@@ -2155,16 +2155,24 @@ enum
#define R_PARISC_PCREL17F 12 /* 17 bits of rel. address. */
#define R_PARISC_PCREL14R 14 /* Right 14 bits of rel. address. */
diff --git a/patches/elfutils-0.176/arm_backend.diff b/patches/elfutils-0.176/0002-arm_backend.patch
index 6a85baf4b..0c19e2968 100644
--- a/patches/elfutils-0.176/arm_backend.diff
+++ b/patches/elfutils-0.176/0002-arm_backend.patch
@@ -1,7 +1,26 @@
-Index: elfutils-0.175/backends/arm_init.c
-===================================================================
---- elfutils-0.175.orig/backends/arm_init.c
-+++ elfutils-0.175/backends/arm_init.c
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Date: Mon, 4 Mar 2019 13:20:36 +0100
+Subject: [PATCH] arm_backend
+
+Imported from elfutils_0.176-1.debian.tar.xz
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+---
+ backends/arm_init.c | 18 ++++-
+ backends/arm_regs.c | 132 ++++++++++++++++++++++++++++++++++++
+ backends/arm_retval.c | 43 +++++++++++-
+ backends/libebl_arm.h | 9 +++
+ libelf/elf.h | 11 +++
+ tests/run-addrcfi.sh | 93 ++++++++++++++++++++++++-
+ tests/run-allregs.sh | 95 +++++++++++++++++++++++++-
+ tests/run-readelf-mixed-corenote.sh | 11 ++-
+ 8 files changed, 400 insertions(+), 12 deletions(-)
+ create mode 100644 backends/libebl_arm.h
+
+diff --git a/backends/arm_init.c b/backends/arm_init.c
+index f2b1b11ea5bb..1b71f1615e6d 100644
+--- a/backends/arm_init.c
++++ b/backends/arm_init.c
@@ -35,20 +35,31 @@
#define RELOC_PREFIX R_ARM_
#include "libebl_CPU.h"
@@ -35,7 +54,7 @@ Index: elfutils-0.175/backends/arm_init.c
/* We handle it. */
eh->name = "ARM";
arm_init_reloc (eh);
-@@ -60,7 +71,10 @@ arm_init (Elf *elf __attribute__ ((unuse
+@@ -60,7 +71,10 @@ arm_init (Elf *elf __attribute__ ((unused)),
HOOK (eh, core_note);
HOOK (eh, auxv_info);
HOOK (eh, check_object_attribute);
@@ -47,10 +66,10 @@ Index: elfutils-0.175/backends/arm_init.c
HOOK (eh, abi_cfi);
HOOK (eh, check_reloc_target_type);
HOOK (eh, symbol_type_name);
-Index: elfutils-0.175/backends/arm_regs.c
-===================================================================
---- elfutils-0.175.orig/backends/arm_regs.c
-+++ elfutils-0.175/backends/arm_regs.c
+diff --git a/backends/arm_regs.c b/backends/arm_regs.c
+index a46a4c9982cc..418c93180b31 100644
+--- a/backends/arm_regs.c
++++ b/backends/arm_regs.c
@@ -31,6 +31,7 @@
#endif
@@ -59,7 +78,7 @@ Index: elfutils-0.175/backends/arm_regs.c
#include <dwarf.h>
#define BACKEND arm_
-@@ -76,6 +77,9 @@ arm_register_info (Ebl *ebl __attribute_
+@@ -76,6 +77,9 @@ arm_register_info (Ebl *ebl __attribute__ ((unused)),
break;
case 16 + 0 ... 16 + 7:
@@ -69,7 +88,7 @@ Index: elfutils-0.175/backends/arm_regs.c
regno += 96 - 16;
FALLTHROUGH;
case 96 + 0 ... 96 + 7:
-@@ -87,11 +91,139 @@ arm_register_info (Ebl *ebl __attribute_
+@@ -87,11 +91,139 @@ arm_register_info (Ebl *ebl __attribute__ ((unused)),
namelen = 2;
break;
@@ -209,10 +228,10 @@ Index: elfutils-0.175/backends/arm_regs.c
*setname = "VFP";
*type = DW_ATE_float;
*bits = 64;
-Index: elfutils-0.175/backends/arm_retval.c
-===================================================================
---- elfutils-0.175.orig/backends/arm_retval.c
-+++ elfutils-0.175/backends/arm_retval.c
+diff --git a/backends/arm_retval.c b/backends/arm_retval.c
+index 1c28f016b5bc..313e4eb266a3 100644
+--- a/backends/arm_retval.c
++++ b/backends/arm_retval.c
@@ -48,6 +48,13 @@ static const Dwarf_Op loc_intreg[] =
#define nloc_intreg 1
#define nloc_intregs(n) (2 * (n))
@@ -239,7 +258,7 @@ Index: elfutils-0.175/backends/arm_retval.c
{
/* Start with the function's type, and get the DW_AT_type attribute,
which is the type of the return value. */
-@@ -98,6 +106,21 @@ arm_return_value_location (Dwarf_Die *fu
+@@ -98,6 +106,21 @@ arm_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
else
return -1;
}
@@ -261,7 +280,7 @@ Index: elfutils-0.175/backends/arm_retval.c
if (size <= 16)
{
intreg:
-@@ -106,6 +129,7 @@ arm_return_value_location (Dwarf_Die *fu
+@@ -106,6 +129,7 @@ arm_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
}
aggregate:
@@ -269,7 +288,7 @@ Index: elfutils-0.175/backends/arm_retval.c
*locp = loc_aggregate;
return nloc_aggregate;
}
-@@ -125,3 +149,18 @@ arm_return_value_location (Dwarf_Die *fu
+@@ -125,3 +149,18 @@ arm_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
DWARF and might be valid. */
return -2;
}
@@ -288,10 +307,25 @@ Index: elfutils-0.175/backends/arm_retval.c
+ return arm_return_value_location_ (functypedie, locp, 0);
+}
+
-Index: elfutils-0.175/libelf/elf.h
-===================================================================
---- elfutils-0.175.orig/libelf/elf.h
-+++ elfutils-0.175/libelf/elf.h
+diff --git a/backends/libebl_arm.h b/backends/libebl_arm.h
+new file mode 100644
+index 000000000000..c00770c2e887
+--- /dev/null
++++ b/backends/libebl_arm.h
+@@ -0,0 +1,9 @@
++#ifndef _LIBEBL_ARM_H
++#define _LIBEBL_ARM_H 1
++
++#include <libdw.h>
++
++extern int arm_return_value_location_soft(Dwarf_Die *, const Dwarf_Op **locp);
++extern int arm_return_value_location_hard(Dwarf_Die *, const Dwarf_Op **locp);
++
++#endif
+diff --git a/libelf/elf.h b/libelf/elf.h
+index 631005418650..5dc632b73a3b 100644
+--- a/libelf/elf.h
++++ b/libelf/elf.h
@@ -2694,6 +2694,9 @@ enum
#define EF_ARM_EABI_VER4 0x04000000
#define EF_ARM_EABI_VER5 0x05000000
@@ -330,24 +364,121 @@ Index: elfutils-0.175/libelf/elf.h
#define R_ARM_ME_TOO 128 /* Obsolete. */
#define R_ARM_THM_TLS_DESCSEQ 129
#define R_ARM_THM_TLS_DESCSEQ16 129
-Index: elfutils-0.175/backends/libebl_arm.h
-===================================================================
---- /dev/null
-+++ elfutils-0.175/backends/libebl_arm.h
-@@ -0,0 +1,9 @@
-+#ifndef _LIBEBL_ARM_H
-+#define _LIBEBL_ARM_H 1
-+
-+#include <libdw.h>
-+
-+extern int arm_return_value_location_soft(Dwarf_Die *, const Dwarf_Op **locp);
-+extern int arm_return_value_location_hard(Dwarf_Die *, const Dwarf_Op **locp);
-+
-+#endif
-Index: elfutils-0.175/tests/run-allregs.sh
-===================================================================
---- elfutils-0.175.orig/tests/run-allregs.sh
-+++ elfutils-0.175/tests/run-allregs.sh
+diff --git a/tests/run-addrcfi.sh b/tests/run-addrcfi.sh
+index fd89d025a3f6..462d7c58b7cb 100755
+--- a/tests/run-addrcfi.sh
++++ b/tests/run-addrcfi.sh
+@@ -3554,6 +3554,38 @@ dwarf_cfi_addrframe (.eh_frame): no matching address range
+ FPA reg21 (f5): undefined
+ FPA reg22 (f6): undefined
+ FPA reg23 (f7): undefined
++ VFP reg64 (s0): undefined
++ VFP reg65 (s1): undefined
++ VFP reg66 (s2): undefined
++ VFP reg67 (s3): undefined
++ VFP reg68 (s4): undefined
++ VFP reg69 (s5): undefined
++ VFP reg70 (s6): undefined
++ VFP reg71 (s7): undefined
++ VFP reg72 (s8): undefined
++ VFP reg73 (s9): undefined
++ VFP reg74 (s10): undefined
++ VFP reg75 (s11): undefined
++ VFP reg76 (s12): undefined
++ VFP reg77 (s13): undefined
++ VFP reg78 (s14): undefined
++ VFP reg79 (s15): undefined
++ VFP reg80 (s16): undefined
++ VFP reg81 (s17): undefined
++ VFP reg82 (s18): undefined
++ VFP reg83 (s19): undefined
++ VFP reg84 (s20): undefined
++ VFP reg85 (s21): undefined
++ VFP reg86 (s22): undefined
++ VFP reg87 (s23): undefined
++ VFP reg88 (s24): undefined
++ VFP reg89 (s25): undefined
++ VFP reg90 (s26): undefined
++ VFP reg91 (s27): undefined
++ VFP reg92 (s28): undefined
++ VFP reg93 (s29): undefined
++ VFP reg94 (s30): undefined
++ VFP reg95 (s31): undefined
+ FPA reg96 (f0): undefined
+ FPA reg97 (f1): undefined
+ FPA reg98 (f2): undefined
+@@ -3562,7 +3594,66 @@ dwarf_cfi_addrframe (.eh_frame): no matching address range
+ FPA reg101 (f5): undefined
+ FPA reg102 (f6): undefined
+ FPA reg103 (f7): undefined
+- integer reg128 (spsr): undefined
++ MMX reg104 (wcgr0): undefined
++ MMX reg105 (wcgr1): undefined
++ MMX reg106 (wcgr2): undefined
++ MMX reg107 (wcgr3): undefined
++ MMX reg108 (wcgr4): undefined
++ MMX reg109 (wcgr5): undefined
++ MMX reg110 (wcgr6): undefined
++ MMX reg111 (wcgr7): undefined
++ MMX reg112 (wr0): undefined
++ MMX reg113 (wr1): undefined
++ MMX reg114 (wr2): undefined
++ MMX reg115 (wr3): undefined
++ MMX reg116 (wr4): undefined
++ MMX reg117 (wr5): undefined
++ MMX reg118 (wr6): undefined
++ MMX reg119 (wr7): undefined
++ MMX reg120 (wr8): undefined
++ MMX reg121 (wr9): undefined
++ MMX reg122 (wr10): undefined
++ MMX reg123 (wr11): undefined
++ MMX reg124 (wr12): undefined
++ MMX reg125 (wr13): undefined
++ MMX reg126 (wr14): undefined
++ MMX reg127 (wr15): undefined
++ state reg128 (spsr): undefined
++ state reg129 (spsr_fiq): undefined
++ state reg130 (spsr_irq): undefined
++ state reg131 (spsr_abt): undefined
++ state reg132 (spsr_und): undefined
++ state reg133 (spsr_svc): undefined
++ integer reg144 (r8_usr): undefined
++ integer reg145 (r9_usr): undefined
++ integer reg146 (r10_usr): undefined
++ integer reg147 (r11_usr): undefined
++ integer reg148 (r12_usr): undefined
++ integer reg149 (r13_usr): undefined
++ integer reg150 (r14_usr): undefined
++ integer reg151 (r8_fiq): undefined
++ integer reg152 (r9_fiq): undefined
++ integer reg153 (r10_fiq): undefined
++ integer reg154 (r11_fiq): undefined
++ integer reg155 (r12_fiq): undefined
++ integer reg156 (r13_fiq): undefined
++ integer reg157 (r14_fiq): undefined
++ integer reg158 (r13_irq): undefined
++ integer reg159 (r14_irq): undefined
++ integer reg160 (r13_abt): undefined
++ integer reg161 (r14_abt): undefined
++ integer reg162 (r13_und): undefined
++ integer reg163 (r14_und): undefined
++ integer reg164 (r13_svc): undefined
++ integer reg165 (r14_svc): undefined
++ MMX reg192 (wc0): undefined
++ MMX reg193 (wc1): undefined
++ MMX reg194 (wc2): undefined
++ MMX reg195 (wc3): undefined
++ MMX reg196 (wc4): undefined
++ MMX reg197 (wc5): undefined
++ MMX reg198 (wc6): undefined
++ MMX reg199 (wc7): undefined
+ VFP reg256 (d0): undefined
+ VFP reg257 (d1): undefined
+ VFP reg258 (d2): undefined
+diff --git a/tests/run-allregs.sh b/tests/run-allregs.sh
+index 1422bd67dbf0..dc0fc9914873 100755
+--- a/tests/run-allregs.sh
++++ b/tests/run-allregs.sh
@@ -2672,7 +2672,28 @@ integer registers:
13: sp (sp), address 32 bits
14: lr (lr), address 32 bits
@@ -465,11 +596,11 @@ Index: elfutils-0.175/tests/run-allregs.sh
EOF
# See run-readelf-mixed-corenote.sh for instructions to regenerate
-Index: elfutils-0.175/tests/run-readelf-mixed-corenote.sh
-===================================================================
---- elfutils-0.175.orig/tests/run-readelf-mixed-corenote.sh
-+++ elfutils-0.175/tests/run-readelf-mixed-corenote.sh
-@@ -31,12 +31,11 @@ Note segment of 892 bytes at offset 0x27
+diff --git a/tests/run-readelf-mixed-corenote.sh b/tests/run-readelf-mixed-corenote.sh
+index c960f1d6160e..e4bf0746b208 100755
+--- a/tests/run-readelf-mixed-corenote.sh
++++ b/tests/run-readelf-mixed-corenote.sh
+@@ -31,12 +31,11 @@ Note segment of 892 bytes at offset 0x274:
pid: 11087, ppid: 11063, pgrp: 11087, sid: 11063
utime: 0.000000, stime: 0.010000, cutime: 0.000000, cstime: 0.000000
orig_r0: -1, fpvalid: 1
@@ -487,114 +618,3 @@ Index: elfutils-0.175/tests/run-readelf-mixed-corenote.sh
CORE 124 PRPSINFO
state: 0, sname: R, zomb: 0, nice: 0, flag: 0x00400500
uid: 0, gid: 0, pid: 11087, ppid: 11063, pgrp: 11087, sid: 11063
-Index: elfutils-0.175/tests/run-addrcfi.sh
-===================================================================
---- elfutils-0.175.orig/tests/run-addrcfi.sh
-+++ elfutils-0.175/tests/run-addrcfi.sh
-@@ -3554,6 +3554,38 @@ dwarf_cfi_addrframe (.eh_frame): no matc
- FPA reg21 (f5): undefined
- FPA reg22 (f6): undefined
- FPA reg23 (f7): undefined
-+ VFP reg64 (s0): undefined
-+ VFP reg65 (s1): undefined
-+ VFP reg66 (s2): undefined
-+ VFP reg67 (s3): undefined
-+ VFP reg68 (s4): undefined
-+ VFP reg69 (s5): undefined
-+ VFP reg70 (s6): undefined
-+ VFP reg71 (s7): undefined
-+ VFP reg72 (s8): undefined
-+ VFP reg73 (s9): undefined
-+ VFP reg74 (s10): undefined
-+ VFP reg75 (s11): undefined
-+ VFP reg76 (s12): undefined
-+ VFP reg77 (s13): undefined
-+ VFP reg78 (s14): undefined
-+ VFP reg79 (s15): undefined
-+ VFP reg80 (s16): undefined
-+ VFP reg81 (s17): undefined
-+ VFP reg82 (s18): undefined
-+ VFP reg83 (s19): undefined
-+ VFP reg84 (s20): undefined
-+ VFP reg85 (s21): undefined
-+ VFP reg86 (s22): undefined
-+ VFP reg87 (s23): undefined
-+ VFP reg88 (s24): undefined
-+ VFP reg89 (s25): undefined
-+ VFP reg90 (s26): undefined
-+ VFP reg91 (s27): undefined
-+ VFP reg92 (s28): undefined
-+ VFP reg93 (s29): undefined
-+ VFP reg94 (s30): undefined
-+ VFP reg95 (s31): undefined
- FPA reg96 (f0): undefined
- FPA reg97 (f1): undefined
- FPA reg98 (f2): undefined
-@@ -3562,7 +3594,66 @@ dwarf_cfi_addrframe (.eh_frame): no matc
- FPA reg101 (f5): undefined
- FPA reg102 (f6): undefined
- FPA reg103 (f7): undefined
-- integer reg128 (spsr): undefined
-+ MMX reg104 (wcgr0): undefined
-+ MMX reg105 (wcgr1): undefined
-+ MMX reg106 (wcgr2): undefined
-+ MMX reg107 (wcgr3): undefined
-+ MMX reg108 (wcgr4): undefined
-+ MMX reg109 (wcgr5): undefined
-+ MMX reg110 (wcgr6): undefined
-+ MMX reg111 (wcgr7): undefined
-+ MMX reg112 (wr0): undefined
-+ MMX reg113 (wr1): undefined
-+ MMX reg114 (wr2): undefined
-+ MMX reg115 (wr3): undefined
-+ MMX reg116 (wr4): undefined
-+ MMX reg117 (wr5): undefined
-+ MMX reg118 (wr6): undefined
-+ MMX reg119 (wr7): undefined
-+ MMX reg120 (wr8): undefined
-+ MMX reg121 (wr9): undefined
-+ MMX reg122 (wr10): undefined
-+ MMX reg123 (wr11): undefined
-+ MMX reg124 (wr12): undefined
-+ MMX reg125 (wr13): undefined
-+ MMX reg126 (wr14): undefined
-+ MMX reg127 (wr15): undefined
-+ state reg128 (spsr): undefined
-+ state reg129 (spsr_fiq): undefined
-+ state reg130 (spsr_irq): undefined
-+ state reg131 (spsr_abt): undefined
-+ state reg132 (spsr_und): undefined
-+ state reg133 (spsr_svc): undefined
-+ integer reg144 (r8_usr): undefined
-+ integer reg145 (r9_usr): undefined
-+ integer reg146 (r10_usr): undefined
-+ integer reg147 (r11_usr): undefined
-+ integer reg148 (r12_usr): undefined
-+ integer reg149 (r13_usr): undefined
-+ integer reg150 (r14_usr): undefined
-+ integer reg151 (r8_fiq): undefined
-+ integer reg152 (r9_fiq): undefined
-+ integer reg153 (r10_fiq): undefined
-+ integer reg154 (r11_fiq): undefined
-+ integer reg155 (r12_fiq): undefined
-+ integer reg156 (r13_fiq): undefined
-+ integer reg157 (r14_fiq): undefined
-+ integer reg158 (r13_irq): undefined
-+ integer reg159 (r14_irq): undefined
-+ integer reg160 (r13_abt): undefined
-+ integer reg161 (r14_abt): undefined
-+ integer reg162 (r13_und): undefined
-+ integer reg163 (r14_und): undefined
-+ integer reg164 (r13_svc): undefined
-+ integer reg165 (r14_svc): undefined
-+ MMX reg192 (wc0): undefined
-+ MMX reg193 (wc1): undefined
-+ MMX reg194 (wc2): undefined
-+ MMX reg195 (wc3): undefined
-+ MMX reg196 (wc4): undefined
-+ MMX reg197 (wc5): undefined
-+ MMX reg198 (wc6): undefined
-+ MMX reg199 (wc7): undefined
- VFP reg256 (d0): undefined
- VFP reg257 (d1): undefined
- VFP reg258 (d2): undefined
diff --git a/patches/elfutils-0.176/mips_backend.diff b/patches/elfutils-0.176/0003-mips_backend.patch
index 29b72c49a..e613f4a05 100644
--- a/patches/elfutils-0.176/mips_backend.diff
+++ b/patches/elfutils-0.176/0003-mips_backend.patch
@@ -1,7 +1,61 @@
-Index: elfutils-0.175/backends/mips_init.c
-===================================================================
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Date: Mon, 4 Mar 2019 13:20:36 +0100
+Subject: [PATCH] mips_backend
+
+Imported from elfutils_0.176-1.debian.tar.xz
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+---
+ backends/Makefile.am | 8 +-
+ backends/mips_init.c | 59 +++++++++
+ backends/mips_regs.c | 104 ++++++++++++++++
+ backends/mips_reloc.def | 79 ++++++++++++
+ backends/mips_retval.c | 321 ++++++++++++++++++++++++++++++++++++++++++++++++
+ backends/mips_symbol.c | 53 ++++++++
+ libebl/eblopenbackend.c | 2 +
+ 7 files changed, 624 insertions(+), 2 deletions(-)
+ create mode 100644 backends/mips_init.c
+ create mode 100644 backends/mips_regs.c
+ create mode 100644 backends/mips_reloc.def
+ create mode 100644 backends/mips_retval.c
+ create mode 100644 backends/mips_symbol.c
+
+diff --git a/backends/Makefile.am b/backends/Makefile.am
+index 5671a32c4210..ba84da61cd20 100644
+--- a/backends/Makefile.am
++++ b/backends/Makefile.am
+@@ -33,13 +33,13 @@ AM_CPPFLAGS += -I$(top_srcdir)/libebl -I$(top_srcdir)/libasm \
+
+
+ modules = i386 sh x86_64 ia64 alpha arm aarch64 sparc ppc ppc64 s390 \
+- tilegx m68k bpf riscv parisc
++ tilegx m68k bpf riscv parisc mips
+ libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a \
+ libebl_ia64_pic.a libebl_alpha_pic.a libebl_arm_pic.a \
+ libebl_aarch64_pic.a libebl_sparc_pic.a libebl_ppc_pic.a \
+ libebl_ppc64_pic.a libebl_s390_pic.a libebl_tilegx_pic.a \
+ libebl_m68k_pic.a libebl_bpf_pic.a libebl_riscv_pic.a \
+- libebl_parisc_pic.a
++ libebl_parisc_pic.a libebl_mips_pic.a
+ noinst_LIBRARIES = $(libebl_pic)
+ noinst_DATA = $(libebl_pic:_pic.a=.so)
+
+@@ -141,6 +141,10 @@ parisc_SRCS = parisc_init.c parisc_symbol.c parisc_regs.c parisc_retval.c
+ libebl_parisc_pic_a_SOURCES = $(parisc_SRCS)
+ am_libebl_parisc_pic_a_OBJECTS = $(parisc_SRCS:.c=.os)
+
++mips_SRCS = mips_init.c mips_symbol.c mips_regs.c mips_retval.c
++libebl_mips_pic_a_SOURCES = $(mips_SRCS)
++am_libebl_mips_pic_a_OBJECTS = $(mips_SRCS:.c=.os)
++
+ libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw) $(libeu)
+ @rm -f $(@:.so=.map)
+ $(AM_V_at)echo 'ELFUTILS_$(PACKAGE_VERSION) { global: $*_init; local: *; };' \
+diff --git a/backends/mips_init.c b/backends/mips_init.c
+new file mode 100644
+index 000000000000..975c04e1e168
--- /dev/null
-+++ elfutils-0.175/backends/mips_init.c
++++ b/backends/mips_init.c
@@ -0,0 +1,59 @@
+/* Initialization of mips specific backend library.
+ Copyright (C) 2006 Red Hat, Inc.
@@ -62,10 +116,11 @@ Index: elfutils-0.175/backends/mips_init.c
+
+ return MODVERSION;
+}
-Index: elfutils-0.175/backends/mips_regs.c
-===================================================================
+diff --git a/backends/mips_regs.c b/backends/mips_regs.c
+new file mode 100644
+index 000000000000..44f86cb46302
--- /dev/null
-+++ elfutils-0.175/backends/mips_regs.c
++++ b/backends/mips_regs.c
@@ -0,0 +1,104 @@
+/* Register names and numbers for MIPS DWARF.
+ Copyright (C) 2006 Red Hat, Inc.
@@ -171,10 +226,11 @@ Index: elfutils-0.175/backends/mips_regs.c
+ name[namelen++] = '\0';
+ return namelen;
+}
-Index: elfutils-0.175/backends/mips_reloc.def
-===================================================================
+diff --git a/backends/mips_reloc.def b/backends/mips_reloc.def
+new file mode 100644
+index 000000000000..457997020340
--- /dev/null
-+++ elfutils-0.175/backends/mips_reloc.def
++++ b/backends/mips_reloc.def
@@ -0,0 +1,79 @@
+/* List the relocation types for mips. -*- C -*-
+ Copyright (C) 2006 Red Hat, Inc.
@@ -255,10 +311,11 @@ Index: elfutils-0.175/backends/mips_reloc.def
+
+#define NO_COPY_RELOC 1
+#define NO_RELATIVE_RELOC 1
-Index: elfutils-0.175/backends/mips_retval.c
-===================================================================
+diff --git a/backends/mips_retval.c b/backends/mips_retval.c
+new file mode 100644
+index 000000000000..656cd1f47507
--- /dev/null
-+++ elfutils-0.175/backends/mips_retval.c
++++ b/backends/mips_retval.c
@@ -0,0 +1,321 @@
+/* Function return value location for Linux/mips ABI.
+ Copyright (C) 2005 Red Hat, Inc.
@@ -581,10 +638,11 @@ Index: elfutils-0.175/backends/mips_retval.c
+ DWARF and might be valid. */
+ return -2;
+}
-Index: elfutils-0.175/backends/mips_symbol.c
-===================================================================
+diff --git a/backends/mips_symbol.c b/backends/mips_symbol.c
+new file mode 100644
+index 000000000000..261b05dad2d3
--- /dev/null
-+++ elfutils-0.175/backends/mips_symbol.c
++++ b/backends/mips_symbol.c
@@ -0,0 +1,53 @@
+/* MIPS specific symbolic name handling.
+ Copyright (C) 2002, 2003, 2005 Red Hat, Inc.
@@ -639,10 +697,10 @@ Index: elfutils-0.175/backends/mips_symbol.c
+ return ELF_T_NUM;
+ }
+}
-Index: elfutils-0.175/libebl/eblopenbackend.c
-===================================================================
---- elfutils-0.175.orig/libebl/eblopenbackend.c
-+++ elfutils-0.175/libebl/eblopenbackend.c
+diff --git a/libebl/eblopenbackend.c b/libebl/eblopenbackend.c
+index d54b720756c3..6cf766f65115 100644
+--- a/libebl/eblopenbackend.c
++++ b/libebl/eblopenbackend.c
@@ -71,6 +71,8 @@ static const struct
{ "sparc", "elf_sparc", "sparc", 5, EM_SPARC, 0, 0 },
{ "sparc", "elf_sparcv8plus", "sparc", 5, EM_SPARC32PLUS, 0, 0 },
@@ -652,34 +710,3 @@ Index: elfutils-0.175/libebl/eblopenbackend.c
{ "m32", "elf_m32", "m32", 3, EM_M32, 0, 0 },
{ "m68k", "elf_m68k", "m68k", 4, EM_68K, ELFCLASS32, ELFDATA2MSB },
-Index: elfutils-0.175/backends/Makefile.am
-===================================================================
---- elfutils-0.175.orig/backends/Makefile.am
-+++ elfutils-0.175/backends/Makefile.am
-@@ -33,13 +33,13 @@ AM_CPPFLAGS += -I$(top_srcdir)/libebl -I
-
-
- modules = i386 sh x86_64 ia64 alpha arm aarch64 sparc ppc ppc64 s390 \
-- tilegx m68k bpf riscv parisc
-+ tilegx m68k bpf riscv parisc mips
- libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a \
- libebl_ia64_pic.a libebl_alpha_pic.a libebl_arm_pic.a \
- libebl_aarch64_pic.a libebl_sparc_pic.a libebl_ppc_pic.a \
- libebl_ppc64_pic.a libebl_s390_pic.a libebl_tilegx_pic.a \
- libebl_m68k_pic.a libebl_bpf_pic.a libebl_riscv_pic.a \
-- libebl_parisc_pic.a
-+ libebl_parisc_pic.a libebl_mips_pic.a
- noinst_LIBRARIES = $(libebl_pic)
- noinst_DATA = $(libebl_pic:_pic.a=.so)
-
-@@ -141,6 +141,10 @@ parisc_SRCS = parisc_init.c parisc_symbo
- libebl_parisc_pic_a_SOURCES = $(parisc_SRCS)
- am_libebl_parisc_pic_a_OBJECTS = $(parisc_SRCS:.c=.os)
-
-+mips_SRCS = mips_init.c mips_symbol.c mips_regs.c mips_retval.c
-+libebl_mips_pic_a_SOURCES = $(mips_SRCS)
-+am_libebl_mips_pic_a_OBJECTS = $(mips_SRCS:.c=.os)
-+
- libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw) $(libeu)
- @rm -f $(@:.so=.map)
- $(AM_V_at)echo 'ELFUTILS_$(PACKAGE_VERSION) { global: $*_init; local: *; };' \
diff --git a/patches/elfutils-0.176/0004-Make-readelf-w-output-debug-information-on-mips.patch b/patches/elfutils-0.176/0004-Make-readelf-w-output-debug-information-on-mips.patch
new file mode 100644
index 000000000..445f7ab60
--- /dev/null
+++ b/patches/elfutils-0.176/0004-Make-readelf-w-output-debug-information-on-mips.patch
@@ -0,0 +1,29 @@
+From: Kurt Roeckx <kurt@roeckx.be>
+Date: Mon, 4 Mar 2019 13:20:36 +0100
+Subject: [PATCH] Make readelf -w output debug information on mips
+
+Upstreams wants a change where this is handled by a hook that needs
+to be filled in by the backend for the arch.
+
+
+Imported from elfutils_0.176-1.debian.tar.xz
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+---
+ src/readelf.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/readelf.c b/src/readelf.c
+index 33706bdefacf..ef13159b744d 100644
+--- a/src/readelf.c
++++ b/src/readelf.c
+@@ -11148,7 +11148,8 @@ print_debug (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr)
+ GElf_Shdr shdr_mem;
+ GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem);
+
+- if (shdr != NULL && shdr->sh_type == SHT_PROGBITS)
++ if (shdr != NULL && (
++ (shdr->sh_type == SHT_PROGBITS) || (shdr->sh_type == SHT_MIPS_DWARF)))
+ {
+ static const struct
+ {
diff --git a/patches/elfutils-0.176/0001-Ignore-differences-between-mips-machine-identifiers.patch b/patches/elfutils-0.176/0005-Ignore-differences-between-mips-machine-identifiers.patch
index a9a721003..9860b4548 100644
--- a/patches/elfutils-0.176/0001-Ignore-differences-between-mips-machine-identifiers.patch
+++ b/patches/elfutils-0.176/0005-Ignore-differences-between-mips-machine-identifiers.patch
@@ -1,22 +1,25 @@
-From 77cb4a53c270d5854d3af24f19547bc3de825233 Mon Sep 17 00:00:00 2001
From: James Cowgill <james410@cowgill.org.uk>
Date: Mon, 5 Jan 2015 15:16:58 +0000
-Subject: [PATCH 1/3] Ignore differences between mips machine identifiers
+Subject: [PATCH] Ignore differences between mips machine identifiers
Little endian binaries actually use EM_MIPS so you can't tell the endianness
from the elf machine id. Also, the EM_MIPS_RS3_LE machine is dead anyway (the
kernel will not load binaries containing it).
Signed-off-by: James Cowgill <james410@cowgill.org.uk>
+
+Imported from elfutils_0.176-1.debian.tar.xz
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
---
backends/mips_init.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
-Index: b/backends/mips_init.c
-===================================================================
+diff --git a/backends/mips_init.c b/backends/mips_init.c
+index 975c04e1e168..8482e7fe6e96 100644
--- a/backends/mips_init.c
+++ b/backends/mips_init.c
-@@ -45,11 +45,7 @@ mips_init (Elf *elf __attribute__ ((unus
+@@ -45,11 +45,7 @@ mips_init (Elf *elf __attribute__ ((unused)),
return NULL;
/* We handle it. */
diff --git a/patches/elfutils-0.176/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch b/patches/elfutils-0.176/0006-Add-support-for-mips64-abis-in-mips_retval.c.patch
index 72125c9ff..29c754e2e 100644
--- a/patches/elfutils-0.176/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch
+++ b/patches/elfutils-0.176/0006-Add-support-for-mips64-abis-in-mips_retval.c.patch
@@ -1,15 +1,18 @@
-From fdaab18a65ed2529656baa64cb6169f34d7e507b Mon Sep 17 00:00:00 2001
From: James Cowgill <james410@cowgill.org.uk>
Date: Mon, 5 Jan 2015 15:17:01 +0000
-Subject: [PATCH 2/3] Add support for mips64 abis in mips_retval.c
+Subject: [PATCH] Add support for mips64 abis in mips_retval.c
Signed-off-by: James Cowgill <james410@cowgill.org.uk>
+
+Imported from elfutils_0.176-1.debian.tar.xz
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
---
backends/mips_retval.c | 104 ++++++++++++++++++++++++++++++++++++++++++++-----
1 file changed, 94 insertions(+), 10 deletions(-)
diff --git a/backends/mips_retval.c b/backends/mips_retval.c
-index 33f12a7..d5c6ef0 100644
+index 656cd1f47507..57487bbb8e2f 100644
--- a/backends/mips_retval.c
+++ b/backends/mips_retval.c
@@ -91,6 +91,8 @@ enum mips_abi find_mips_abi(Elf *elf)
@@ -163,6 +166,3 @@ index 33f12a7..d5c6ef0 100644
*locp = loc_aggregate;
return nloc_aggregate;
}
---
-2.1.4
-
diff --git a/patches/elfutils-0.176/0003-Add-mips-n64-relocation-format-hack.patch b/patches/elfutils-0.176/0007-Add-mips-n64-relocation-format-hack.patch
index 7cefeaeea..46d7240ac 100644
--- a/patches/elfutils-0.176/0003-Add-mips-n64-relocation-format-hack.patch
+++ b/patches/elfutils-0.176/0007-Add-mips-n64-relocation-format-hack.patch
@@ -1,7 +1,6 @@
-From 59d4b8c48e5040af7e02b34eb26ea602ec82a38e Mon Sep 17 00:00:00 2001
From: James Cowgill <james410@cowgill.org.uk>
Date: Mon, 5 Jan 2015 15:17:02 +0000
-Subject: [PATCH 3/3] Add mips n64 relocation format hack
+Subject: [PATCH] Add mips n64 relocation format hack
MIPSEL N64 ELF files use a slightly different format for storing relocation
entries which is incompatible with the normal R_SYM / R_INFO macros.
@@ -12,6 +11,10 @@ This patch also ensures that strip.c sets the correct value of e_machine
before manipulating relocations so that these changes take effect.
Signed-off-by: James Cowgill <james410@cowgill.org.uk>
+
+Imported from elfutils_0.176-1.debian.tar.xz
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
---
libelf/gelf_getrel.c | 25 +++++++++++++++++++++++--
libelf/gelf_getrela.c | 25 +++++++++++++++++++++++--
@@ -20,10 +23,10 @@ Signed-off-by: James Cowgill <james410@cowgill.org.uk>
src/strip.c | 17 +++++++++++++++++
5 files changed, 101 insertions(+), 6 deletions(-)
-Index: elfutils-0.175/libelf/gelf_getrel.c
-===================================================================
---- elfutils-0.175.orig/libelf/gelf_getrel.c
-+++ elfutils-0.175/libelf/gelf_getrel.c
+diff --git a/libelf/gelf_getrel.c b/libelf/gelf_getrel.c
+index 309e3d37457b..2a81a97c9a45 100644
+--- a/libelf/gelf_getrel.c
++++ b/libelf/gelf_getrel.c
@@ -36,6 +36,7 @@
#include "libelfP.h"
@@ -32,7 +35,7 @@ Index: elfutils-0.175/libelf/gelf_getrel.c
GElf_Rel *
gelf_getrel (Elf_Data *data, int ndx, GElf_Rel *dst)
-@@ -89,8 +90,28 @@ gelf_getrel (Elf_Data *data, int ndx, GE
+@@ -89,8 +90,28 @@ gelf_getrel (Elf_Data *data, int ndx, GElf_Rel *dst)
result = NULL;
}
else
@@ -63,10 +66,10 @@ Index: elfutils-0.175/libelf/gelf_getrel.c
}
rwlock_unlock (scn->elf->lock);
-Index: elfutils-0.175/libelf/gelf_getrela.c
-===================================================================
---- elfutils-0.175.orig/libelf/gelf_getrela.c
-+++ elfutils-0.175/libelf/gelf_getrela.c
+diff --git a/libelf/gelf_getrela.c b/libelf/gelf_getrela.c
+index d695f6593dc4..1f42a80b4c7e 100644
+--- a/libelf/gelf_getrela.c
++++ b/libelf/gelf_getrela.c
@@ -36,6 +36,7 @@
#include "libelfP.h"
@@ -75,7 +78,7 @@ Index: elfutils-0.175/libelf/gelf_getrela.c
GElf_Rela *
gelf_getrela (Elf_Data *data, int ndx, GElf_Rela *dst)
-@@ -90,8 +91,28 @@ gelf_getrela (Elf_Data *data, int ndx, G
+@@ -90,8 +91,28 @@ gelf_getrela (Elf_Data *data, int ndx, GElf_Rela *dst)
result = NULL;
}
else
@@ -106,10 +109,10 @@ Index: elfutils-0.175/libelf/gelf_getrela.c
}
rwlock_unlock (scn->elf->lock);
-Index: elfutils-0.175/libelf/gelf_update_rel.c
-===================================================================
---- elfutils-0.175.orig/libelf/gelf_update_rel.c
-+++ elfutils-0.175/libelf/gelf_update_rel.c
+diff --git a/libelf/gelf_update_rel.c b/libelf/gelf_update_rel.c
+index 14f62e973a5e..90955566e4ad 100644
+--- a/libelf/gelf_update_rel.c
++++ b/libelf/gelf_update_rel.c
@@ -36,6 +36,7 @@
#include "libelfP.h"
@@ -118,7 +121,7 @@ Index: elfutils-0.175/libelf/gelf_update_rel.c
int
gelf_update_rel (Elf_Data *dst, int ndx, GElf_Rel *src)
-@@ -86,6 +87,9 @@ gelf_update_rel (Elf_Data *dst, int ndx,
+@@ -86,6 +87,9 @@ gelf_update_rel (Elf_Data *dst, int ndx, GElf_Rel *src)
}
else
{
@@ -128,7 +131,7 @@ Index: elfutils-0.175/libelf/gelf_update_rel.c
/* Check whether we have to resize the data buffer. */
if (INVALID_NDX (ndx, Elf64_Rel, &data_scn->d))
{
-@@ -93,7 +97,21 @@ gelf_update_rel (Elf_Data *dst, int ndx,
+@@ -93,7 +97,21 @@ gelf_update_rel (Elf_Data *dst, int ndx, GElf_Rel *src)
goto out;
}
@@ -151,10 +154,10 @@ Index: elfutils-0.175/libelf/gelf_update_rel.c
}
result = 1;
-Index: elfutils-0.175/libelf/gelf_update_rela.c
-===================================================================
---- elfutils-0.175.orig/libelf/gelf_update_rela.c
-+++ elfutils-0.175/libelf/gelf_update_rela.c
+diff --git a/libelf/gelf_update_rela.c b/libelf/gelf_update_rela.c
+index 88252703976f..4caa85fb9f8e 100644
+--- a/libelf/gelf_update_rela.c
++++ b/libelf/gelf_update_rela.c
@@ -36,6 +36,7 @@
#include "libelfP.h"
@@ -163,7 +166,7 @@ Index: elfutils-0.175/libelf/gelf_update_rela.c
int
gelf_update_rela (Elf_Data *dst, int ndx, GElf_Rela *src)
-@@ -89,6 +90,9 @@ gelf_update_rela (Elf_Data *dst, int ndx
+@@ -89,6 +90,9 @@ gelf_update_rela (Elf_Data *dst, int ndx, GElf_Rela *src)
}
else
{
@@ -173,7 +176,7 @@ Index: elfutils-0.175/libelf/gelf_update_rela.c
/* Check whether we have to resize the data buffer. */
if (INVALID_NDX (ndx, Elf64_Rela, &data_scn->d))
{
-@@ -96,7 +100,21 @@ gelf_update_rela (Elf_Data *dst, int ndx
+@@ -96,7 +100,21 @@ gelf_update_rela (Elf_Data *dst, int ndx, GElf_Rela *src)
goto out;
}
@@ -196,11 +199,11 @@ Index: elfutils-0.175/libelf/gelf_update_rela.c
}
result = 1;
-Index: elfutils-0.175/src/strip.c
-===================================================================
---- elfutils-0.175.orig/src/strip.c
-+++ elfutils-0.175/src/strip.c
-@@ -1062,6 +1062,23 @@ handle_elf (int fd, Elf *elf, const char
+diff --git a/src/strip.c b/src/strip.c
+index a73009d980e6..75bd7ba60eb8 100644
+--- a/src/strip.c
++++ b/src/strip.c
+@@ -1062,6 +1062,23 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname,
goto fail;
}
diff --git a/patches/elfutils-0.176/0008-disable-Werror-as-it-tends-to-break-with-new-gcc-ver.patch b/patches/elfutils-0.176/0008-disable-Werror-as-it-tends-to-break-with-new-gcc-ver.patch
new file mode 100644
index 000000000..667043c89
--- /dev/null
+++ b/patches/elfutils-0.176/0008-disable-Werror-as-it-tends-to-break-with-new-gcc-ver.patch
@@ -0,0 +1,23 @@
+From: Helmut Grohne <helmut@subdivi.de>
+Date: Mon, 4 Mar 2019 13:20:36 +0100
+Subject: [PATCH] disable -Werror as it tends to break with new gcc versions
+
+Imported from elfutils_0.176-1.debian.tar.xz
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+---
+ config/eu.am | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/config/eu.am b/config/eu.am
+index 82acda3ab2cd..dede5c65811f 100644
+--- a/config/eu.am
++++ b/config/eu.am
+@@ -73,7 +73,6 @@ AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \
+ -Wold-style-definition -Wstrict-prototypes -Wtrampolines \
+ $(LOGICAL_OP_WARNING) $(DUPLICATED_COND_WARNING) \
+ $(NULL_DEREFERENCE_WARNING) $(IMPLICIT_FALLTHROUGH_WARNING) \
+- $(if $($(*F)_no_Werror),,-Werror) \
+ $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
+ $(if $($(*F)_no_Wstack_usage),,$(STACK_USAGE_WARNING)) \
+ $(if $($(*F)_no_Wpacked_not_aligned),-Wno-packed-not-aligned,) \
diff --git a/patches/elfutils-0.176/mips_cfi.patch b/patches/elfutils-0.176/0009-mips_cfi.patch
index 8dada52c4..8920f0882 100644
--- a/patches/elfutils-0.176/mips_cfi.patch
+++ b/patches/elfutils-0.176/0009-mips_cfi.patch
@@ -1,12 +1,22 @@
-Description: Add MIPS ABI CFI callback
-Author: Kurt Roeckx <kurt@roeckx.be>
-Last-Update: 2018-12-30
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Date: Mon, 4 Mar 2019 13:20:36 +0100
+Subject: [PATCH] mips_cfi
-Index: elfutils-0.175/backends/Makefile.am
-===================================================================
---- elfutils-0.175.orig/backends/Makefile.am
-+++ elfutils-0.175/backends/Makefile.am
-@@ -141,7 +141,7 @@ parisc_SRCS = parisc_init.c parisc_symbo
+Imported from elfutils_0.176-1.debian.tar.xz
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+---
+ backends/Makefile.am | 2 +-
+ backends/mips_cfi.c | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++
+ backends/mips_init.c | 1 +
+ 3 files changed, 82 insertions(+), 1 deletion(-)
+ create mode 100644 backends/mips_cfi.c
+
+diff --git a/backends/Makefile.am b/backends/Makefile.am
+index ba84da61cd20..8949a59210c3 100644
+--- a/backends/Makefile.am
++++ b/backends/Makefile.am
+@@ -141,7 +141,7 @@ parisc_SRCS = parisc_init.c parisc_symbol.c parisc_regs.c parisc_retval.c
libebl_parisc_pic_a_SOURCES = $(parisc_SRCS)
am_libebl_parisc_pic_a_OBJECTS = $(parisc_SRCS:.c=.os)
@@ -15,10 +25,11 @@ Index: elfutils-0.175/backends/Makefile.am
libebl_mips_pic_a_SOURCES = $(mips_SRCS)
am_libebl_mips_pic_a_OBJECTS = $(mips_SRCS:.c=.os)
-Index: elfutils-0.175/backends/mips_cfi.c
-===================================================================
+diff --git a/backends/mips_cfi.c b/backends/mips_cfi.c
+new file mode 100644
+index 000000000000..9ffdab5beb03
--- /dev/null
-+++ elfutils-0.175/backends/mips_cfi.c
++++ b/backends/mips_cfi.c
@@ -0,0 +1,80 @@
+/* MIPS ABI-specified defaults for DWARF CFI.
+ Copyright (C) 2018 Kurt Roeckx, Inc.
@@ -100,11 +111,11 @@ Index: elfutils-0.175/backends/mips_cfi.c
+
+ return 0;
+}
-Index: elfutils-0.175/backends/mips_init.c
-===================================================================
---- elfutils-0.175.orig/backends/mips_init.c
-+++ elfutils-0.175/backends/mips_init.c
-@@ -50,6 +50,7 @@ mips_init (Elf *elf __attribute__ ((unus
+diff --git a/backends/mips_init.c b/backends/mips_init.c
+index 8482e7fe6e96..bce5abe1d98a 100644
+--- a/backends/mips_init.c
++++ b/backends/mips_init.c
+@@ -50,6 +50,7 @@ mips_init (Elf *elf __attribute__ ((unused)),
HOOK (eh, reloc_simple_type);
HOOK (eh, return_value_location);
HOOK (eh, register_info);
diff --git a/patches/elfutils-0.176/disable_werror.patch b/patches/elfutils-0.176/disable_werror.patch
deleted file mode 100644
index 4c1a54452..000000000
--- a/patches/elfutils-0.176/disable_werror.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-From: Helmut Grohne <helmut@subdivi.de>
-Subject: disable -Werror as it tends to break with new gcc versions
-Bug-Debian: https://bugs.debian.org/886004
-Last-Update: 2018-01-01
-
-Index: elfutils-0.176/config/eu.am
-===================================================================
---- elfutils-0.176.orig/config/eu.am
-+++ elfutils-0.176/config/eu.am
-@@ -73,7 +73,6 @@ AM_CFLAGS = -std=gnu99 -Wall -Wshadow -W
- -Wold-style-definition -Wstrict-prototypes -Wtrampolines \
- $(LOGICAL_OP_WARNING) $(DUPLICATED_COND_WARNING) \
- $(NULL_DEREFERENCE_WARNING) $(IMPLICIT_FALLTHROUGH_WARNING) \
-- $(if $($(*F)_no_Werror),,-Werror) \
- $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
- $(if $($(*F)_no_Wstack_usage),,$(STACK_USAGE_WARNING)) \
- $(if $($(*F)_no_Wpacked_not_aligned),-Wno-packed-not-aligned,) \
diff --git a/patches/elfutils-0.176/hurd_path.patch b/patches/elfutils-0.176/hurd_path.patch
deleted file mode 100644
index 4440e39e0..000000000
--- a/patches/elfutils-0.176/hurd_path.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Index: elfutils-0.165/tests/run-native-test.sh
-===================================================================
---- elfutils-0.165.orig/tests/run-native-test.sh
-+++ elfutils-0.165/tests/run-native-test.sh
-@@ -83,6 +83,9 @@ native_test()
- # "cannot attach to process: Function not implemented".
- [ "$(uname)" = "GNU/kFreeBSD" ] && exit 77
-
-+# hurd's /proc/$PID/maps does not give paths yet.
-+[ "$(uname)" = "GNU" ] && exit 77
-+
- native_test ${abs_builddir}/allregs
- native_test ${abs_builddir}/funcretval
-
diff --git a/patches/elfutils-0.176/ignore_strmerge.diff b/patches/elfutils-0.176/ignore_strmerge.diff
deleted file mode 100644
index 1e6d7a2de..000000000
--- a/patches/elfutils-0.176/ignore_strmerge.diff
+++ /dev/null
@@ -1,11 +0,0 @@
---- elfutils-0.165.orig/tests/run-strip-strmerge.sh
-+++ elfutils-0.165/tests/run-strip-strmerge.sh
-@@ -30,7 +30,7 @@ remerged=remerged.elf
- tempfiles $merged $stripped $debugfile $remerged
-
- echo elflint $input
--testrun ${abs_top_builddir}/src/elflint --gnu $input
-+testrun_on_self_skip ${abs_top_builddir}/src/elflint --gnu $input
- echo elfstrmerge
- testrun ${abs_top_builddir}/tests/elfstrmerge -o $merged $input
- echo elflint $merged
diff --git a/patches/elfutils-0.176/kfreebsd_path.patch b/patches/elfutils-0.176/kfreebsd_path.patch
deleted file mode 100644
index 9a19b58b5..000000000
--- a/patches/elfutils-0.176/kfreebsd_path.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Index: b/tests/run-native-test.sh
-===================================================================
---- a/tests/run-native-test.sh
-+++ b/tests/run-native-test.sh
-@@ -77,6 +77,12 @@ native_test()
- test $native -eq 0 || testrun "$@" -p $native > /dev/null
- }
-
-+# On the Debian buildds, GNU/kFreeBSD linprocfs /proc/$PID/maps does
-+# not give absolute paths due to sbuild's bind mounts (bug #570805)
-+# therefore the next two test programs are expected to fail with
-+# "cannot attach to process: Function not implemented".
-+[ "$(uname)" = "GNU/kFreeBSD" ] && exit 77
-+
- native_test ${abs_builddir}/allregs
- native_test ${abs_builddir}/funcretval
-
diff --git a/patches/elfutils-0.176/mips_readelf_w.patch b/patches/elfutils-0.176/mips_readelf_w.patch
deleted file mode 100644
index c88803740..000000000
--- a/patches/elfutils-0.176/mips_readelf_w.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From: Kurt Roeckx <kurt@roeckx.be>
-Subject: Make readelf -w output debug information on mips
-Bug-Debian: http://bugs.debian.org/662041
-Forwarded: not-needed
-
-Upstreams wants a change where this is handled by a hook that needs
-to be filled in by the backend for the arch.
-
-Index: elfutils-0.175/src/readelf.c
-===================================================================
---- elfutils-0.175.orig/src/readelf.c
-+++ elfutils-0.175/src/readelf.c
-@@ -11133,7 +11133,8 @@ print_debug (Dwfl_Module *dwflmod, Ebl *
- GElf_Shdr shdr_mem;
- GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem);
-
-- if (shdr != NULL && shdr->sh_type == SHT_PROGBITS)
-+ if (shdr != NULL && (
-+ (shdr->sh_type == SHT_PROGBITS) || (shdr->sh_type == SHT_MIPS_DWARF)))
- {
- static const struct
- {
diff --git a/patches/elfutils-0.176/series b/patches/elfutils-0.176/series
index 0a4327809..7736db947 100644
--- a/patches/elfutils-0.176/series
+++ b/patches/elfutils-0.176/series
@@ -1,13 +1,12 @@
-hppa_backend.diff
-arm_backend.diff
-mips_backend.diff
-testsuite-ignore-elflint.diff
-mips_readelf_w.patch
-kfreebsd_path.patch
-0001-Ignore-differences-between-mips-machine-identifiers.patch
-0002-Add-support-for-mips64-abis-in-mips_retval.c.patch
-0003-Add-mips-n64-relocation-format-hack.patch
-hurd_path.patch
-ignore_strmerge.diff
-disable_werror.patch
-mips_cfi.patch
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-hppa_backend.patch
+0002-arm_backend.patch
+0003-mips_backend.patch
+0004-Make-readelf-w-output-debug-information-on-mips.patch
+0005-Ignore-differences-between-mips-machine-identifiers.patch
+0006-Add-support-for-mips64-abis-in-mips_retval.c.patch
+0007-Add-mips-n64-relocation-format-hack.patch
+0008-disable-Werror-as-it-tends-to-break-with-new-gcc-ver.patch
+0009-mips_cfi.patch
+# f467d91cf75ddf16b549e11a748e16ba - git-ptx-patches magic
diff --git a/patches/elfutils-0.176/testsuite-ignore-elflint.diff b/patches/elfutils-0.176/testsuite-ignore-elflint.diff
deleted file mode 100644
index 2fb74feee..000000000
--- a/patches/elfutils-0.176/testsuite-ignore-elflint.diff
+++ /dev/null
@@ -1,40 +0,0 @@
-On many architectures this test fails because binaries/libs produced by
-binutils don't pass elflint. However elfutils shouldn't FTBFS because of this.
-
-So we run the tests on all archs to see what breaks, but if it breaks we ignore
-the result (exitcode 77 means: this test was skipped).
-
-Index: b/tests/run-elflint-self.sh
-===================================================================
---- a/tests/run-elflint-self.sh
-+++ b/tests/run-elflint-self.sh
-@@ -18,5 +18,5 @@
-
- . $srcdir/test-subr.sh
-
--testrun_on_self ${abs_top_builddir}/src/elflint --quiet --gnu-ld
-+testrun_on_self_skip ${abs_top_builddir}/src/elflint --quiet --gnu-ld
- testrun_on_self_compressed ${abs_top_builddir}/src/elflint --quiet --gnu-ld
-Index: b/tests/test-subr.sh
-===================================================================
---- a/tests/test-subr.sh
-+++ b/tests/test-subr.sh
-@@ -170,3 +170,18 @@ testrun_on_self_quiet()
- # Only exit if something failed
- if test $exit_status != 0; then exit $exit_status; fi
- }
-+
-+# Same as testrun_on_self(), but skip on failure.
-+testrun_on_self_skip()
-+{
-+ exit_status=0
-+
-+ for file in $self_test_files; do
-+ testrun $* $file \
-+ || { echo "*** failure in $* $file"; exit_status=77; }
-+ done
-+
-+ # Only exit if something failed
-+ if test $exit_status != 0; then exit $exit_status; fi
-+}
-+