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