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