[PATCH] debugedit: Fix 'Unhandled relocation 0 in .debug_info section' on e2k

Vitaly Chikunov vt@altlinux.org
Wed Apr 14 16:39:08 GMT 2021


Fix handling of Elbrus ELF relocatables:

  /usr/lib/rpm/debugedit: ./lib/modules/5.4.58-elbrus-def-alt1/misc/xt_so.ko: Unhandled relocation 0 in .debug_info section

Reported-by: Michael Shigorin <mike@altlinux.org>
Tested-by: Andrey Savchenko <bircoph@altlinux.org>
Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
---
 tools/debugedit.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tools/debugedit.c b/tools/debugedit.c
index 917c59b..4527a08 100644
--- a/tools/debugedit.c
+++ b/tools/debugedit.c
@@ -617,6 +617,12 @@ setup_relbuf (DSO *dso, debug_section *sec, int *reltype)
 	    goto fail;
 	  break;
 #endif
+#if defined(EM_MCST_ELBRUS) && defined(R_E2K_32_ABS)
+	case EM_MCST_ELBRUS:
+	  if (rtype != R_E2K_32_ABS)
+		  goto fail;
+	  break;
+#endif
 	default:
 	fail:
 	  error (1, 0, "%s: Unhandled relocation %d in %s section",
-- 
2.11.0



More information about the Debugedit mailing list