aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2018-04-17 09:00:57 +0930
committerAlan Modra <amodra@gmail.com>2018-04-17 10:48:58 +0930
commitf954747f10467071b0acde07ee5f5e268ab606a6 (patch)
treef19cbbe080e157b49e64240c989ddb85f8096f56 /binutils
parent0d6deb358dcc45315bb35cd7d0e1b50ea7cbbf9b (diff)
downloadgdb-f954747f10467071b0acde07ee5f5e268ab606a6.zip
gdb-f954747f10467071b0acde07ee5f5e268ab606a6.tar.gz
gdb-f954747f10467071b0acde07ee5f5e268ab606a6.tar.bz2
Reinstate readelf decoding of i860, i960 and i370 relocs
include/ * elf/i370.h: Revert removal. * elf/i860.h: Likewise. * elf/i960.h: Likewise. binutils * readelf.c: Revert 2018-04-16 and 2018-04-11 changes.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog4
-rw-r--r--binutils/readelf.c23
2 files changed, 27 insertions, 0 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index b69d0a7..1b63c7d 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,7 @@
+2018-04-17 Alan Modra <amodra@gmail.com>
+
+ * readelf.c: Revert 2018-04-16 and 2018-04-11 changes.
+
2018-04-16 Alan Modra <amodra@gmail.com>
* readelf.c (get_machine_name): Correct typo.
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 1e80e81..cf395db 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -108,6 +108,9 @@
#include "elf/h8.h"
#include "elf/hppa.h"
#include "elf/i386.h"
+#include "elf/i370.h"
+#include "elf/i860.h"
+#include "elf/i960.h"
#include "elf/ia64.h"
#include "elf/ip2k.h"
#include "elf/lm32.h"
@@ -762,6 +765,7 @@ guess_is_rela (unsigned int e_machine)
/* Targets that use REL relocations. */
case EM_386:
case EM_IAMCU:
+ case EM_960:
case EM_ARM:
case EM_D10V:
case EM_CYGNUS_D10V:
@@ -775,6 +779,7 @@ guess_is_rela (unsigned int e_machine)
/* Targets that use RELA relocations. */
case EM_68K:
+ case EM_860:
case EM_AARCH64:
case EM_ADAPTEVA_EPIPHANY:
case EM_ALPHA:
@@ -1270,6 +1275,10 @@ dump_relocations (Filedata * filedata,
rtype = elf_m68k_reloc_type (type);
break;
+ case EM_960:
+ rtype = elf_i960_reloc_type (type);
+ break;
+
case EM_AVR:
case EM_AVR_OLD:
rtype = elf_avr_reloc_type (type);
@@ -1419,12 +1428,20 @@ dump_relocations (Filedata * filedata,
rtype = elf_cris_reloc_type (type);
break;
+ case EM_860:
+ rtype = elf_i860_reloc_type (type);
+ break;
+
case EM_X86_64:
case EM_L1OM:
case EM_K1OM:
rtype = elf_x86_64_reloc_type (type);
break;
+ case EM_S370:
+ rtype = i370_reloc_type (type);
+ break;
+
case EM_S390_OLD:
case EM_S390:
rtype = elf_s390_reloc_type (type);
@@ -12178,6 +12195,10 @@ is_32bit_abs_reloc (Filedata * filedata, unsigned int reloc_type)
return reloc_type == 1; /* R_386_32. */
case EM_68K:
return reloc_type == 1; /* R_68K_32. */
+ case EM_860:
+ return reloc_type == 1; /* R_860_32. */
+ case EM_960:
+ return reloc_type == 2; /* R_960_32. */
case EM_AARCH64:
return (reloc_type == 258
|| reloc_type == 1); /* R_AARCH64_ABS32 || R_AARCH64_P32_ABS32 */
@@ -12293,6 +12314,8 @@ is_32bit_abs_reloc (Filedata * filedata, unsigned int reloc_type)
return reloc_type == 1; /* R_RL78_DIR32. */
case EM_RX:
return reloc_type == 1; /* R_RX_DIR32. */
+ case EM_S370:
+ return reloc_type == 1; /* R_I370_ADDR31. */
case EM_S390_OLD:
case EM_S390:
return reloc_type == 4; /* R_S390_32. */