From 32ab55459853e87da7ef122931724656b666e7352df8a0ad7355b916cdeb33d6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20Schr=C3=B6der?= <mls@suse.com>
Date: Mon, 25 Mar 2013 16:35:50 +0000
Subject: [PATCH] Accepting request 161007 from home:Andreas_Schwab:Factory

- debugedit-aarch64.diff: handle aarch64 relocation

OBS-URL: https://build.opensuse.org/request/show/161007
OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=252
---
 debugedit-aarch64.diff | 15 +++++++++++++++
 rpm.changes            |  5 +++++
 rpm.spec               |  3 ++-
 3 files changed, 22 insertions(+), 1 deletion(-)
 create mode 100644 debugedit-aarch64.diff

diff --git a/debugedit-aarch64.diff b/debugedit-aarch64.diff
new file mode 100644
index 0000000..85ecf58
--- /dev/null
+++ b/debugedit-aarch64.diff
@@ -0,0 +1,15 @@
+Index: tools/debugedit.c
+===================================================================
+--- tools/debugedit.c.orig
++++ tools/debugedit.c
+@@ -1223,6 +1223,10 @@ edit_dwarf2 (DSO *dso)
+ 		  if (rtype != R_ALPHA_REFLONG)
+ 		    goto fail;
+ 		  break;
++		case EM_AARCH64:
++		  if (rtype != R_AARCH64_ABS32)
++		    goto fail;
++		  break;
+ 		default:
+ 		fail:
+ 		  error (1, 0, "%s: Unhandled relocation %d in .debug_info section",
diff --git a/rpm.changes b/rpm.changes
index 86660e4..20ea2e3 100644
--- a/rpm.changes
+++ b/rpm.changes
@@ -1,3 +1,8 @@
+-------------------------------------------------------------------
+Mon Mar 25 13:38:45 UTC 2013 - schwab@suse.de
+
+- debugedit-aarch64.diff: handle aarch64 relocation
+
 -------------------------------------------------------------------
 Fri Feb 15 15:29:25 UTC 2013 - dmueller@suse.com
 
diff --git a/rpm.spec b/rpm.spec
index f6efb05..eab53cd 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -134,6 +134,7 @@ Patch77:        langnoc.diff
 Patch78:        headerchk2.diff
 Patch79:        helperenv.diff
 Patch80:        config-guess-sub-update.diff
+Patch81:        debugedit-aarch64.diff
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 #
 # avoid bootstrapping problem
@@ -220,7 +221,7 @@ rm -f rpmdb/db.h
 %patch -P 50 -P 51 -P 52 -P 53 -P 54 -P 55 -P 56 -P 57 -P 58 -P 59
 %patch -P 60 -P 61 -P 62 -P 63 -P 64 -P 65 -P 66 -P 67 -P 68 -P 69
 %patch -P 70 -P 71 -P 72 -P 73 -P 74 -P 75 -P 76 -P 77 -P 78 -P 79
-%patch -P 80
+%patch -P 80 -P 81
 cp config.guess config.sub db/dist/
 cp config.guess config.sub beecrypt/
 #chmod 755 scripts/find-supplements{,.ksyms}