aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog6
-rw-r--r--binutils/readelf.c7
-rw-r--r--binutils/testsuite/binutils-all/dw2-1.S2
-rw-r--r--binutils/testsuite/lib/binutils-common.exp2
4 files changed, 16 insertions, 1 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 3d90103..fd77f44 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,9 @@
+2018-05-18 John Darrington <john@darrington.wattle.id.au>
+
+ * readelf.c: Add support for s12z architecture.
+ * testsuite/lib/binutils-common.exp (is_elf_format): Excluse s12z
+ targets.
+
2018-05-15 Tamar Christina <tamar.christina@arm.com>
PR binutils/21446
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 6a9c51d..6a9319f 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -119,6 +119,7 @@
#include "elf/m32r.h"
#include "elf/m68k.h"
#include "elf/m68hc11.h"
+#include "elf/s12z.h"
#include "elf/mcore.h"
#include "elf/mep.h"
#include "elf/metag.h"
@@ -1274,6 +1275,10 @@ dump_relocations (Filedata * filedata,
rtype = elf_m68hc11_reloc_type (type);
break;
+ case EM_S12Z:
+ rtype = elf_s12z_reloc_type (type);
+ break;
+
case EM_68K:
rtype = elf_m68k_reloc_type (type);
break;
@@ -12309,6 +12314,8 @@ is_32bit_abs_reloc (Filedata * filedata, unsigned int reloc_type)
case EM_68HC11:
case EM_68HC12:
return reloc_type == 6; /* R_M68HC11_32. */
+ case EM_S12Z:
+ return reloc_type == 6; /* R_S12Z_EXT32. */
case EM_MCORE:
return reloc_type == 1; /* R_MCORE_ADDR32. */
case EM_CYGNUS_MEP:
diff --git a/binutils/testsuite/binutils-all/dw2-1.S b/binutils/testsuite/binutils-all/dw2-1.S
index 06cb593..6342a0e 100644
--- a/binutils/testsuite/binutils-all/dw2-1.S
+++ b/binutils/testsuite/binutils-all/dw2-1.S
@@ -27,6 +27,8 @@ _start:
func_cu1:
.Lbegin_func_cu1:
.4byte 0
+ .global func_cu1_end
+func_cu1_end:
.Lend_func_cu1:
.size func_cu1, .-func_cu1
.Lend_text1:
diff --git a/binutils/testsuite/lib/binutils-common.exp b/binutils/testsuite/lib/binutils-common.exp
index 9fc9a18..dcaab84 100644
--- a/binutils/testsuite/lib/binutils-common.exp
+++ b/binutils/testsuite/lib/binutils-common.exp
@@ -23,7 +23,7 @@ proc is_elf_format {} {
# config.sub for these targets curiously transforms a target doublet
# ending in -elf to -none. eg. m68hc12-elf to m68hc12-unknown-none
# They are always elf.
- if { [istarget m68hc1*-*] || [istarget xgate-*] } {
+ if { [istarget m68hc1*-*] || [istarget s12z*-*] || [istarget xgate-*] } {
return 1;
}
# vxworks (and windiss) excluded due to number of ELF tests that need