aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2006-09-16 23:51:50 +0000
committerNick Clifton <nickc@redhat.com>2006-09-16 23:51:50 +0000
commit1c0d3aa6ae7db5d61f1166cf907ed034d0ac4980 (patch)
tree649703aa90d3ccbe80e1442bfbb36380db2c7edd /binutils
parent0112cd268b205d8176b8b4d00988a334822956cf (diff)
downloadgdb-1c0d3aa6ae7db5d61f1166cf907ed034d0ac4980.zip
gdb-1c0d3aa6ae7db5d61f1166cf907ed034d0ac4980.tar.gz
gdb-1c0d3aa6ae7db5d61f1166cf907ed034d0ac4980.tar.bz2
Add support for Score target.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog6
-rw-r--r--binutils/Makefile.am2
-rw-r--r--binutils/Makefile.in11
-rw-r--r--binutils/readelf.c31
4 files changed, 40 insertions, 10 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 23f0a81..cadf2b8 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,9 @@
+2006-09-17 Mei Ligang <ligang@sunnorth.com.cn>
+
+ * readelf.c: Add support for Score binaries.
+ * Makefile.am: Update readelf's dependencies.
+ * Makefile.in: Regenerate.
+
2006-09-16 Nick Clifton <nickc@redhat.com>
Pedro Alves <pedro_alves@portugalmail.pt>
diff --git a/binutils/Makefile.am b/binutils/Makefile.am
index d10d88a..db53117 100644
--- a/binutils/Makefile.am
+++ b/binutils/Makefile.am
@@ -540,7 +540,7 @@ readelf.o: readelf.c dwarf.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/elf/mips.h $(INCDIR)/elf/mmix.h $(INCDIR)/elf/mn10200.h \
$(INCDIR)/elf/mn10300.h $(INCDIR)/elf/mt.h $(INCDIR)/elf/msp430.h \
$(INCDIR)/elf/or32.h $(INCDIR)/elf/pj.h $(INCDIR)/elf/ppc.h \
- $(INCDIR)/elf/ppc64.h $(INCDIR)/elf/s390.h $(INCDIR)/elf/sh.h \
+ $(INCDIR)/elf/ppc64.h $(INCDIR)/elf/s390.h $(INCDIR)/elf/score.h $(INCDIR)/elf/sh.h \
$(INCDIR)/elf/sparc.h $(INCDIR)/elf/v850.h $(INCDIR)/elf/vax.h \
$(INCDIR)/elf/x86-64.h $(INCDIR)/elf/xstormy16.h $(INCDIR)/elf/crx.h \
$(INCDIR)/elf/iq2000.h $(INCDIR)/elf/xtensa.h $(INCDIR)/aout/ar.h \
diff --git a/binutils/Makefile.in b/binutils/Makefile.in
index c758823..c82787d 100644
--- a/binutils/Makefile.in
+++ b/binutils/Makefile.in
@@ -235,7 +235,6 @@ EXEEXT = @EXEEXT@
EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@
GENCAT = @GENCAT@
GMSGFMT = @GMSGFMT@
-GREP = @GREP@
HDEFINES = @HDEFINES@
INCINTL = @INCINTL@
INSTALL_DATA = @INSTALL_DATA@
@@ -282,8 +281,9 @@ VERSION = @VERSION@
WARN_CFLAGS = @WARN_CFLAGS@
XGETTEXT = @XGETTEXT@
YACC = `if [ -f ../bison/bison ]; then echo ../bison/bison -y -L$(srcdir)/../bison/; else echo @YACC@; fi`
-YFLAGS = -d
ac_ct_CC = @ac_ct_CC@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@
@@ -300,7 +300,6 @@ build_vendor = @build_vendor@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
-dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
@@ -313,15 +312,12 @@ infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
-localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
-psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
@@ -333,6 +329,7 @@ target_vendor = @target_vendor@
AUTOMAKE_OPTIONS = cygnus dejagnu
SUBDIRS = doc po
tooldir = $(exec_prefix)/$(target_alias)
+YFLAGS = -d
AM_CFLAGS = $(WARN_CFLAGS)
# these two are almost the same program
@@ -1263,7 +1260,7 @@ readelf.o: readelf.c dwarf.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/elf/mips.h $(INCDIR)/elf/mmix.h $(INCDIR)/elf/mn10200.h \
$(INCDIR)/elf/mn10300.h $(INCDIR)/elf/mt.h $(INCDIR)/elf/msp430.h \
$(INCDIR)/elf/or32.h $(INCDIR)/elf/pj.h $(INCDIR)/elf/ppc.h \
- $(INCDIR)/elf/ppc64.h $(INCDIR)/elf/s390.h $(INCDIR)/elf/sh.h \
+ $(INCDIR)/elf/ppc64.h $(INCDIR)/elf/s390.h $(INCDIR)/elf/score.h $(INCDIR)/elf/sh.h \
$(INCDIR)/elf/sparc.h $(INCDIR)/elf/v850.h $(INCDIR)/elf/vax.h \
$(INCDIR)/elf/x86-64.h $(INCDIR)/elf/xstormy16.h $(INCDIR)/elf/crx.h \
$(INCDIR)/elf/iq2000.h $(INCDIR)/elf/xtensa.h $(INCDIR)/aout/ar.h \
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 6d0e66c..b1f3fc6 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -73,6 +73,7 @@
#include "elf/avr.h"
#include "elf/bfin.h"
#include "elf/cris.h"
+#include "elf/crx.h"
#include "elf/d10v.h"
#include "elf/d30v.h"
#include "elf/dlx.h"
@@ -86,6 +87,7 @@
#include "elf/i960.h"
#include "elf/ia64.h"
#include "elf/ip2k.h"
+#include "elf/iq2000.h"
#include "elf/m32c.h"
#include "elf/m32r.h"
#include "elf/m68k.h"
@@ -102,14 +104,13 @@
#include "elf/ppc.h"
#include "elf/ppc64.h"
#include "elf/s390.h"
+#include "elf/score.h"
#include "elf/sh.h"
#include "elf/sparc.h"
#include "elf/v850.h"
#include "elf/vax.h"
#include "elf/x86-64.h"
#include "elf/xstormy16.h"
-#include "elf/crx.h"
-#include "elf/iq2000.h"
#include "elf/xtensa.h"
#include "aout/ar.h"
@@ -566,6 +567,7 @@ guess_is_rela (unsigned long e_machine)
case EM_CYGNUS_D10V:
case EM_MIPS:
case EM_MIPS_RS3_LE:
+ case EM_SCORE:
return FALSE;
/* Targets that use RELA relocations. */
@@ -1099,6 +1101,10 @@ dump_relocations (FILE *file,
rtype = elf_s390_reloc_type (type);
break;
+ case EM_SCORE:
+ rtype = elf_score_reloc_type (type);
+ break;
+
case EM_XSTORMY16:
rtype = elf_xstormy16_reloc_type (type);
break;
@@ -1432,6 +1438,23 @@ get_alpha_dynamic_type (unsigned long type)
}
static const char *
+get_score_dynamic_type (unsigned long type)
+{
+ switch (type)
+ {
+ case DT_SCORE_BASE_ADDRESS: return "SCORE_BASE_ADDRESS";
+ case DT_SCORE_LOCAL_GOTNO: return "SCORE_LOCAL_GOTNO";
+ case DT_SCORE_SYMTABNO: return "SCORE_SYMTABNO";
+ case DT_SCORE_GOTSYM: return "SCORE_GOTSYM";
+ case DT_SCORE_UNREFEXTNO: return "SCORE_UNREFEXTNO";
+ case DT_SCORE_HIPAGENO: return "SCORE_HIPAGENO";
+ default:
+ return NULL;
+ }
+}
+
+
+static const char *
get_dynamic_type (unsigned long type)
{
static char buff[64];
@@ -1539,6 +1562,9 @@ get_dynamic_type (unsigned long type)
case EM_ALPHA:
result = get_alpha_dynamic_type (type);
break;
+ case EM_SCORE:
+ result = get_score_dynamic_type (type);
+ break;
default:
result = NULL;
break;
@@ -1693,6 +1719,7 @@ get_machine_name (unsigned e_machine)
case EM_X86_64: return "Advanced Micro Devices X86-64";
case EM_S390_OLD:
case EM_S390: return "IBM S/390";
+ case EM_SCORE: return "SUNPLUS S+Core";
case EM_XSTORMY16: return "Sanyo Xstormy16 CPU core";
case EM_OPENRISC:
case EM_OR32: return "OpenRISC";