Blame SOURCES/ltrace-0.7.91-s390-irelative.patch

03779e
@@ -, +, @@ 
03779e
---
03779e
 sysdeps/linux-gnu/s390/arch.h |  2 ++
03779e
 sysdeps/linux-gnu/s390/plt.c  | 22 ++++++++++++++++++++++
03779e
 2 files changed, 24 insertions(+)
03779e
--- a/sysdeps/linux-gnu/s390/arch.h	
03779e
+++ a/sysdeps/linux-gnu/s390/arch.h	
03779e
@@ -1,5 +1,6 @@ 
03779e
 /*
03779e
  * This file is part of ltrace.
03779e
+ * Copyright (C) 2013 Petr Machata, Red Hat Inc.
03779e
  * Copyright (C) 2001 IBM Poughkeepsie, IBM Corporation
03779e
  *
03779e
  * This program is free software; you can redistribute it and/or
03779e
@@ -25,6 +26,7 @@ 
03779e
 #define ARCH_HAVE_FETCH_ARG
03779e
 #define ARCH_HAVE_SIZEOF
03779e
 #define ARCH_HAVE_ALIGNOF
03779e
+#define ARCH_HAVE_ADD_PLT_ENTRY
03779e
 
03779e
 #define LT_ELFCLASS	ELFCLASS32
03779e
 #define LT_ELF_MACHINE	EM_S390
03779e
--- a/sysdeps/linux-gnu/s390/plt.c	
03779e
+++ a/sysdeps/linux-gnu/s390/plt.c	
03779e
@@ -1,5 +1,6 @@ 
03779e
 /*
03779e
  * This file is part of ltrace.
03779e
+ * Copyright (C) 2013 Petr Machata, Red Hat Inc.
03779e
  * Copyright (C) 2004,2008,2009 Juan Cespedes
03779e
  *
03779e
  * This program is free software; you can redistribute it and/or
03779e
@@ -19,9 +20,12 @@ 
03779e
  */
03779e
 
03779e
 #include <gelf.h>
03779e
+#include <stdbool.h>
03779e
+
03779e
 #include "proc.h"
03779e
 #include "common.h"
03779e
 #include "library.h"
03779e
+#include "trace.h"
03779e
 
03779e
 GElf_Addr
03779e
 arch_plt_sym_val(struct ltelf *lte, size_t ndx, GElf_Rela * rela) {
03779e
@@ -33,3 +37,21 @@ sym2addr(struct process *proc, struct library_symbol *sym)
03779e
 {
03779e
 	return sym->enter_addr;
03779e
 }
03779e
+
03779e
+enum plt_status
03779e
+arch_elf_add_plt_entry(struct process *proc, struct ltelf *lte,
03779e
+		       const char *a_name, GElf_Rela *rela, size_t ndx,
03779e
+		       struct library_symbol **ret)
03779e
+{
03779e
+#ifdef R_390_IRELATIVE
03779e
+	bool irelative = GELF_R_TYPE(rela->r_info) == R_390_IRELATIVE;
03779e
+#else
03779e
+	bool irelative = false;
03779e
+#endif
03779e
+
03779e
+	if (irelative)
03779e
+		return linux_elf_add_plt_entry_irelative(proc, lte, rela,
03779e
+							 ndx, ret);
03779e
+
03779e
+	return PLT_DEFAULT;
03779e
+}
03779e
--