Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2005-10-25 21:40:19 +0400
committerNick Clifton <nickc@redhat.com>2005-10-25 21:40:19 +0400
commit4aa1b05777e410c28f4cf2a6036696a2afab71a5 (patch)
tree7576195cd3f9c705bdba7e8e76b4e779224019cd /include/coff
parent65737220058b00e3b5c5c7696f0255b2c2fda805 (diff)
Add support for the Z80 processor family
Diffstat (limited to 'include/coff')
-rw-r--r--include/coff/ChangeLog5
-rw-r--r--include/coff/internal.h6
-rw-r--r--include/coff/z80.h51
3 files changed, 61 insertions, 1 deletions
diff --git a/include/coff/ChangeLog b/include/coff/ChangeLog
index ca201a12a..a8b66cce2 100644
--- a/include/coff/ChangeLog
+++ b/include/coff/ChangeLog
@@ -1,3 +1,8 @@
+2005-10-25 Arnold Metselaar <arnold.metselaar@planet.nl>
+
+ * internal.h: Add relocation number for Z80
+ * z80.h: New file.
+
2005-08-18 Alan Modra <amodra@bigpond.net.au>
* a29k.h: Delete.
diff --git a/include/coff/internal.h b/include/coff/internal.h
index 20e06c215..d7a83815a 100644
--- a/include/coff/internal.h
+++ b/include/coff/internal.h
@@ -1,7 +1,7 @@
/* Internal format of COFF object file data structures, for GNU BFD.
This file is part of BFD, the Binary File Descriptor library.
- Copyright 1999, 2000, 2001, 2002, 2003, 2004
+ Copyright 1999, 2000, 2001, 2002, 2003, 2004. 2005
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -715,6 +715,10 @@ struct internal_reloc
#define R_IMM4H 0x24 /* high nibble */
#define R_DISP7 0x25 /* djnz displacement */
+/* Z80 modes */
+#define R_OFF8 0x32 /* 8 bit signed abs, for (i[xy]+d) */
+/* R_JR, R_IMM8, R_IMM16, R_IMM32 - as for Z8k */
+
/* H8500 modes */
#define R_H8500_IMM8 1 /* 8 bit immediate */
diff --git a/include/coff/z80.h b/include/coff/z80.h
new file mode 100644
index 000000000..3c72c10dd
--- /dev/null
+++ b/include/coff/z80.h
@@ -0,0 +1,51 @@
+/* coff information for Zilog Z80
+ Copyright 2005 Free Software Foundation, Inc.
+ Contributed by Arnold Metselaar <arnold_m@operamail.com>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of 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.
+
+ This program 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 a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#define L_LNNO_SIZE 4
+#include "coff/external.h"
+
+/* z80 backend does not use dots in section names. */
+#undef _TEXT
+#define _TEXT "text"
+#undef _DATA
+#define _DATA "data"
+#undef _BSS
+#define _BSS "bss"
+
+/* Type of cpu is stored in flags. */
+#define F_MACHMASK 0xF000
+
+#define Z80MAGIC 0x805A
+
+#define Z80BADMAG(x) (((x).f_magic != Z80MAGIC))
+
+/* Relocation directives. */
+
+/* This format actually has more bits than we need. */
+
+struct external_reloc
+{
+ char r_vaddr[4];
+ char r_symndx[4];
+ char r_offset[4];
+ char r_type[2];
+ char r_stuff[2];
+};
+
+#define RELOC struct external_reloc
+#define RELSZ 16