summaryrefslogtreecommitdiff
path: root/libebl
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2020-10-17 21:22:22 +0200
committerMark Wielaard <mark@klomp.org>2020-10-26 22:44:07 +0100
commitc505ddf9b1965ede67295943154bf6a0295eab52 (patch)
treeeb91983ab19f1587cd1f40021840eb8d4cec83b7 /libebl
parente6031e78d207e976c3add03be7294388cd375682 (diff)
downloadelfutils-c505ddf9b1965ede67295943154bf6a0295eab52.tar.gz
libebl: Remove unused ebl_syscall_abi.
GCC11 -Warray-parameter warned about ebl_syscall_abi being inconsistently declared (once with a pointer to int, once with an array of 6 int elements). Since ebl_syscall_abi isn't actually used and was only implemented for 3 backends without any tests just remove it. Signed-off-by: Mark Wielaard <mark@klomp.org>
Diffstat (limited to 'libebl')
-rw-r--r--libebl/ChangeLog9
-rw-r--r--libebl/Makefile.am2
-rw-r--r--libebl/ebl-hooks.h4
-rw-r--r--libebl/ebl_syscall_abi.c40
-rw-r--r--libebl/eblopenbackend.c17
-rw-r--r--libebl/libebl.h8
6 files changed, 10 insertions, 70 deletions
diff --git a/libebl/ChangeLog b/libebl/ChangeLog
index aa43b31f..dbf4b3b7 100644
--- a/libebl/ChangeLog
+++ b/libebl/ChangeLog
@@ -1,3 +1,12 @@
+2020-10-19 Mark Wielaard <mark@klomp.org>
+
+ * Makefile.am (libebl_a_SOURCES): Remove ebl_syscall_abi.c.
+ * ebl-hooks.h (syscall_abi): Remove.
+ * ebl_syscall_abi.c: Delete.
+ * eblopenbackend.c (default_syscall_abi): Remove.
+ (fill_defaults): Remove syscall_abi assignment.
+ * libebl.h (ebl_syscall_abi): Remove.
+
2020-09-03 Mark Wielaard <mark@klomp.org>
* eblobjnote.c (ebl_object_note): For EM_AARCH64 handle BTI and PAC
diff --git a/libebl/Makefile.am b/libebl/Makefile.am
index d0d475b8..d84e7ee2 100644
--- a/libebl/Makefile.am
+++ b/libebl/Makefile.am
@@ -51,7 +51,7 @@ libebl_a_SOURCES = eblopenbackend.c eblclosebackend.c eblreloctypename.c \
eblbsspltp.c eblretval.c eblreginfo.c eblnonerelocp.c \
eblrelativerelocp.c eblsysvhashentrysize.c eblauxvinfo.c \
eblcheckobjattr.c ebl_check_special_section.c \
- ebl_syscall_abi.c eblabicfi.c eblstother.c eblinitreg.c \
+ eblabicfi.c eblstother.c eblinitreg.c \
ebldwarftoregno.c eblnormalizepc.c eblunwind.c \
eblresolvesym.c eblcheckreloctargettype.c \
ebl_data_marker_symbol.c
diff --git a/libebl/ebl-hooks.h b/libebl/ebl-hooks.h
index 1e7960b8..1214bb84 100644
--- a/libebl/ebl-hooks.h
+++ b/libebl/ebl-hooks.h
@@ -142,10 +142,6 @@ ssize_t EBLHOOK(register_info) (Ebl *ebl,
const char **prefix, const char **setname,
int *bits, int *type);
-/* Return system call ABI registers. */
-int EBLHOOK(syscall_abi) (Ebl *ebl, int *sp, int *pc,
- int *callno, int args[6]);
-
/* Disassembler function. */
int EBLHOOK(disasm) (Ebl *ebl, const uint8_t **startp, const uint8_t *end,
GElf_Addr addr, const char *fmt, DisasmOutputCB_t outcb,
diff --git a/libebl/ebl_syscall_abi.c b/libebl/ebl_syscall_abi.c
deleted file mode 100644
index a25369d2..00000000
--- a/libebl/ebl_syscall_abi.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/* Return system call ABI mapped to 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
-
-#include <libeblP.h>
-
-
-int
-ebl_syscall_abi (Ebl *ebl, int *sp, int *pc, int *callno, int *args)
-{
- return ebl != NULL ? ebl->syscall_abi (ebl, sp, pc, callno, args) : -1;
-}
diff --git a/libebl/eblopenbackend.c b/libebl/eblopenbackend.c
index b3b6fc01..90a83f26 100644
--- a/libebl/eblopenbackend.c
+++ b/libebl/eblopenbackend.c
@@ -214,8 +214,6 @@ static ssize_t default_register_info (Ebl *ebl,
const char **prefix,
const char **setname,
int *bits, int *type);
-static int default_syscall_abi (Ebl *ebl, int *sp, int *pc,
- int *callno, int args[6]);
static bool default_check_object_attribute (Ebl *ebl, const char *vendor,
int tag, uint64_t value,
const char **tag_name,
@@ -259,7 +257,6 @@ fill_defaults (Ebl *result)
result->bss_plt_p = default_bss_plt_p;
result->return_value_location = default_return_value_location;
result->register_info = default_register_info;
- result->syscall_abi = default_syscall_abi;
result->check_object_attribute = default_check_object_attribute;
result->check_reloc_target_type = default_check_reloc_target_type;
result->disasm = NULL;
@@ -690,20 +687,6 @@ default_register_info (Ebl *ebl __attribute__ ((unused)),
return snprintf (name, namelen, "reg%d", regno);
}
-static int
-default_syscall_abi (Ebl *ebl __attribute__ ((unused)),
- int *sp, int *pc, int *callno, int args[6])
-{
- *sp = *pc = *callno = -1;
- args[0] = -1;
- args[1] = -1;
- args[2] = -1;
- args[3] = -1;
- args[4] = -1;
- args[5] = -1;
- return -1;
-}
-
static bool
default_check_object_attribute (Ebl *ebl __attribute__ ((unused)),
const char *vendor __attribute__ ((unused)),
diff --git a/libebl/libebl.h b/libebl/libebl.h
index 23c0e950..731001d3 100644
--- a/libebl/libebl.h
+++ b/libebl/libebl.h
@@ -241,14 +241,6 @@ extern ssize_t ebl_register_info (Ebl *ebl,
const char **prefix, const char **setname,
int *bits, int *type);
-/* Fill in the DWARF register numbers for the registers used in system calls.
- The SP and PC are what kernel reports call the user stack pointer and PC.
- The CALLNO and ARGS are the system call number and incoming arguments.
- Each of these is filled with the DWARF register number corresponding,
- or -1 if there is none. Returns zero when the information is available. */
-extern int ebl_syscall_abi (Ebl *ebl, int *sp, int *pc,
- int *callno, int args[6]);
-
/* Supply the ABI-specified state of DWARF CFI before CIE initial programs.
The DWARF 3.0 spec says that the default initial states of all registers