This adds support for ADD and SUB relocations as seen on RISC-V.
Signed-off-by: Andreas Schwab
---
backends/ChangeLog | 20
backends/aarch64_symbol.c | 3 ++-
backends/alpha_symbol.c | 3 ++-
backends/arm_symbol.c | 3 ++-
backends/bpf_symbol.c | 3 ++-
backends/i386_symbol.c | 3 ++-
backends/ia64_symbol.c | 3 ++-
backends/m68k_symbol.c | 3 ++-
backends/ppc64_symbol.c | 3 ++-
backends/ppc_symbol.c | 3 ++-
backends/riscv_symbol.c | 26 +-
backends/s390_symbol.c | 3 ++-
backends/sh_symbol.c| 3 ++-
backends/sparc_symbol.c | 3 ++-
backends/tilegx_symbol.c| 3 ++-
backends/x86_64_symbol.c| 3 ++-
libdwfl/ChangeLog | 4
libdwfl/relocate.c | 21 +++--
libebl/ChangeLog| 7 +++
libebl/ebl-hooks.h | 2 +-
libebl/eblopenbackend.c | 5 +++--
libebl/eblrelocsimpletype.c | 4 ++--
libebl/libebl.h | 6 --
src/ChangeLog | 4
src/strip.c | 23 +++
25 files changed, 136 insertions(+), 28 deletions(-)
diff --git a/backends/ChangeLog b/backends/ChangeLog
index fdff302194..a7434dd2d3 100644
--- a/backends/ChangeLog
+++ b/backends/ChangeLog
@@ -1,3 +1,23 @@
+2018-10-02 Andreas Schwab
+
+ * riscv_symbol.c (riscv_reloc_simple_type): Add parameter addsub.
+ Set it for ADD and SUB relocations.
+ * aarch64_symbol.c (aarch64_reloc_simple_type): Add and ignore
+ third parameter.
+ * alpha_symbol.c (alpha_reloc_simple_type): Likewise.
+ * arm_symbol.c (arm_reloc_simple_type): Likewise.
+ * bpf_symbol.c (bpf_reloc_simple_type): Likewise.
+ * i386_symbol.c (i386_reloc_simple_type): Likewise.
+ * ia64_symbol.c (ia64_reloc_simple_type): Likewise.
+ * m68k_symbol.c (m68k_reloc_simple_type): Likewise.
+ * ppc64_symbol.c (ppc64_reloc_simple_type): Likewise.
+ * ppc_symbol.c (ppc_reloc_simple_type): Likewise.
+ * s390_symbol.c (s390_reloc_simple_type): Likewise.
+ * sh_symbol.c (sh_reloc_simple_type): Likewise.
+ * sparc_symbol.c (sparc_reloc_simple_type): Likewise.
+ * tilegx_symbol.c (tilegx_reloc_simple_type): Likewise.
+ * x86_64_symbol.c (x86_64_reloc_simple_type): Likewise.
+
2018-09-12 Mark Wielaard
* ppc64_init.c (ppc64_init): Use elf_getshdrstrndx.
diff --git a/backends/aarch64_symbol.c b/backends/aarch64_symbol.c
index dfd755a54b..e30c409d74 100644
--- a/backends/aarch64_symbol.c
+++ b/backends/aarch64_symbol.c
@@ -40,7 +40,8 @@
/* Check for the simple reloc types. */
Elf_Type
-aarch64_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type)
+aarch64_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type,
+ int *addsub __attribute__ ((unused)))
{
switch (type)
{
diff --git a/backends/alpha_symbol.c b/backends/alpha_symbol.c
index b7f7c17a00..53a9e7b7b4 100644
--- a/backends/alpha_symbol.c
+++ b/backends/alpha_symbol.c
@@ -61,7 +61,8 @@ alpha_dynamic_tag_check (int64_t tag)
/* Check for the simple reloc types. */
Elf_Type
-alpha_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type)
+alpha_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type,
+int *addsub __attribute__ ((unused)))
{
switch (type)
{
diff --git a/backends/arm_symbol.c b/backends/arm_symbol.c
index 3edda7247e..c8e1d7f914 100644
--- a/backends/arm_symbol.c
+++ b/backends/arm_symbol.c
@@ -109,7 +109,8 @@ arm_machine_flag_check (GElf_Word flags)
/* Check for the simple reloc types. */
Elf_Type
-arm_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type)
+arm_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type,
+ int *addsub __attribute__ ((unused)))
{
switch (type)
{
diff --git a/backends/bpf_symbol.c b/backends/bpf_symbol.c
index c9856f2638..85c948ab81 100644
--- a/backends/bpf_symbol.c
+++ b/backends/bpf_symbol.c
@@ -40,7 +40,8 @@
/* Check for the simple reloc types. */
Elf_Type
-bpf_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type)
+bpf_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type,
+ int *addsub __attribute__ ((unused)))
{
switch (type)
{
diff --git a/backends/i386_symbol.c b/backends/i386_symbol.c
index 7dbf899fd2..a4b6ec08b6 100644
--- a/backends/i386_symbol.c
+++ b/backends/i386_symbol.c
@@ -49,7 +49,8 @@ i386_gotpc_reloc_check (Elf *elf __attribute__ ((unused)),
int type)
/* Check for the simple reloc types. */
Elf_Type
-i386_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type)
+i386_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type,
+ int *addsub __attribute__ ((unused)))
{
switch (type)
{
diff --git a/backends/ia64_symbol.c b/backends/ia64_symbol.c
index f928b0b7f7..0