aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2002-07-17 14:15:52 +0000
committerNick Clifton <nickc@redhat.com>2002-07-17 14:15:52 +0000
commitcf88bb9f09d71baa044b1bb8ed774f56839236ec (patch)
treeda383eac35d1e76029bc2bfb3ea344e254f390a0 /include
parent0dafd5f6a9d00407314e765ce587fbf4d58fd9e3 (diff)
downloadgdb-cf88bb9f09d71baa044b1bb8ed774f56839236ec.zip
gdb-cf88bb9f09d71baa044b1bb8ed774f56839236ec.tar.gz
gdb-cf88bb9f09d71baa044b1bb8ed774f56839236ec.tar.bz2
Add IP2k support to BFD and LD
Diffstat (limited to 'include')
-rw-r--r--include/elf/ChangeLog12
-rw-r--r--include/elf/common.h1
-rw-r--r--include/elf/ip2k.h62
3 files changed, 75 insertions, 0 deletions
diff --git a/include/elf/ChangeLog b/include/elf/ChangeLog
index 3e64a32..e7b8b76 100644
--- a/include/elf/ChangeLog
+++ b/include/elf/ChangeLog
@@ -1,3 +1,15 @@
+2002-07-15 Denis Chertykov <denisc@overta.ru>
+ Frank Ch. Eigler <fche@redhat.com>
+ Ben Elliston <bje@redhat.com>
+ Alan Lehotsky <alehotsky@cygnus.com>
+ John Healy <jhealy@redhat.com>
+ Graham Stott <grahams@redhat.com>
+ Jeff Johnston <jjohnstn@redhat.com>
+
+ * common.h (EM_IP2K): New macro.
+ (EM_IP2K_OLD): New macro.
+ * ip2k.h: New file.
+
2002-07-01 Matt Thomas <matt@3am-software.com>
* vax.h: Rename EF_* to EF_VAX_*.
diff --git a/include/elf/common.h b/include/elf/common.h
index 4e1b502..86b82fe 100644
--- a/include/elf/common.h
+++ b/include/elf/common.h
@@ -176,6 +176,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define EM_OPENRISC 92 /* OpenRISC 32-bit embedded processor */
#define EM_ARC_A5 93 /* ARC Cores Tangent-A5 */
#define EM_XTENSA 94 /* Tensilica Xtensa Architecture */
+#define EM_IP2K 101 /* Ubicom IP2022 micro controller */
/* If it is necessary to assign new unofficial EM_* values, please pick large
random numbers (0x8523, 0xa7f2, etc.) to minimize the chances of collision
diff --git a/include/elf/ip2k.h b/include/elf/ip2k.h
new file mode 100644
index 0000000..c331b72
--- /dev/null
+++ b/include/elf/ip2k.h
@@ -0,0 +1,62 @@
+/* IP2xxx ELF support for BFD.
+ Copyright (C) 2000, 2002 Free Software Foundation, Inc.
+
+ This file is part of BFD, the Binary File Descriptor library.
+
+ 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, Inc.,
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifndef _ELF_IP2K_H
+#define _ELF_IP2K_H
+
+#include "elf/reloc-macros.h"
+
+/* Relocations. */
+START_RELOC_NUMBERS (elf_ip2k_reloc_type)
+ RELOC_NUMBER (R_IP2K_NONE, 0)
+ RELOC_NUMBER (R_IP2K_16, 1)
+ RELOC_NUMBER (R_IP2K_32, 2)
+ RELOC_NUMBER (R_IP2K_FR9, 3)
+ RELOC_NUMBER (R_IP2K_BANK, 4)
+ RELOC_NUMBER (R_IP2K_ADDR16CJP, 5)
+ RELOC_NUMBER (R_IP2K_PAGE3, 6)
+ RELOC_NUMBER (R_IP2K_LO8DATA, 7)
+ RELOC_NUMBER (R_IP2K_HI8DATA, 8)
+ RELOC_NUMBER (R_IP2K_LO8INSN, 9)
+ RELOC_NUMBER (R_IP2K_HI8INSN, 10)
+ RELOC_NUMBER (R_IP2K_PC_SKIP, 11)
+ RELOC_NUMBER (R_IP2K_TEXT, 12)
+ RELOC_NUMBER (R_IP2K_FR_OFFSET, 13)
+ RELOC_NUMBER (R_IP2K_EX8DATA, 14)
+END_RELOC_NUMBERS(R_IP2K_max)
+
+
+/* Define the data & instruction memory discriminator. In a linked
+ executable, an symbol should be deemed to point to an instruction
+ if ((address & IP2K_INSN_MASK) == IP2K_INSN_VALUE), and similarly
+ for the data space. See also `ld/emulparams/elf32ip2k.sh'. */
+/* ??? Consider extending the _MASK values to include all the
+ intermediate bits that must be zero due to the limited physical
+ memory size on the IP2K. */
+
+#define IP2K_DATA_MASK 0xff000000
+#define IP2K_DATA_VALUE 0x01000000
+#define IP2K_INSN_MASK 0xff000000
+#define IP2K_INSN_VALUE 0x02000000
+
+/* The location of the memory mapped hardware stack. */
+#define IP2K_STACK_VALUE 0x0f000000
+#define IP2K_STACK_SIZE 0x20
+
+#endif /* _ELF_IP2K_H */