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

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