summaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2020-11-01 23:45:32 +0100
committerMark Wielaard <mark@klomp.org>2020-11-01 23:45:32 +0100
commit8dd97a0a871672b3f7a58e1fb50b6f7195d8f32d (patch)
tree3a86d4fb1d7abf6966ff94a1e25f13f7e1809c48 /backends
parent50a6eeef7d87623faa65126dc3d16c2a8e613aea (diff)
parentb503c358dde835d8a1ae3ebd4968755ff396f814 (diff)
downloadelfutils-dts-0.182.tar.gz
Merge tag 'elfutils-0.182' into mjw/RH-DTSdts-0.182
elfutils 0.182 release
Diffstat (limited to 'backends')
-rw-r--r--backends/ChangeLog37
-rw-r--r--backends/Makefile.am11
-rw-r--r--backends/aarch64_init.c2
-rw-r--r--backends/aarch64_symbol.c26
-rw-r--r--backends/common-reloc.c6
-rw-r--r--backends/i386_init.c1
-rw-r--r--backends/i386_syscall.c50
-rw-r--r--backends/ppc64_init.c1
-rw-r--r--backends/ppc_init.c1
-rw-r--r--backends/ppc_syscall.c53
-rw-r--r--backends/tilegx_corenote.c64
-rw-r--r--backends/tilegx_init.c53
-rw-r--r--backends/tilegx_regs.c129
-rw-r--r--backends/tilegx_reloc.def121
-rw-r--r--backends/tilegx_retval.c154
-rw-r--r--backends/tilegx_symbol.c58
-rw-r--r--backends/x86_64_init.c1
-rw-r--r--backends/x86_64_syscall.c50
18 files changed, 72 insertions, 746 deletions
diff --git a/backends/ChangeLog b/backends/ChangeLog
index 7d3578b0..81d4127c 100644
--- a/backends/ChangeLog
+++ b/backends/ChangeLog
@@ -1,3 +1,40 @@
+2020-10-19 Mark Wielard <mark@klomp.org>
+
+ * Makefile.am (modules): Remove tilegx.
+ (tilegx_SRCS): Removed.
+ (libebl_backends_a_SOURCES): Remove tilegx_SRCS.
+ * tilegx_corenote.c: Removed.
+ * tilegx_init.c: Removed.
+ * tilegx_regs.c: Removed.
+ * tilegx_reloc.def: Removed.
+ * tilegx_retval.c: Removed.
+ * tilegx_symbol.c: Removed.
+
+2020-10-19 Mark Wielard <mark@klomp.org>
+
+ * Makefile.am (i386_SRCS): Remove i386_syscall.c.
+ (x86_64_SRCS): Remove x86_64_syscall.c.
+ (ppc_SRCS): Remove ppc_syscall.c.
+ * i386_init.c (i386_init): Remove syscall_abi HOOK.
+ * i386_syscall.c: Delete.
+ * ppc64_init.c (ppc64_init): Remove syscall_abi HOOK.
+ * ppc_syscall.c: Delete.
+ * x86_64_init.c (x86_64_init): Remove syscall_abi HOOK.
+ * x86_64_syscall.c: Delete.
+
+2020-08-28 Mark Wielard <mark@klomp.org>
+
+ * aarch64_init.c (aarch64_init): Hook dynamic_tag_name and
+ dynamic_tag_check.
+ * aarch64_symbol.c (aarch64_dynamic_tag_name): New function.
+ (aarch64_dynamic_tag_check): Likewise.
+
+2020-06-16 Mark Wielard <mark@klomp.org>
+
+ * common-reloc.c (reloc_nametable): Make zero a 1 char array.
+ Initialize it as an array { '\0' }.
+ (reloc_type_name): Access zero as an array.
+
2020-06-10 Mark Wielard <mark@klomp.org>
* aarch64_init.c (aarch64_init): Remove ehlen, return eh.
diff --git a/backends/Makefile.am b/backends/Makefile.am
index 92c50f25..d6934de6 100644
--- a/backends/Makefile.am
+++ b/backends/Makefile.am
@@ -37,16 +37,16 @@ AM_CPPFLAGS += -I$(top_srcdir)/libebl -I$(top_srcdir)/libasm \
noinst_LIBRARIES = libebl_backends.a libebl_backends_pic.a
modules = i386 sh x86_64 ia64 alpha arm aarch64 sparc ppc ppc64 s390 \
- tilegx m68k bpf riscv csky
+ m68k bpf riscv csky
i386_SRCS = i386_init.c i386_symbol.c i386_corenote.c i386_cfi.c \
- i386_retval.c i386_regs.c i386_auxv.c i386_syscall.c \
+ i386_retval.c i386_regs.c i386_auxv.c \
i386_initreg.c i386_unwind.c
sh_SRCS = sh_init.c sh_symbol.c sh_corenote.c sh_regs.c sh_retval.c
x86_64_SRCS = x86_64_init.c x86_64_symbol.c x86_64_corenote.c x86_64_cfi.c \
- x86_64_retval.c x86_64_regs.c x86_64_syscall.c x86_64_initreg.c \
+ x86_64_retval.c x86_64_regs.c x86_64_initreg.c \
x86_64_unwind.c x32_corenote.c
@@ -67,7 +67,7 @@ sparc_SRCS = sparc_init.c sparc_symbol.c sparc_regs.c sparc_retval.c \
sparc_cfi.c sparc_initreg.c
ppc_SRCS = ppc_init.c ppc_symbol.c ppc_retval.c ppc_regs.c \
- ppc_corenote.c ppc_auxv.c ppc_attrs.c ppc_syscall.c \
+ ppc_corenote.c ppc_auxv.c ppc_attrs.c \
ppc_cfi.c ppc_initreg.c
ppc64_SRCS = ppc64_init.c ppc64_symbol.c ppc64_retval.c ppc64_corenote.c \
@@ -77,9 +77,6 @@ s390_SRCS = s390_init.c s390_symbol.c s390_regs.c s390_retval.c \
s390_corenote.c s390x_corenote.c s390_cfi.c s390_initreg.c \
s390_unwind.c
-tilegx_SRCS = tilegx_init.c tilegx_symbol.c tilegx_regs.c \
- tilegx_retval.c tilegx_corenote.c
-
m68k_SRCS = m68k_init.c m68k_symbol.c m68k_regs.c \
m68k_retval.c m68k_corenote.c m68k_cfi.c m68k_initreg.c
diff --git a/backends/aarch64_init.c b/backends/aarch64_init.c
index 66bfae94..bed92954 100644
--- a/backends/aarch64_init.c
+++ b/backends/aarch64_init.c
@@ -50,6 +50,8 @@ aarch64_init (Elf *elf __attribute__ ((unused)),
HOOK (eh, reloc_simple_type);
HOOK (eh, return_value_location);
HOOK (eh, check_special_symbol);
+ HOOK (eh, dynamic_tag_name);
+ HOOK (eh, dynamic_tag_check);
HOOK (eh, data_marker_symbol);
HOOK (eh, abi_cfi);
diff --git a/backends/aarch64_symbol.c b/backends/aarch64_symbol.c
index e30c409d..464a5695 100644
--- a/backends/aarch64_symbol.c
+++ b/backends/aarch64_symbol.c
@@ -106,3 +106,29 @@ aarch64_data_marker_symbol (const GElf_Sym *sym, const char *sname)
&& GELF_ST_TYPE (sym->st_info) == STT_NOTYPE
&& (strcmp (sname, "$d") == 0 || strncmp (sname, "$d.", 3) == 0));
}
+
+const char *
+aarch64_dynamic_tag_name (int64_t tag, char *buf __attribute__ ((unused)),
+ size_t len __attribute__ ((unused)))
+{
+ switch (tag)
+ {
+ case DT_AARCH64_BTI_PLT:
+ return "AARCH64_BTI_PLT";
+ case DT_AARCH64_PAC_PLT:
+ return "AARCH64_PAC_PLT";
+ case DT_AARCH64_VARIANT_PCS:
+ return "AARCH64_VARIANT_PCS";
+ default:
+ break;
+ }
+ return NULL;
+}
+
+bool
+aarch64_dynamic_tag_check (int64_t tag)
+{
+ return (tag == DT_AARCH64_BTI_PLT
+ || tag == DT_AARCH64_PAC_PLT
+ || tag == DT_AARCH64_VARIANT_PCS);
+}
diff --git a/backends/common-reloc.c b/backends/common-reloc.c
index 096ed1c7..a91bc87d 100644
--- a/backends/common-reloc.c
+++ b/backends/common-reloc.c
@@ -45,14 +45,14 @@
static const struct EBLHOOK(reloc_nametable)
{
- char zero;
+ char zero[1];
#define RELOC_TYPE(type, uses) \
char name_##type[sizeof R_NAME (type)];
#include RELOC_TYPES
#undef RELOC_TYPE
} EBLHOOK(reloc_nametable) =
{
- '\0',
+ { '\0' },
#define RELOC_TYPE(type, uses) R_NAME (type),
#include RELOC_TYPES
#undef RELOC_TYPE
@@ -92,7 +92,7 @@ EBLHOOK(reloc_type_name) (int reloc,
#endif
if (reloc >= 0 && reloc < nreloc && EBLHOOK(reloc_nameidx)[reloc] != 0)
- return &reloc_namestr[EBLHOOK(reloc_nameidx)[reloc]];
+ return reloc_namestr[EBLHOOK(reloc_nameidx)[reloc]];
return NULL;
}
diff --git a/backends/i386_init.c b/backends/i386_init.c
index 3f6b9ed1..579e5fad 100644
--- a/backends/i386_init.c
+++ b/backends/i386_init.c
@@ -52,7 +52,6 @@ i386_init (Elf *elf __attribute__ ((unused)),
HOOK (eh, debugscn_p);
HOOK (eh, return_value_location);
HOOK (eh, register_info);
- HOOK (eh, syscall_abi);
HOOK (eh, auxv_info);
HOOK (eh, disasm);
HOOK (eh, abi_cfi);
diff --git a/backends/i386_syscall.c b/backends/i386_syscall.c
deleted file mode 100644
index 535dcd86..00000000
--- a/backends/i386_syscall.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/* Linux/i386 system call ABI in DWARF register numbers.
- Copyright (C) 2008 Red Hat, Inc.
- This file is part of elfutils.
-
- This file is free software; you can redistribute it and/or modify
- it under the terms of either
-
- * the GNU Lesser General Public License as published by the Free
- Software Foundation; either version 3 of the License, or (at
- your option) any later version
-
- or
-
- * the GNU General Public License as published by the Free
- Software Foundation; either version 2 of the License, or (at
- your option) any later version
-
- or both in parallel, as here.
-
- elfutils is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received copies of the GNU General Public License and
- the GNU Lesser General Public License along with this program. If
- not, see <http://www.gnu.org/licenses/>. */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#define BACKEND i386_
-#include "libebl_CPU.h"
-
-int
-i386_syscall_abi (Ebl *ebl __attribute__ ((unused)),
- int *sp, int *pc, int *callno, int args[6])
-{
- *sp = 4; /* %esp */
- *pc = 8; /* %eip */
- *callno = 0; /* %eax */
- args[0] = 3; /* %ebx */
- args[1] = 1; /* %ecx */
- args[2] = 2; /* %edx */
- args[3] = 6; /* %esi */
- args[4] = 7; /* %edi */
- args[5] = 5; /* %ebp */
- return 0;
-}
diff --git a/backends/ppc64_init.c b/backends/ppc64_init.c
index f509aef6..ffc9842c 100644
--- a/backends/ppc64_init.c
+++ b/backends/ppc64_init.c
@@ -58,7 +58,6 @@ ppc64_init (Elf *elf __attribute__ ((unused)),
HOOK (eh, bss_plt_p);
HOOK (eh, return_value_location);
HOOK (eh, register_info);
- HOOK (eh, syscall_abi);
HOOK (eh, core_note);
HOOK (eh, auxv_info);
HOOK (eh, check_object_attribute);
diff --git a/backends/ppc_init.c b/backends/ppc_init.c
index ac440ab2..08468f8f 100644
--- a/backends/ppc_init.c
+++ b/backends/ppc_init.c
@@ -54,7 +54,6 @@ ppc_init (Elf *elf __attribute__ ((unused)),
HOOK (eh, bss_plt_p);
HOOK (eh, return_value_location);
HOOK (eh, register_info);
- HOOK (eh, syscall_abi);
HOOK (eh, core_note);
HOOK (eh, auxv_info);
HOOK (eh, check_object_attribute);
diff --git a/backends/ppc_syscall.c b/backends/ppc_syscall.c
deleted file mode 100644
index b1b9c52b..00000000
--- a/backends/ppc_syscall.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/* Linux/PPC system call ABI in DWARF register numbers.
- Copyright (C) 2008 Red Hat, Inc.
- This file is part of elfutils.
-
- This file is free software; you can redistribute it and/or modify
- it under the terms of either
-
- * the GNU Lesser General Public License as published by the Free
- Software Foundation; either version 3 of the License, or (at
- your option) any later version
-
- or
-
- * the GNU General Public License as published by the Free
- Software Foundation; either version 2 of the License, or (at
- your option) any later version
-
- or both in parallel, as here.
-
- elfutils is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received copies of the GNU General Public License and
- the GNU Lesser General Public License along with this program. If
- not, see <http://www.gnu.org/licenses/>. */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#define BACKEND ppc_
-#include "libebl_CPU.h"
-
-int
-ppc_syscall_abi (Ebl *ebl __attribute__ ((unused)),
- int *sp, int *pc, int *callno, int args[6])
-{
- *sp = 1;
- *pc = -1;
- *callno = 0;
- args[0] = 3;
- args[1] = 4;
- args[2] = 5;
- args[3] = 6;
- args[4] = 7;
- args[5] = 8;
- return 0;
-}
-
-__typeof (ppc_syscall_abi)
-ppc64_syscall_abi __attribute__ ((alias ("ppc_syscall_abi")));
diff --git a/backends/tilegx_corenote.c b/backends/tilegx_corenote.c
deleted file mode 100644
index be3e7dbf..00000000
--- a/backends/tilegx_corenote.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/* TILE-Gx specific core note handling.
- Copyright (C) 2012 Tilera Corporation
- This file is part of elfutils.
-
- This file is free software; you can redistribute it and/or modify
- it under the terms of either
-
- * the GNU Lesser General Public License as published by the Free
- Software Foundation; either version 3 of the License, or (at
- your option) any later version
-
- or
-
- * the GNU General Public License as published by the Free
- Software Foundation; either version 2 of the License, or (at
- your option) any later version
-
- or both in parallel, as here.
-
- elfutils is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received copies of the GNU General Public License and
- the GNU Lesser General Public License along with this program. If
- not, see <http://www.gnu.org/licenses/>. */
-
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <elf.h>
-#include <inttypes.h>
-#include <stddef.h>
-#include <stdio.h>
-#include <sys/time.h>
-
-#define BACKEND tilegx_
-#include "libebl_CPU.h"
-
-static const Ebl_Register_Location prstatus_regs[] =
- {
- { .offset = 0, .regno = 0, .count = 56, .bits = 64 }, /* r0-r55 */
- { .offset = 56 * 8, .regno = 64, .count = 1, .bits = 64 } /* pc */
- };
-#define PRSTATUS_REGS_SIZE (57 * 8)
-
-#define ULONG uint64_t
-#define ALIGN_ULONG 8
-#define TYPE_ULONG ELF_T_XWORD
-#define TYPE_LONG ELF_T_SXWORD
-#define PID_T int32_t
-#define UID_T uint32_t
-#define GID_T uint32_t
-#define ALIGN_PID_T 4
-#define ALIGN_UID_T 4
-#define ALIGN_GID_T 4
-#define TYPE_PID_T ELF_T_SWORD
-#define TYPE_UID_T ELF_T_WORD
-#define TYPE_GID_T ELF_T_WORD
-
-#include "linux-core-note.c"
diff --git a/backends/tilegx_init.c b/backends/tilegx_init.c
deleted file mode 100644
index 0f79542a..00000000
--- a/backends/tilegx_init.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/* Initialization of TILE-Gx specific backend library.
- Copyright (C) 2012 Tilera Corporation
- This file is part of elfutils.
-
- This file is free software; you can redistribute it and/or modify
- it under the terms of either
-
- * the GNU Lesser General Public License as published by the Free
- Software Foundation; either version 3 of the License, or (at
- your option) any later version
-
- or
-
- * the GNU General Public License as published by the Free
- Software Foundation; either version 2 of the License, or (at
- your option) any later version
-
- or both in parallel, as here.
-
- elfutils is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received copies of the GNU General Public License and
- the GNU Lesser General Public License along with this program. If
- not, see <http://www.gnu.org/licenses/>. */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#define BACKEND tilegx_
-#define RELOC_PREFIX R_TILEGX_
-#include "libebl_CPU.h"
-
-/* This defines the common reloc hooks based on tilegx_reloc.def. */
-#include "common-reloc.c"
-
-Ebl *
-tilegx_init (Elf *elf __attribute__ ((unused)),
- GElf_Half machine __attribute__ ((unused)),
- Ebl *eh)
-{
- /* We handle it. */
- tilegx_init_reloc (eh);
- HOOK (eh, reloc_simple_type);
- HOOK (eh, return_value_location);
- HOOK (eh, register_info);
- HOOK (eh, core_note);
-
- return eh;
-}
diff --git a/backends/tilegx_regs.c b/backends/tilegx_regs.c
deleted file mode 100644
index b1e17439..00000000
--- a/backends/tilegx_regs.c
+++ /dev/null
@@ -1,129 +0,0 @@
-/* Register names and numbers for TILE-Gx DWARF.
- Copyright (C) 2012 Tilera Corporation
- This file is part of elfutils.
-
- This file is free software; you can redistribute it and/or modify
- it under the terms of either
-
- * the GNU Lesser General Public License as published by the Free
- Software Foundation; either version 3 of the License, or (at
- your option) any later version
-
- or
-
- * the GNU General Public License as published by the Free
- Software Foundation; either version 2 of the License, or (at
- your option) any later version
-
- or both in parallel, as here.
-
- elfutils is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received copies of the GNU General Public License and
- the GNU Lesser General Public License along with this program. If
- not, see <http://www.gnu.org/licenses/>. */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <stdio.h>
-#include <string.h>
-#include <dwarf.h>
-
-#define BACKEND tilegx_
-#include "libebl_CPU.h"
-
-ssize_t
-tilegx_register_info (Ebl *ebl __attribute__ ((unused)),
- int regno, char *name, size_t namelen,
- const char **prefix, const char **setname,
- int *bits, int *type)
-{
- if (name == NULL)
- return 65;
-
- if (regno < 0 || regno > 64 || namelen < 5)
- return -1;
-
- *prefix = "";
- *setname = "integer";
- *bits = 64;
-
- switch (regno)
- {
- case 0 ... 9:
- *type = DW_ATE_signed;
- name[0] = 'r';
- name[1] = regno + '0';
- namelen = 2;
- break;
-
- case 10 ... 52:
- *type = DW_ATE_signed;
- name[0] = 'r';
- name[1] = regno / 10 + '0';
- name[2] = regno % 10 + '0';
- namelen = 3;
- break;
-
- case 53:
- *type = DW_ATE_address;
- return stpcpy (name, "tp") + 1 - name;
-
- case 54:
- *type = DW_ATE_address;
- return stpcpy (name, "sp") + 1 - name;
-
- case 55:
- *type = DW_ATE_address;
- return stpcpy (name, "lr") + 1 - name;
-
- case 56:
- *type = DW_ATE_unsigned;
- return stpcpy (name, "sn") + 1 - name;
-
- case 57:
- *type = DW_ATE_unsigned;
- return stpcpy (name, "idn0") + 1 - name;
-
- case 58:
- *type = DW_ATE_unsigned;
- return stpcpy (name, "idn1") + 1 - name;
-
- case 59:
- *type = DW_ATE_unsigned;
- return stpcpy (name, "udn0") + 1 - name;
-
- case 60:
- *type = DW_ATE_unsigned;
- return stpcpy (name, "udn1") + 1 - name;
-
- case 61:
- *type = DW_ATE_unsigned;
- return stpcpy (name, "udn2") + 1 - name;
-
- case 62:
- *type = DW_ATE_unsigned;
- return stpcpy (name, "udn3") + 1 - name;
-
- case 63:
- *type = DW_ATE_unsigned;
- return stpcpy (name, "zero") + 1 - name;
-
- case 64:
- *type = DW_ATE_address;
- return stpcpy (name, "pc") + 1 - name;
-
- /* Can't happen. */
- default:
- *setname = NULL;
- return 0;
- }
-
- name[namelen++] = '\0';
- return namelen;
-}
diff --git a/backends/tilegx_reloc.def b/backends/tilegx_reloc.def
deleted file mode 100644
index 1018110d..00000000
--- a/backends/tilegx_reloc.def
+++ /dev/null
@@ -1,121 +0,0 @@
-/* List the relocation types for tilegx. -*- C -*-
- Copyright (C) 2012 Tilera Corporation
- Copyright (C) 2015 Red Hat, Inc.
- This file is part of elfutils.
-
- This file is free software; you can redistribute it and/or modify
- it under the terms of either
-
- * the GNU Lesser General Public License as published by the Free
- Software Foundation; either version 3 of the License, or (at
- your option) any later version
-
- or
-
- * the GNU General Public License as published by the Free
- Software Foundation; either version 2 of the License, or (at
- your option) any later version
-
- or both in parallel, as here.
-
- elfutils is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received copies of the GNU General Public License and
- the GNU Lesser General Public License along with this program. If
- not, see <http://www.gnu.org/licenses/>. */
-
-/* NAME, REL|EXEC|DYN */
-
-RELOC_TYPE (NONE, 0)
-RELOC_TYPE (64, REL|EXEC|DYN)
-RELOC_TYPE (32, REL|EXEC|DYN)
-RELOC_TYPE (16, REL|EXEC|DYN)
-RELOC_TYPE (8, REL|EXEC|DYN)
-RELOC_TYPE (64_PCREL, REL)
-RELOC_TYPE (32_PCREL, REL)
-RELOC_TYPE (16_PCREL, REL)
-RELOC_TYPE (8_PCREL, REL)
-RELOC_TYPE (HW0, REL)
-RELOC_TYPE (HW1, REL)
-RELOC_TYPE (HW2, REL)
-RELOC_TYPE (HW3, REL)
-RELOC_TYPE (HW0_LAST, REL)
-RELOC_TYPE (HW1_LAST, REL)
-RELOC_TYPE (HW2_LAST, REL)
-RELOC_TYPE (COPY, EXEC|DYN)
-RELOC_TYPE (GLOB_DAT, EXEC|DYN)
-RELOC_TYPE (JMP_SLOT, EXEC|DYN)
-RELOC_TYPE (RELATIVE, EXEC|DYN)
-RELOC_TYPE (BROFF_X1, REL)
-RELOC_TYPE (JUMPOFF_X1, REL)
-RELOC_TYPE (JUMPOFF_X1_PLT, REL)
-RELOC_TYPE (IMM8_X0, REL)
-RELOC_TYPE (IMM8_Y0, REL)
-RELOC_TYPE (IMM8_X1, REL)
-RELOC_TYPE (IMM8_Y1, REL)
-RELOC_TYPE (DEST_IMM8_X1, REL)
-RELOC_TYPE (MT_IMM14_X1, REL)
-RELOC_TYPE (MF_IMM14_X1, REL)
-RELOC_TYPE (MMSTART_X0, REL)
-RELOC_TYPE (MMEND_X0, REL)
-RELOC_TYPE (SHAMT_X0, REL)
-RELOC_TYPE (SHAMT_X1, REL)
-RELOC_TYPE (SHAMT_Y0, REL)
-RELOC_TYPE (SHAMT_Y1, REL)
-RELOC_TYPE (IMM16_X0_HW0, REL)
-RELOC_TYPE (IMM16_X1_HW0, REL)
-RELOC_TYPE (IMM16_X0_HW1, REL)
-RELOC_TYPE (IMM16_X1_HW1, REL)
-RELOC_TYPE (IMM16_X0_HW2, REL)
-RELOC_TYPE (IMM16_X1_HW2, REL)
-RELOC_TYPE (IMM16_X0_HW3, REL)
-RELOC_TYPE (IMM16_X1_HW3, REL)
-RELOC_TYPE (IMM16_X0_HW0_LAST, REL)
-RELOC_TYPE (IMM16_X1_HW0_LAST, REL)
-RELOC_TYPE (IMM16_X0_HW1_LAST, REL)
-RELOC_TYPE (IMM16_X1_HW1_LAST, REL)
-RELOC_TYPE (IMM16_X0_HW2_LAST, REL)
-RELOC_TYPE (IMM16_X1_HW2_LAST, REL)
-RELOC_TYPE (IMM16_X0_HW0_PCREL, REL)
-RELOC_TYPE (IMM16_X1_HW0_PCREL, REL)
-RELOC_TYPE (IMM16_X0_HW1_PCREL, REL)
-RELOC_TYPE (IMM16_X1_HW1_PCREL, REL)
-RELOC_TYPE (IMM16_X0_HW2_PCREL, REL)
-RELOC_TYPE (IMM16_X1_HW2_PCREL, REL)
-RELOC_TYPE (IMM16_X0_HW3_PCREL, REL)
-RELOC_TYPE (IMM16_X1_HW3_PCREL, REL)
-RELOC_TYPE (IMM16_X0_HW0_LAST_PCREL, REL)
-RELOC_TYPE (IMM16_X1_HW0_LAST_PCREL, REL)
-RELOC_TYPE (IMM16_X0_HW1_LAST_PCREL, REL)
-RELOC_TYPE (IMM16_X1_HW1_LAST_PCREL, REL)
-RELOC_TYPE (IMM16_X0_HW2_LAST_PCREL, REL)
-RELOC_TYPE (IMM16_X1_HW2_LAST_PCREL, REL)
-RELOC_TYPE (IMM16_X0_HW0_GOT, REL)
-RELOC_TYPE (IMM16_X1_HW0_GOT, REL)
-RELOC_TYPE (IMM16_X0_HW0_LAST_GOT, REL)
-RELOC_TYPE (IMM16_X1_HW0_LAST_GOT, REL)
-RELOC_TYPE (IMM16_X0_HW1_LAST_GOT, REL)
-RELOC_TYPE (IMM16_X1_HW1_LAST_GOT, REL)
-RELOC_TYPE (IMM16_X0_HW0_TLS_GD, REL)
-RELOC_TYPE (IMM16_X1_HW0_TLS_GD, REL)
-RELOC_TYPE (IMM16_X0_HW0_LAST_TLS_GD, REL)
-RELOC_TYPE (IMM16_X1_HW0_LAST_TLS_GD, REL)
-RELOC_TYPE (IMM16_X0_HW1_LAST_TLS_GD, REL)
-RELOC_TYPE (IMM16_X1_HW1_LAST_TLS_GD, REL)
-RELOC_TYPE (IMM16_X0_HW0_TLS_IE, REL)
-RELOC_TYPE (IMM16_X1_HW0_TLS_IE, REL)
-RELOC_TYPE (IMM16_X0_HW0_LAST_TLS_IE, REL)
-RELOC_TYPE (IMM16_X1_HW0_LAST_TLS_IE, REL)
-RELOC_TYPE (IMM16_X0_HW1_LAST_TLS_IE, REL)
-RELOC_TYPE (IMM16_X1_HW1_LAST_TLS_IE, REL)
-RELOC_TYPE (TLS_DTPMOD64, EXEC|DYN)
-RELOC_TYPE (TLS_DTPOFF64, EXEC|DYN)
-RELOC_TYPE (TLS_TPOFF64, EXEC|DYN)
-RELOC_TYPE (TLS_DTPMOD32, EXEC|DYN)
-RELOC_TYPE (TLS_DTPOFF32, EXEC|DYN)
-RELOC_TYPE (TLS_TPOFF32, EXEC|DYN)
-RELOC_TYPE (GNU_VTINHERIT, REL)
-RELOC_TYPE (GNU_VTENTRY, REL)
diff --git a/backends/tilegx_retval.c b/backends/tilegx_retval.c
deleted file mode 100644
index 7f7d24b0..00000000
--- a/backends/tilegx_retval.c
+++ /dev/null
@@ -1,154 +0,0 @@
-/* Function return value location for Linux/TILE-Gx ABI.
- Copyright (C) 2012 Tilera Corporation
- Copyright (C) 2014 Red Hat, Inc.
- This file is part of elfutils.
-
- This file is free software; you can redistribute it and/or modify
- it under the terms of either
-
- * the GNU Lesser General Public License as published by the Free
- Software Foundation; either version 3 of the License, or (at
- your option) any later version
-
- or
-
- * the GNU General Public License as published by the Free
- Software Foundation; either version 2 of the License, or (at
- your option) any later version
-
- or both in parallel, as here.
-
- elfutils is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received copies of the GNU General Public License and
- the GNU Lesser General Public License along with this program. If
- not, see <http://www.gnu.org/licenses/>. */
-
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <assert.h>
-#include <dwarf.h>
-
-#define BACKEND tilegx_
-#include "libebl_CPU.h"
-
-
-/* r0. */
-static const Dwarf_Op loc_intreg[] =
- {
- { .atom = DW_OP_reg0 }
- };
-#define nloc_intreg 1
-
-/* The return value is a structure and is actually stored in stack space
- passed in a hidden argument by the caller. But, the compiler
- helpfully returns the address of that space in r0. */
-static const Dwarf_Op loc_aggregate[] =
- {
- { .atom = DW_OP_breg0, .number = 0 }
- };
-#define nloc_aggregate 1
-
-int
-tilegx_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
-{
- /* Start with the function's type, and get the DW_AT_type attribute,
- which is the type of the return value. */
- Dwarf_Die die_mem, *typedie = &die_mem;
- int tag = dwarf_peeled_die_type (functypedie, typedie);
- if (tag <= 0)
- return tag;
-
- Dwarf_Word size;
- switch (tag)
- {
- case -1:
- return -1;
-
- case DW_TAG_subrange_type:
- if (! dwarf_hasattr_integrate (typedie, DW_AT_byte_size))
- {
- Dwarf_Attribute attr_mem, *attr;
- attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem);
- typedie = dwarf_formref_die (attr, &die_mem);
- tag = DWARF_TAG_OR_RETURN (typedie);
- }
- FALLTHROUGH;
-
- case DW_TAG_base_type:
- case DW_TAG_enumeration_type:
- case DW_TAG_pointer_type:
- case DW_TAG_ptr_to_member_type:
- {
- Dwarf_Attribute attr_mem;
- if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_byte_size,
- &attr_mem), &size) != 0)
- {
- if (tag == DW_TAG_pointer_type || tag == DW_TAG_ptr_to_member_type)
- size = 8;
- else
- return -1;
- }
- if (tag == DW_TAG_base_type)
- {
- Dwarf_Word encoding;
- if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_encoding,
- &attr_mem),
- &encoding) != 0)
- return -1;
- }
- }
-
- /* Small enough structs are passed directly in registers R0 ... R7. */
- if (size <= 8)
- {
- intreg:
- *locp = loc_intreg;
- return nloc_intreg;
- }
-
- FALLTHROUGH;
- case DW_TAG_structure_type:
- case DW_TAG_class_type:
- case DW_TAG_union_type:
- aggregate:
- *locp = loc_aggregate;
- return nloc_aggregate;
-
- case DW_TAG_array_type:
- case DW_TAG_string_type:
- if (dwarf_aggregate_size (typedie, &size) == 0 && size <= 8)
- {
- if (tag == DW_TAG_array_type)
- {
- Dwarf_Attribute attr_mem, *attr;
- /* Check if it's a character array. */
- attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem);
- typedie = dwarf_formref_die (attr, &die_mem);
- tag = DWARF_TAG_OR_RETURN (typedie);
- if (tag != DW_TAG_base_type)
- goto aggregate;
- if (dwarf_formudata (dwarf_attr_integrate (typedie,
- DW_AT_byte_size,
- &attr_mem),
- &size) != 0)
- return -1;
- if (size != 1)
- goto aggregate;
- }
- goto intreg;
- }
- goto aggregate;
- }
-
- /* XXX We don't have a good way to return specific errors from ebl calls.
- This value means we do not understand the type, but it is well-formed
- DWARF and might be valid. */
- return -2;
-}
diff --git a/backends/tilegx_symbol.c b/backends/tilegx_symbol.c
deleted file mode 100644
index 62a46907..00000000
--- a/backends/tilegx_symbol.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/* TILEGX-specific symbolic name handling.
- Copyright (C) 2012 Tilera Corporation
- This file is part of elfutils.
-
- This file is free software; you can redistribute it and/or modify
- it under the terms of either
-
- * the GNU Lesser General Public License as published by the Free
- Software Foundation; either version 3 of the License, or (at
- your option) any later version
-
- or
-
- * the GNU General Public License as published by the Free
- Software Foundation; either version 2 of the License, or (at
- your option) any later version
-
- or both in parallel, as here.
-
- elfutils is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received copies of the GNU General Public License and
- the GNU Lesser General Public License along with this program. If
- not, see <http://www.gnu.org/licenses/>. */
-
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <elf.h>
-#include <stddef.h>
-
-#define BACKEND tilegx_
-#include "libebl_CPU.h"
-
-/* Check for the simple reloc types. */
-Elf_Type
-tilegx_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type,
- int *addsub __attribute__ ((unused)))
-{
- switch (type)
- {
- case R_TILEGX_64:
- return ELF_T_SXWORD;
- case R_TILEGX_32:
- return ELF_T_SWORD;
- case R_TILEGX_16:
- return ELF_T_HALF;
- case R_TILEGX_8:
- return ELF_T_BYTE;
- default:
- return ELF_T_NUM;
- }
-}
diff --git a/backends/x86_64_init.c b/backends/x86_64_init.c
index 44c1ad28..8db9b643 100644
--- a/backends/x86_64_init.c
+++ b/backends/x86_64_init.c
@@ -56,7 +56,6 @@ x86_64_init (Elf *elf __attribute__ ((unused)),
HOOK (eh, core_note);
HOOK (eh, return_value_location);
HOOK (eh, register_info);
- HOOK (eh, syscall_abi);
HOOK (eh, auxv_info);
HOOK (eh, disasm);
HOOK (eh, abi_cfi);
diff --git a/backends/x86_64_syscall.c b/backends/x86_64_syscall.c
deleted file mode 100644
index 0deb8bad..00000000
--- a/backends/x86_64_syscall.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/* Linux/x86-64 system call ABI in DWARF register numbers.
- Copyright (C) 2008 Red Hat, Inc.
- This file is part of elfutils.
-
- This file is free software; you can redistribute it and/or modify
- it under the terms of either
-
- * the GNU Lesser General Public License as published by the Free
- Software Foundation; either version 3 of the License, or (at
- your option) any later version
-
- or
-
- * the GNU General Public License as published by the Free
- Software Foundation; either version 2 of the License, or (at
- your option) any later version
-
- or both in parallel, as here.
-
- elfutils is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received copies of the GNU General Public License and
- the GNU Lesser General Public License along with this program. If
- not, see <http://www.gnu.org/licenses/>. */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#define BACKEND x86_64_
-#include "libebl_CPU.h"
-
-int
-x86_64_syscall_abi (Ebl *ebl __attribute__ ((unused)),
- int *sp, int *pc, int *callno, int args[6])
-{
- *sp = 7; /* %rsp */
- *pc = 16; /* %rip */
- *callno = 0; /* %rax */
- args[0] = 5; /* %rdi */
- args[1] = 4; /* %rsi */
- args[2] = 1; /* %rdx */
- args[3] = 10; /* %r10 */
- args[4] = 8; /* %r8 */
- args[5] = 9; /* %r9 */
- return 0;
-}