summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/ChangeLog40
-rw-r--r--include/coff/ti.h8
-rw-r--r--include/coff/tic4x.h6
-rw-r--r--include/dis-asm.h3
-rw-r--r--include/elf/ChangeLog82
-rw-r--r--include/elf/common.h323
-rw-r--r--include/elf/iq2000.h58
-rw-r--r--include/elf/mips.h6
-rw-r--r--include/elf/msp430.h55
-rw-r--r--include/elf/ppc.h225
-rw-r--r--include/elf/ppc64.h156
-rw-r--r--include/elf/s390.h49
-rw-r--r--include/elf/sh.h65
-rw-r--r--include/elf/sparc.h31
-rw-r--r--include/gdb/ChangeLog4
-rw-r--r--include/gdb/sim-h8300.h66
-rw-r--r--include/hashtab.h25
-rw-r--r--include/opcode/ChangeLog45
-rw-r--r--include/opcode/h8300.h10
-rw-r--r--include/opcode/hppa.h2
-rw-r--r--include/opcode/m68hc11.h4
-rw-r--r--include/opcode/mips.h64
-rw-r--r--include/opcode/msp430.h111
-rw-r--r--include/splay-tree.h25
24 files changed, 1042 insertions, 421 deletions
diff --git a/include/ChangeLog b/include/ChangeLog
index 5b46e44124f..829d187740e 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,43 @@
+2003-01-31 Grant Grundler <grundler@dsl2.external.hp.com>
+
+ * hppa.h (ldwa, ldda): Add ordered opcodes.
+
+2003-01-26 Daniel Jacobowitz <drow@mvista.com>
+
+ * hashtab.h (htab_alloc_with_arg, htab_free_with_arg): Add new types.
+ (struct htab): Add alloc_arg, alloc_with_arg_f, free_with_arg_f.
+ (htab_create_alloc_ex): New prototype.
+ (htab_set_functions_ex): New prototype.
+
+2003-01-25 Jakub Jelinek <jakub@redhat.com>
+
+ * elf/sparc.h: Add TLS relocs. Move R_SPARC_REV32 to 252.
+
+2003-01-20 Svein E. Seldal <Svein.Seldal@solidas.com>
+
+ * coff/tic4x.h (TICOFF_TARGET_MACHINE_GET): Fixed define bug
+ * coff/ti.h (TICOFF_TARGET_MACHINE_GET): Added macros
+
+2002-07-17 Geoffrey Keating <geoffk@redhat.com>
+
+ * splay-tree.h (GTY): Define if undefined.
+ (splay_tree_allocate_fn): Return PTR for compatibility, not void *.
+ (struct splay_tree_node_s): Support gengtype.
+ (struct splay_tree_s): Likewise. Make allocate_data a PTR,
+ not a void *.
+
+2002-01-02 Ben Elliston <bje@redhat.com>
+
+ * dis-asm.h (print_insn_iq2000): Declare.
+
+2002-12-24 Dmitry Diky <diwil@mail.ru>
+
+ * dis-asm.h: Add msp430 disassembler prototype.
+
+2002-12-27 Chris Demetriou <cgd@broadcom.com>
+
+ * dis-asm.h (print_mips_disassembler_options): Prototype.
+
2002-12-23 Alan Modra <amodra@bigpond.net.au>
* bfdlink.h (struct bfd_link_info): Add "strip_discarded".
diff --git a/include/coff/ti.h b/include/coff/ti.h
index 0a59b226a32..8df15223c8d 100644
--- a/include/coff/ti.h
+++ b/include/coff/ti.h
@@ -57,6 +57,14 @@ struct external_filehdr
#error "TICOFF_TARGET_ARCH needs to be defined for your CPU"
#endif
+#ifndef TICOFF_TARGET_MACHINE_GET
+#define TICOFF_TARGET_MACHINE_GET(FLAGS) 0
+#endif
+
+#ifndef TICOFF_TARGET_MACHINE_SET
+#define TICOFF_TARGET_MACHINE_SET(FLAGSP, MACHINE)
+#endif
+
/* Default to COFF2 for file output */
#ifndef TICOFF_DEFAULT_MAGIC
#define TICOFF_DEFAULT_MAGIC TICOFF2MAGIC
diff --git a/include/coff/tic4x.h b/include/coff/tic4x.h
index 03215fb5314..083cc3b10d6 100644
--- a/include/coff/tic4x.h
+++ b/include/coff/tic4x.h
@@ -30,14 +30,14 @@
/* We use COFF2. */
#define TICOFF_DEFAULT_MAGIC TICOFF2MAGIC
-#define TICOFF_TARGET_MACHINE_GET (FLAGS) \
+#define TICOFF_TARGET_MACHINE_GET(FLAGS) \
(((FLAGS) & F_VERS) ? bfd_mach_c4x : bfd_mach_c3x)
-#define TICOFF_TARGET_MACHINE_SET (FLAGSP, MACHINE) \
+#define TICOFF_TARGET_MACHINE_SET(FLAGSP, MACHINE) \
do \
{ \
if ((MACHINE) == bfd_mach_c4x) \
- *(FLAGSP) = F_VERS; \
+ *(FLAGSP) |= F_VERS; \
} \
while (0)
diff --git a/include/dis-asm.h b/include/dis-asm.h
index 993b3ad29f6..5e6bdc3ad3b 100644
--- a/include/dis-asm.h
+++ b/include/dis-asm.h
@@ -217,6 +217,7 @@ extern int print_insn_mcore PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_mmix PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_mn10200 PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_mn10300 PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_msp430 PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_ns32k PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_openrisc PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_big_or32 PARAMS ((bfd_vma, disassemble_info*));
@@ -239,10 +240,12 @@ extern int print_insn_xstormy16 PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_sh64 PARAMS ((bfd_vma, disassemble_info *));
extern int print_insn_sh64x_media PARAMS ((bfd_vma, disassemble_info *));
extern int print_insn_frv PARAMS ((bfd_vma, disassemble_info *));
+extern int print_insn_iq2000 PARAMS ((bfd_vma, disassemble_info *));
extern disassembler_ftype arc_get_disassembler PARAMS ((void *));
extern disassembler_ftype cris_get_disassembler PARAMS ((bfd *));
+extern void print_mips_disassembler_options PARAMS ((FILE *));
extern void print_ppc_disassembler_options PARAMS ((FILE *));
extern void print_arm_disassembler_options PARAMS ((FILE *));
extern void parse_arm_disassembler_option PARAMS ((char *));
diff --git a/include/elf/ChangeLog b/include/elf/ChangeLog
index de95f20c5a8..88e8c96e566 100644
--- a/include/elf/ChangeLog
+++ b/include/elf/ChangeLog
@@ -1,3 +1,73 @@
+2003-02-05 Alan Modra <amodra@bigpond.net.au>
+
+ * ppc.h: Add TLS relocs. Format.
+ * ppc64.h: Likewise.
+
+2003-01-27 Alexandre Oliva <aoliva@redhat.com>
+
+ * mips.h (EF_MIPS_XGOT): Define.
+
+2003-01-24 Martin Schwidefsky <schwidefsky@de.ibm.com>
+
+ * s390.h: Add s390 TLS relocations.
+
+2003-01-23 Nick Clifton <nickc@redhat.com>
+
+ * Add sh2e support:
+
+ 2002-04-02 Alexandre Oliva <aoliva@redhat.com>
+
+ * sh.h (EF_SH_MERGE_MACH): Handle SH2E.
+
+ 2002-04-02 Elena Zannoni <ezannoni@redhat.com>
+
+ * sh.h (EF_SH2E): New.
+
+2003-01-23 Alan Modra <amodra@bigpond.net.au>
+
+ * sh.h: Split out various bits to bfd/elf32-sh64.h.
+
+2003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
+
+ * s390.h: Rename R_390_GOTOFF to R_390_GOTOFF32. Add new gotoff,
+ gotplt and pltoff relocations.
+
+2003-01-17 Alan Modra <amodra@bigpond.net.au>
+
+ * common.h: Formatting, typo fixes.
+ (DT_ENCODING): Correct value.
+
+2003-01-17 Fabio Alemagna <falemagn@aros.org>
+
+ * common.h (ELFOSABI_AROS): Define.
+ (ELFOSABI_OPENVMS): Likewise.
+ (ELFOSABI_NSK): Likewise.
+
+2003-01-16 Alan Modra <amodra@bigpond.net.au>
+
+ * ppc.h: Split out ppc64 definitions to..
+ * pcc64.h: ..here. New file.
+ (R_PPC64_REL30): Rename from R_PPC64_ADDR30.
+
+2003-01-13 Dmitry Diky <diwil@mail.ru>
+
+ * elf/common.h (EM_MSP430): Change e_machine value to officially
+ assigned.
+
+2003-01-02 Ben Elliston <bje@redhat.com>
+
+ * common.h (EM_IQ2000): Define.
+ * iq2000.h: New file.
+
+2002-12-30 Chris Demetriou <cgd@broadcom.com>
+
+ * mips.h (E_MIPS_ARCH_32R2): New define.
+
+2002-12-24 Dmitry Diky <diwil@mail.ru>
+
+ * common.h: Define msp430 machine numbers.
+ * msp430.h: New file. Define msp430 relocs.
+
2002-12-20 DJ Delorie <dj@redhat.com>
* xstormy16.h: Add XSTORMY16_12.
@@ -51,10 +121,10 @@
* sh.h: Add SH TLS relocs.
2002-09-30 Gavin Romig-Koch <gavin@redhat.com>
- Ken Raeburn <raeburn@cygnus.com>
- Aldy Hernandez <aldyh@redhat.com>
- Eric Christopher <echristo@redhat.com>
- Richard Sandiford <rsandifo@redhat.com>
+ Ken Raeburn <raeburn@cygnus.com>
+ Aldy Hernandez <aldyh@redhat.com>
+ Eric Christopher <echristo@redhat.com>
+ Richard Sandiford <rsandifo@redhat.com>
* mips.h (E_MIPS_MACH_4120, E_MIPS_MACH_5400, E_MIPS_MACH_5500): New.
@@ -92,9 +162,9 @@
Graham Stott <grahams@redhat.com>
Jeff Johnston <jjohnstn@redhat.com>
- * common.h (EM_IP2K): New macro.
+ * common.h (EM_IP2K): New macro.
(EM_IP2K_OLD): New macro.
- * ip2k.h: New file.
+ * ip2k.h: New file.
2002-07-01 Matt Thomas <matt@3am-software.com>
diff --git a/include/elf/common.h b/include/elf/common.h
index 0cef267e952..2315fa8d7ce 100644
--- a/include/elf/common.h
+++ b/include/elf/common.h
@@ -1,6 +1,6 @@
/* ELF support for BFD.
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002
+ 2001, 2002, 2003
Free Software Foundation, Inc.
Written by Fred Fish @ Cygnus Support, from information published
@@ -35,46 +35,49 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Fields in e_ident[] */
#define EI_MAG0 0 /* File identification byte 0 index */
-#define ELFMAG0 0x7F /* Magic number byte 0 */
+#define ELFMAG0 0x7F /* Magic number byte 0 */
#define EI_MAG1 1 /* File identification byte 1 index */
-#define ELFMAG1 'E' /* Magic number byte 1 */
+#define ELFMAG1 'E' /* Magic number byte 1 */
#define EI_MAG2 2 /* File identification byte 2 index */
-#define ELFMAG2 'L' /* Magic number byte 2 */
+#define ELFMAG2 'L' /* Magic number byte 2 */
#define EI_MAG3 3 /* File identification byte 3 index */
-#define ELFMAG3 'F' /* Magic number byte 3 */
+#define ELFMAG3 'F' /* Magic number byte 3 */
#define EI_CLASS 4 /* File class */
-#define ELFCLASSNONE 0 /* Invalid class */
-#define ELFCLASS32 1 /* 32-bit objects */
-#define ELFCLASS64 2 /* 64-bit objects */
+#define ELFCLASSNONE 0 /* Invalid class */
+#define ELFCLASS32 1 /* 32-bit objects */
+#define ELFCLASS64 2 /* 64-bit objects */
#define EI_DATA 5 /* Data encoding */
-#define ELFDATANONE 0 /* Invalid data encoding */
-#define ELFDATA2LSB 1 /* 2's complement, little endian */
-#define ELFDATA2MSB 2 /* 2's complement, big endian */
+#define ELFDATANONE 0 /* Invalid data encoding */
+#define ELFDATA2LSB 1 /* 2's complement, little endian */
+#define ELFDATA2MSB 2 /* 2's complement, big endian */
#define EI_VERSION 6 /* File version */
-#define EI_OSABI 7 /* Operating System/ABI indication */
-#define ELFOSABI_NONE 0 /* UNIX System V ABI */
-#define ELFOSABI_HPUX 1 /* HP-UX operating system */
-#define ELFOSABI_NETBSD 2 /* NetBSD */
-#define ELFOSABI_LINUX 3 /* GNU/Linux */
-#define ELFOSABI_HURD 4 /* GNU/Hurd */
-#define ELFOSABI_SOLARIS 6 /* Solaris */
-#define ELFOSABI_AIX 7 /* AIX */
-#define ELFOSABI_IRIX 8 /* IRIX */
-#define ELFOSABI_FREEBSD 9 /* FreeBSD */
-#define ELFOSABI_TRU64 10 /* TRU64 UNIX */
-#define ELFOSABI_MODESTO 11 /* Novell Modesto */
-#define ELFOSABI_OPENBSD 12 /* OpenBSD */
-#define ELFOSABI_STANDALONE 255 /* Standalone (embedded) application */
-#define ELFOSABI_ARM 97 /* ARM */
-
-#define EI_ABIVERSION 8 /* ABI version */
+#define EI_OSABI 7 /* Operating System/ABI indication */
+#define ELFOSABI_NONE 0 /* UNIX System V ABI */
+#define ELFOSABI_HPUX 1 /* HP-UX operating system */
+#define ELFOSABI_NETBSD 2 /* NetBSD */
+#define ELFOSABI_LINUX 3 /* GNU/Linux */
+#define ELFOSABI_HURD 4 /* GNU/Hurd */
+#define ELFOSABI_SOLARIS 6 /* Solaris */
+#define ELFOSABI_AIX 7 /* AIX */
+#define ELFOSABI_IRIX 8 /* IRIX */
+#define ELFOSABI_FREEBSD 9 /* FreeBSD */
+#define ELFOSABI_TRU64 10 /* TRU64 UNIX */
+#define ELFOSABI_MODESTO 11 /* Novell Modesto */
+#define ELFOSABI_OPENBSD 12 /* OpenBSD */
+#define ELFOSABI_OPENVMS 13 /* OpenVMS */
+#define ELFOSABI_NSK 14 /* Hewlett-Packard Non-Stop Kernel */
+#define ELFOSABI_AROS 15 /* Amiga Research OS */
+#define ELFOSABI_ARM 97 /* ARM */
+#define ELFOSABI_STANDALONE 255 /* Standalone (embedded) application */
+
+#define EI_ABIVERSION 8 /* ABI version */
#define EI_PAD 9 /* Start of padding bytes */
@@ -86,8 +89,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define ET_EXEC 2 /* Executable file */
#define ET_DYN 3 /* Shared object file */
#define ET_CORE 4 /* Core file */
-#define ET_LOOS 0xFE00 /* Operating system-specific */
-#define ET_HIOS 0xFEFF /* Operating system-specific */
+#define ET_LOOS 0xFE00 /* Operating system-specific */
+#define ET_HIOS 0xFEFF /* Operating system-specific */
#define ET_LOPROC 0xFF00 /* Processor-specific */
#define ET_HIPROC 0xFFFF /* Processor-specific */
@@ -95,88 +98,89 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
are officially assigned by registry@caldera.com. See below for a list of
ad-hoc numbers used during initial development. */
-#define EM_NONE 0 /* No machine */
-#define EM_M32 1 /* AT&T WE 32100 */
-#define EM_SPARC 2 /* SUN SPARC */
-#define EM_386 3 /* Intel 80386 */
-#define EM_68K 4 /* Motorola m68k family */
-#define EM_88K 5 /* Motorola m88k family */
-#define EM_486 6 /* Intel 80486 *//* Reserved for future use */
-#define EM_860 7 /* Intel 80860 */
-#define EM_MIPS 8 /* MIPS R3000 (officially, big-endian only) */
-#define EM_S370 9 /* IBM System/370 */
-#define EM_MIPS_RS3_LE 10 /* MIPS R3000 little-endian (Oct 4 1999 Draft)*/ /* Depreciated */
-
-#define EM_PARISC 15 /* HPPA */
-
-#define EM_VPP550 17 /* Fujitsu VPP500 */
-#define EM_SPARC32PLUS 18 /* Sun's "v8plus" */
-#define EM_960 19 /* Intel 80960 */
-#define EM_PPC 20 /* PowerPC */
-#define EM_PPC64 21 /* 64-bit PowerPC */
-#define EM_S390 22 /* IBM S/390 */
-
-#define EM_V800 36 /* NEC V800 series */
-#define EM_FR20 37 /* Fujitsu FR20 */
-#define EM_RH32 38 /* TRW RH32 */
-#define EM_MCORE 39 /* Motorola M*Core */ /* May also be taken by Fujitsu MMA */
-#define EM_RCE 39 /* Old name for MCore */
-#define EM_ARM 40 /* ARM */
-#define EM_OLD_ALPHA 41 /* Digital Alpha */
-#define EM_SH 42 /* Hitachi SH */
-#define EM_SPARCV9 43 /* SPARC v9 64-bit */
-#define EM_TRICORE 44 /* Siemens Tricore embedded processor */
-#define EM_ARC 45 /* ARC Cores */
-#define EM_H8_300 46 /* Hitachi H8/300 */
-#define EM_H8_300H 47 /* Hitachi H8/300H */
-#define EM_H8S 48 /* Hitachi H8S */
-#define EM_H8_500 49 /* Hitachi H8/500 */
-#define EM_IA_64 50 /* Intel IA-64 Processor */
-#define EM_MIPS_X 51 /* Stanford MIPS-X */
-#define EM_COLDFIRE 52 /* Motorola Coldfire */
-#define EM_68HC12 53 /* Motorola M68HC12 */
-#define EM_MMA 54 /* Fujitsu Multimedia Accelerator */
-#define EM_PCP 55 /* Siemens PCP */
-#define EM_NCPU 56 /* Sony nCPU embedded RISC processor */
-#define EM_NDR1 57 /* Denso NDR1 microprocesspr */
-#define EM_STARCORE 58 /* Motorola Star*Core processor */
-#define EM_ME16 59 /* Toyota ME16 processor */
-#define EM_ST100 60 /* STMicroelectronics ST100 processor */
-#define EM_TINYJ 61 /* Advanced Logic Corp. TinyJ embedded processor */
-#define EM_X86_64 62 /* Advanced Micro Devices X86-64 processor */
-
-#define EM_PDP10 64 /* Digital Equipment Corp. PDP-10 */
-#define EM_PDP11 65 /* Digital Equipment Corp. PDP-11 */
-#define EM_FX66 66 /* Siemens FX66 microcontroller */
-#define EM_ST9PLUS 67 /* STMicroelectronics ST9+ 8/16 bit microcontroller */
-#define EM_ST7 68 /* STMicroelectronics ST7 8-bit microcontroller */
-#define EM_68HC16 69 /* Motorola MC68HC16 Microcontroller */
-#define EM_68HC11 70 /* Motorola MC68HC11 Microcontroller */
-#define EM_68HC08 71 /* Motorola MC68HC08 Microcontroller */
-#define EM_68HC05 72 /* Motorola MC68HC05 Microcontroller */
-#define EM_SVX 73 /* Silicon Graphics SVx */
-#define EM_ST19 74 /* STMicroelectronics ST19 8-bit cpu */
-#define EM_VAX 75 /* Digital VAX */
-#define EM_CRIS 76 /* Axis Communications 32-bit embedded processor */
-#define EM_JAVELIN 77 /* Infineon Technologies 32-bit embedded cpu */
-#define EM_FIREPATH 78 /* Element 14 64-bit DSP processor */
-#define EM_ZSP 79 /* LSI Logic's 16-bit DSP processor */
-#define EM_MMIX 80 /* Donald Knuth's educational 64-bit processor */
-#define EM_HUANY 81 /* Harvard's machine-independent format */
-#define EM_PRISM 82 /* SiTera Prism */
-#define EM_AVR 83 /* Atmel AVR 8-bit microcontroller */
-#define EM_FR30 84 /* Fujitsu FR30 */
-#define EM_D10V 85 /* Mitsubishi D10V */
-#define EM_D30V 86 /* Mitsubishi D30V */
-#define EM_V850 87 /* NEC v850 */
-#define EM_M32R 88 /* Mitsubishi M32R */
-#define EM_MN10300 89 /* Matsushita MN10300 */
-#define EM_MN10200 90 /* Matsushita MN10200 */
-#define EM_PJ 91 /* picoJava */
-#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 */
+#define EM_NONE 0 /* No machine */
+#define EM_M32 1 /* AT&T WE 32100 */
+#define EM_SPARC 2 /* SUN SPARC */
+#define EM_386 3 /* Intel 80386 */
+#define EM_68K 4 /* Motorola m68k family */
+#define EM_88K 5 /* Motorola m88k family */
+#define EM_486 6 /* Intel 80486 *//* Reserved for future use */
+#define EM_860 7 /* Intel 80860 */
+#define EM_MIPS 8 /* MIPS R3000 (officially, big-endian only) */
+#define EM_S370 9 /* IBM System/370 */
+#define EM_MIPS_RS3_LE 10 /* MIPS R3000 little-endian (Oct 4 1999 Draft) Deprecated */
+
+#define EM_PARISC 15 /* HPPA */
+
+#define EM_VPP550 17 /* Fujitsu VPP500 */
+#define EM_SPARC32PLUS 18 /* Sun's "v8plus" */
+#define EM_960 19 /* Intel 80960 */
+#define EM_PPC 20 /* PowerPC */
+#define EM_PPC64 21 /* 64-bit PowerPC */
+#define EM_S390 22 /* IBM S/390 */
+
+#define EM_V800 36 /* NEC V800 series */
+#define EM_FR20 37 /* Fujitsu FR20 */
+#define EM_RH32 38 /* TRW RH32 */
+#define EM_MCORE 39 /* Motorola M*Core */ /* May also be taken by Fujitsu MMA */
+#define EM_RCE 39 /* Old name for MCore */
+#define EM_ARM 40 /* ARM */
+#define EM_OLD_ALPHA 41 /* Digital Alpha */
+#define EM_SH 42 /* Hitachi SH */
+#define EM_SPARCV9 43 /* SPARC v9 64-bit */
+#define EM_TRICORE 44 /* Siemens Tricore embedded processor */
+#define EM_ARC 45 /* ARC Cores */
+#define EM_H8_300 46 /* Hitachi H8/300 */
+#define EM_H8_300H 47 /* Hitachi H8/300H */
+#define EM_H8S 48 /* Hitachi H8S */
+#define EM_H8_500 49 /* Hitachi H8/500 */
+#define EM_IA_64 50 /* Intel IA-64 Processor */
+#define EM_MIPS_X 51 /* Stanford MIPS-X */
+#define EM_COLDFIRE 52 /* Motorola Coldfire */
+#define EM_68HC12 53 /* Motorola M68HC12 */
+#define EM_MMA 54 /* Fujitsu Multimedia Accelerator */
+#define EM_PCP 55 /* Siemens PCP */
+#define EM_NCPU 56 /* Sony nCPU embedded RISC processor */
+#define EM_NDR1 57 /* Denso NDR1 microprocesspr */
+#define EM_STARCORE 58 /* Motorola Star*Core processor */
+#define EM_ME16 59 /* Toyota ME16 processor */
+#define EM_ST100 60 /* STMicroelectronics ST100 processor */
+#define EM_TINYJ 61 /* Advanced Logic Corp. TinyJ embedded processor */
+#define EM_X86_64 62 /* Advanced Micro Devices X86-64 processor */
+
+#define EM_PDP10 64 /* Digital Equipment Corp. PDP-10 */
+#define EM_PDP11 65 /* Digital Equipment Corp. PDP-11 */
+#define EM_FX66 66 /* Siemens FX66 microcontroller */
+#define EM_ST9PLUS 67 /* STMicroelectronics ST9+ 8/16 bit microcontroller */
+#define EM_ST7 68 /* STMicroelectronics ST7 8-bit microcontroller */
+#define EM_68HC16 69 /* Motorola MC68HC16 Microcontroller */
+#define EM_68HC11 70 /* Motorola MC68HC11 Microcontroller */
+#define EM_68HC08 71 /* Motorola MC68HC08 Microcontroller */
+#define EM_68HC05 72 /* Motorola MC68HC05 Microcontroller */
+#define EM_SVX 73 /* Silicon Graphics SVx */
+#define EM_ST19 74 /* STMicroelectronics ST19 8-bit cpu */
+#define EM_VAX 75 /* Digital VAX */
+#define EM_CRIS 76 /* Axis Communications 32-bit embedded processor */
+#define EM_JAVELIN 77 /* Infineon Technologies 32-bit embedded cpu */
+#define EM_FIREPATH 78 /* Element 14 64-bit DSP processor */
+#define EM_ZSP 79 /* LSI Logic's 16-bit DSP processor */
+#define EM_MMIX 80 /* Donald Knuth's educational 64-bit processor */
+#define EM_HUANY 81 /* Harvard's machine-independent format */
+#define EM_PRISM 82 /* SiTera Prism */
+#define EM_AVR 83 /* Atmel AVR 8-bit microcontroller */
+#define EM_FR30 84 /* Fujitsu FR30 */
+#define EM_D10V 85 /* Mitsubishi D10V */
+#define EM_D30V 86 /* Mitsubishi D30V */
+#define EM_V850 87 /* NEC v850 */
+#define EM_M32R 88 /* Mitsubishi M32R */
+#define EM_MN10300 89 /* Matsushita MN10300 */
+#define EM_MN10200 90 /* Matsushita MN10200 */
+#define EM_PJ 91 /* picoJava */
+#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 */
+#define EM_MSP430 105 /* TI msp430 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
@@ -188,9 +192,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
Normally, each entity or maintainer responsible for a machine with an
unofficial e_machine number should eventually ask registry@caldera.com for
- an officially blessed number to be added to the list above. */
+ an officially blessed number to be added to the list above. */
-#define EM_PJ_OLD 99 /* picoJava */
+#define EM_PJ_OLD 99 /* picoJava */
/* Cygnus PowerPC ELF backend. Written in the absence of an ABI. */
#define EM_CYGNUS_POWERPC 0x9025
@@ -202,11 +206,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Old version of PowerPC, this should be removed shortly. */
#define EM_PPC_OLD 17
-/* (Depreciated) Temporary number for the OpenRISC processor. */
-#define EM_OR32 0x8472
+/* (Deprecated) Temporary number for the OpenRISC processor. */
+#define EM_OR32 0x8472
/* Cygnus M32R ELF backend. Written in the absence of an ABI. */
-#define EM_CYGNUS_M32R 0x9041
+#define EM_CYGNUS_M32R 0x9041
/* Alpha backend magic number. Written in the absence of an ABI. */
#define EM_ALPHA 0x9026
@@ -243,14 +247,20 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
Written in the absense of an ABI. */
#define EM_DLX 0x5aa5
-#define EM_XSTORMY16 0xad45
+#define EM_XSTORMY16 0xad45
/* FRV magic number - no EABI available??. */
#define EM_CYGNUS_FRV 0x5441
/* Ubicom IP2xxx; no ABI */
-#define EM_IP2K_OLD 0x8217
+#define EM_IP2K_OLD 0x8217
+/* MSP430 magic number
+ Written in the absense everything. */
+#define EM_MSP430_OLD 0x1059
+
+/* Vitesse IQ2000. */
+#define EM_IQ2000 0xFEBA
/* See the above comment before you add a new EM_* value here. */
/* Values for e_version. */
@@ -260,7 +270,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Values for program header, p_type field. */
-#define PT_NULL 0 /* Program header table entry unused */
+#define PT_NULL 0 /* Program header table entry unused */
#define PT_LOAD 1 /* Loadable program segment */
#define PT_DYNAMIC 2 /* Dynamic linking information */
#define PT_INTERP 3 /* Program interpreter */
@@ -268,8 +278,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define PT_SHLIB 5 /* Reserved, unspecified semantics */
#define PT_PHDR 6 /* Entry for header table itself */
#define PT_TLS 7 /* Thread local storage segment */
-#define PT_LOOS 0x60000000 /* OS-specific */
-#define PT_HIOS 0x6fffffff /* OS-specific */
+#define PT_LOOS 0x60000000 /* OS-specific */
+#define PT_HIOS 0x6fffffff /* OS-specific */
#define PT_LOPROC 0x70000000 /* Processor-specific */
#define PT_HIPROC 0x7FFFFFFF /* Processor-specific */
@@ -299,14 +309,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define SHT_SHLIB 10 /* Reserved, unspecified semantics */
#define SHT_DYNSYM 11 /* Dynamic linking symbol table */
-#define SHT_INIT_ARRAY 14 /* Array of ptrs to init functions */
-#define SHT_FINI_ARRAY 15 /* Array of ptrs to finish functions */
+#define SHT_INIT_ARRAY 14 /* Array of ptrs to init functions */
+#define SHT_FINI_ARRAY 15 /* Array of ptrs to finish functions */
#define SHT_PREINIT_ARRAY 16 /* Array of ptrs to pre-init funcs */
-#define SHT_GROUP 17 /* Section contains a section group */
+#define SHT_GROUP 17 /* Section contains a section group */
#define SHT_SYMTAB_SHNDX 18 /* Indicies for SHN_XINDEX entries */
-#define SHT_LOOS 0x60000000 /* First of OS specific semantics */
-#define SHT_HIOS 0x6fffffff /* Last of OS specific semantics */
+#define SHT_LOOS 0x60000000 /* First of OS specific semantics */
+#define SHT_HIOS 0x6fffffff /* Last of OS specific semantics */
#define SHT_GNU_LIBLIST 0x6ffffff7 /* List of prelink dependencies */
@@ -335,7 +345,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define SHF_MERGE (1 << 4) /* Data in this section can be merged */
#define SHF_STRINGS (1 << 5) /* Contains null terminated character strings */
#define SHF_INFO_LINK (1 << 6) /* sh_info holds section header table index */
-#define SHF_LINK_ORDER (1 << 7) /* Preserve section ordering when linking */
+#define SHF_LINK_ORDER (1 << 7) /* Preserve section ordering when linking */
#define SHF_OS_NONCONFORMING (1 << 8) /* OS specific processing required */
#define SHF_GROUP (1 << 9) /* Member of a section group */
#define SHF_TLS (1 << 10) /* Thread local storage section */
@@ -350,7 +360,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define NT_FPREGSET 2 /* Contains copy of fpregset struct */
#define NT_PRPSINFO 3 /* Contains copy of prpsinfo struct */
#define NT_TASKSTRUCT 4 /* Contains copy of task struct */
-#define NT_PRXFPREG 0x46e62b7f /* Contains a user_xfpregs_struct; */
+#define NT_PRXFPREG 0x46e62b7f /* Contains a user_xfpregs_struct; */
/* note name must be "LINUX". */
/* Note segments for core files on dir-style procfs systems. */
@@ -423,8 +433,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define STB_LOCAL 0 /* Symbol not visible outside obj */
#define STB_GLOBAL 1 /* Symbol visible outside obj */
#define STB_WEAK 2 /* Like globals, lower precedence */
-#define STB_LOOS 10 /* OS-specific semantics */
-#define STB_HIOS 12 /* OS-specific semantics */
+#define STB_LOOS 10 /* OS-specific semantics */
+#define STB_HIOS 12 /* OS-specific semantics */
#define STB_LOPROC 13 /* Application-specific semantics */
#define STB_HIPROC 15 /* Application-specific semantics */
@@ -435,8 +445,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define STT_FILE 4 /* Symbol gives a file name */
#define STT_COMMON 5 /* An uninitialised common block */
#define STT_TLS 6 /* Thread local data object */
-#define STT_LOOS 10 /* OS-specific semantics */
-#define STT_HIOS 12 /* OS-specific semantics */
+#define STT_LOOS 10 /* OS-specific semantics */
+#define STT_HIOS 12 /* OS-specific semantics */
#define STT_LOPROC 13 /* Application-specific semantics */
#define STT_HIPROC 15 /* Application-specific semantics */
@@ -447,12 +457,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define SHN_LORESERVE 0xFF00 /* Begin range of reserved indices */
#define SHN_LOPROC 0xFF00 /* Begin range of appl-specific */
#define SHN_HIPROC 0xFF1F /* End range of appl-specific */
-#define SHN_LOOS 0xFF20 /* OS specific semantics, lo */
-#define SHN_HIOS 0xFF3F /* OS specific semantics, hi */
-#define SHN_ABS 0xFFF1 /* Associated symbol is absolute */
-#define SHN_COMMON 0xFFF2 /* Associated symbol is in common */
-#define SHN_XINDEX 0xFFFF /* Section index is held elsewhere */
-#define SHN_HIRESERVE 0xFFFF /* End range of reserved indices */
+#define SHN_LOOS 0xFF20 /* OS specific semantics, lo */
+#define SHN_HIOS 0xFF3F /* OS specific semantics, hi */
+#define SHN_ABS 0xFFF1 /* Associated symbol is absolute */
+#define SHN_COMMON 0xFFF2 /* Associated symbol is in common */
+#define SHN_XINDEX 0xFFFF /* Section index is held elsewhere */
+#define SHN_HIRESERVE 0xFFFF /* End range of reserved indices */
#define SHN_BAD ((unsigned) -1) /* Used internally by bfd */
/* The following constants control how a symbol may be accessed once it has
@@ -499,32 +509,31 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define DT_DEBUG 21
#define DT_TEXTREL 22
#define DT_JMPREL 23
-#define DT_BIND_NOW 24
-#define DT_INIT_ARRAY 25
-#define DT_FINI_ARRAY 26
+#define DT_BIND_NOW 24
+#define DT_INIT_ARRAY 25
+#define DT_FINI_ARRAY 26
#define DT_INIT_ARRAYSZ 27
#define DT_FINI_ARRAYSZ 28
-#define DT_RUNPATH 29
-#define DT_FLAGS 30
-
-#define DT_ENCODING 32
+#define DT_RUNPATH 29
+#define DT_FLAGS 30
+#define DT_ENCODING 31
#define DT_PREINIT_ARRAY 32
#define DT_PREINIT_ARRAYSZ 33
/* Note, the Oct 4, 1999 draft of the ELF ABI changed the values
for DT_LOOS and DT_HIOS. Some implementations however, use
- values outside of the new range (see below). */
+ values outside of the new range (see below). */
#define OLD_DT_LOOS 0x60000000
-#define DT_LOOS 0x6000000d
-#define DT_HIOS 0x6fff0000
-#define OLD_DT_HIOS 0x6fffffff
+#define DT_LOOS 0x6000000d
+#define DT_HIOS 0x6fff0000
+#define OLD_DT_HIOS 0x6fffffff
-#define DT_LOPROC 0x70000000
-#define DT_HIPROC 0x7fffffff
+#define DT_LOPROC 0x70000000
+#define DT_HIPROC 0x7fffffff
/* The next four dynamic tags are used on Solaris. We support them
- everywhere. Note these values lie outside of the (new) range for
- OS specific values. This is a deliberate special case and we
+ everywhere. Note these values lie outside of the (new) range for
+ OS specific values. This is a deliberate special case and we
maintain it for backwards compatability. */
#define DT_VALRNGLO 0x6ffffd00
#define DT_GNU_PRELINKED 0x6ffffdf5
@@ -583,7 +592,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
defined here is the same as the one in <sys/link.h> on Solaris 8. */
#define DTF_1_CONFEXP 0x00000002
-/* Flag values used in the DT_POSFLAG_1 .dynamic entry. */
+/* Flag values used in the DT_POSFLAG_1 .dynamic entry. */
#define DF_P1_LAZYLOAD 0x00000001
#define DF_P1_GROUPPERM 0x00000002
@@ -603,7 +612,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define DF_1_NODUMP 0x00001000
#define DF_1_CONLFAT 0x00002000
-/* Flag values for the DT_FLAGS entry. */
+/* Flag values for the DT_FLAGS entry. */
#define DF_ORIGIN (1 << 0)
#define DF_SYMBOLIC (1 << 1)
#define DF_TEXTREL (1 << 2)
@@ -670,7 +679,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define SYMINFO_CURRENT 1
#define SYMINFO_NUM 2
-/* Section Group Flags. */
+/* Section Group Flags. */
#define GRP_COMDAT 0x1 /* A COMDAT group */
diff --git a/include/elf/iq2000.h b/include/elf/iq2000.h
new file mode 100644
index 00000000000..83c690c7091
--- /dev/null
+++ b/include/elf/iq2000.h
@@ -0,0 +1,58 @@
+/* IQ2000 ELF support for BFD.
+ Copyright (C) 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_IQ2000_H
+#define _ELF_IQ2000_H
+
+#include "elf/reloc-macros.h"
+
+/* Relocations. */
+START_RELOC_NUMBERS (elf_iq2000_reloc_type)
+ RELOC_NUMBER (R_IQ2000_NONE, 0)
+ RELOC_NUMBER (R_IQ2000_16, 1)
+ RELOC_NUMBER (R_IQ2000_32, 2)
+ RELOC_NUMBER (R_IQ2000_26, 3)
+ RELOC_NUMBER (R_IQ2000_PC16, 4)
+ RELOC_NUMBER (R_IQ2000_HI16, 5)
+ RELOC_NUMBER (R_IQ2000_LO16, 6)
+ RELOC_NUMBER (R_IQ2000_OFFSET_16, 7)
+ RELOC_NUMBER (R_IQ2000_OFFSET_21, 8)
+ RELOC_NUMBER (R_IQ2000_UHI16, 9)
+ RELOC_NUMBER (R_IQ2000_32_DEBUG, 10)
+ RELOC_NUMBER (R_IQ2000_GNU_VTINHERIT, 200)
+ RELOC_NUMBER (R_IQ2000_GNU_VTENTRY, 201)
+END_RELOC_NUMBERS(R_IQ2000_max)
+
+#define EF_IQ2000_CPU_IQ2000 0x00000001 /* default */
+#define EF_IQ2000_CPU_IQ10 0x00000002 /* IQ10 */
+#define EF_IQ2000_CPU_MASK 0x00000003 /* specific cpu bits */
+#define EF_IQ2000_ALL_FLAGS (EF_IQ2000_CPU_MASK)
+
+/* Define the data & instruction memory discriminator. In a linked
+ executable, an symbol should be deemed to point to an instruction
+ if ((address & IQ2000_INSN_MASK) == IQ2000_INSN_VALUE), and similarly
+ for the data space. */
+
+#define IQ2000_DATA_MASK 0x80000000
+#define IQ2000_DATA_VALUE 0x00000000
+#define IQ2000_INSN_MASK 0x80000000
+#define IQ2000_INSN_VALUE 0x80000000
+
+
+#endif /* _ELF_IQ2000_H */
diff --git a/include/elf/mips.h b/include/elf/mips.h
index 81451ab55cd..44f7cb9292c 100644
--- a/include/elf/mips.h
+++ b/include/elf/mips.h
@@ -99,6 +99,9 @@ END_RELOC_NUMBERS (R_MIPS_maxext)
position independent code. */
#define EF_MIPS_CPIC 0x00000004
+/* ??? Unknown flag, set in IRIX 6's BSDdup2.o in libbsd.a. */
+#define EF_MIPS_XGOT 0x00000008
+
/* Code in file uses UCODE (obsolete) */
#define EF_MIPS_UCODE 0x00000010
@@ -145,6 +148,9 @@ END_RELOC_NUMBERS (R_MIPS_maxext)
/* -mips64 code. */
#define E_MIPS_ARCH_64 0x60000000
+/* -mips32r2 code. */
+#define E_MIPS_ARCH_32R2 0x70000000
+
/* The ABI of the file. Also see EF_MIPS_ABI2 above. */
#define EF_MIPS_ABI 0x0000F000
diff --git a/include/elf/msp430.h b/include/elf/msp430.h
new file mode 100644
index 00000000000..cb3f241dea1
--- /dev/null
+++ b/include/elf/msp430.h
@@ -0,0 +1,55 @@
+/* MSP430 ELF support for BFD.
+ Copyright (C) 2002 Free Software Foundation, Inc.
+ Contributed by Dmitry Diky <diwil@mail.ru>
+
+ 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_MSP430_H
+#define _ELF_MSP430_H
+
+#include "elf/reloc-macros.h"
+
+/* Processor specific flags for the ELF header e_flags field. */
+#define EF_MSP430_MACH 0xff
+
+#define E_MSP430_MACH_MSP430x11x1 110
+#define E_MSP430_MACH_MSP430x11 11
+#define E_MSP430_MACH_MSP430x12 12
+#define E_MSP430_MACH_MSP430x13 13
+#define E_MSP430_MACH_MSP430x14 14
+#define E_MSP430_MACH_MSP430x31 31
+#define E_MSP430_MACH_MSP430x32 32
+#define E_MSP430_MACH_MSP430x33 33
+#define E_MSP430_MACH_MSP430x41 41
+#define E_MSP430_MACH_MSP430x43 43
+#define E_MSP430_MACH_MSP430x44 44
+#define E_MSP430_MACH_MSP430x15 15
+#define E_MSP430_MACH_MSP430x16 16
+
+/* Relocations. */
+START_RELOC_NUMBERS (elf_msp430_reloc_type)
+ RELOC_NUMBER (R_MSP430_NONE, 0)
+ RELOC_NUMBER (R_MSP430_32, 1)
+ RELOC_NUMBER (R_MSP430_10_PCREL, 2)
+ RELOC_NUMBER (R_MSP430_16, 3)
+ RELOC_NUMBER (R_MSP430_16_PCREL, 4)
+ RELOC_NUMBER (R_MSP430_16_BYTE, 5)
+ RELOC_NUMBER (R_MSP430_16_PCREL_BYTE, 6)
+
+END_RELOC_NUMBERS (R_MSP430_max)
+
+#endif /* _ELF_MSP430_H */
diff --git a/include/elf/ppc.h b/include/elf/ppc.h
index dfb43f46a40..21c67437953 100644
--- a/include/elf/ppc.h
+++ b/include/elf/ppc.h
@@ -1,5 +1,6 @@
/* PPC ELF support for BFD.
- Copyright 1995, 1996, 1998, 2000, 2001 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1998, 2000, 2001, 2002, 2003
+ Free Software Foundation, Inc.
By Michael Meissner, Cygnus Support, <meissner@cygnus.com>, from information
in the System V Application Binary Interface, PowerPC Processor Supplement
@@ -31,152 +32,104 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Relocations. */
START_RELOC_NUMBERS (elf_ppc_reloc_type)
- RELOC_NUMBER (R_PPC_NONE, 0)
- RELOC_NUMBER (R_PPC_ADDR32, 1)
- RELOC_NUMBER (R_PPC_ADDR24, 2)
- RELOC_NUMBER (R_PPC_ADDR16, 3)
- RELOC_NUMBER (R_PPC_ADDR16_LO, 4)
- RELOC_NUMBER (R_PPC_ADDR16_HI, 5)
- RELOC_NUMBER (R_PPC_ADDR16_HA, 6)
- RELOC_NUMBER (R_PPC_ADDR14, 7)
- RELOC_NUMBER (R_PPC_ADDR14_BRTAKEN, 8)
- RELOC_NUMBER (R_PPC_ADDR14_BRNTAKEN, 9)
- RELOC_NUMBER (R_PPC_REL24, 10)
- RELOC_NUMBER (R_PPC_REL14, 11)
- RELOC_NUMBER (R_PPC_REL14_BRTAKEN, 12)
- RELOC_NUMBER (R_PPC_REL14_BRNTAKEN, 13)
- RELOC_NUMBER (R_PPC_GOT16, 14)
- RELOC_NUMBER (R_PPC_GOT16_LO, 15)
- RELOC_NUMBER (R_PPC_GOT16_HI, 16)
- RELOC_NUMBER (R_PPC_GOT16_HA, 17)
- RELOC_NUMBER (R_PPC_PLTREL24, 18)
- RELOC_NUMBER (R_PPC_COPY, 19)
- RELOC_NUMBER (R_PPC_GLOB_DAT, 20)
- RELOC_NUMBER (R_PPC_JMP_SLOT, 21)
- RELOC_NUMBER (R_PPC_RELATIVE, 22)
- RELOC_NUMBER (R_PPC_LOCAL24PC, 23)
- RELOC_NUMBER (R_PPC_UADDR32, 24)
- RELOC_NUMBER (R_PPC_UADDR16, 25)
- RELOC_NUMBER (R_PPC_REL32, 26)
- RELOC_NUMBER (R_PPC_PLT32, 27)
- RELOC_NUMBER (R_PPC_PLTREL32, 28)
- RELOC_NUMBER (R_PPC_PLT16_LO, 29)
- RELOC_NUMBER (R_PPC_PLT16_HI, 30)
- RELOC_NUMBER (R_PPC_PLT16_HA, 31)
- RELOC_NUMBER (R_PPC_SDAREL16, 32)
- RELOC_NUMBER (R_PPC_SECTOFF, 33)
- RELOC_NUMBER (R_PPC_SECTOFF_LO, 34)
- RELOC_NUMBER (R_PPC_SECTOFF_HI, 35)
- RELOC_NUMBER (R_PPC_SECTOFF_HA, 36)
- RELOC_NUMBER (R_PPC_ADDR30, 37)
-
-/* The following relocs are from the 64-bit PowerPC ELF ABI. */
- RELOC_NUMBER (R_PPC64_ADDR64, 38)
- RELOC_NUMBER (R_PPC64_ADDR16_HIGHER, 39)
- RELOC_NUMBER (R_PPC64_ADDR16_HIGHERA, 40)
- RELOC_NUMBER (R_PPC64_ADDR16_HIGHEST, 41)
- RELOC_NUMBER (R_PPC64_ADDR16_HIGHESTA, 42)
- RELOC_NUMBER (R_PPC64_UADDR64, 43)
- RELOC_NUMBER (R_PPC64_REL64, 44)
- RELOC_NUMBER (R_PPC64_PLT64, 45)
- RELOC_NUMBER (R_PPC64_PLTREL64, 46)
- RELOC_NUMBER (R_PPC64_TOC16, 47)
- RELOC_NUMBER (R_PPC64_TOC16_LO, 48)
- RELOC_NUMBER (R_PPC64_TOC16_HI, 49)
- RELOC_NUMBER (R_PPC64_TOC16_HA, 50)
- RELOC_NUMBER (R_PPC64_TOC, 51)
- RELOC_NUMBER (R_PPC64_PLTGOT16, 52)
- RELOC_NUMBER (R_PPC64_PLTGOT16_LO, 53)
- RELOC_NUMBER (R_PPC64_PLTGOT16_HI, 54)
- RELOC_NUMBER (R_PPC64_PLTGOT16_HA, 55)
-
-/* The following relocs were added in the 64-bit PowerPC ELF ABI revision 1.2. */
- RELOC_NUMBER (R_PPC64_ADDR16_DS, 56)
- RELOC_NUMBER (R_PPC64_ADDR16_LO_DS, 57)
- RELOC_NUMBER (R_PPC64_GOT16_DS, 58)
- RELOC_NUMBER (R_PPC64_GOT16_LO_DS, 59)
- RELOC_NUMBER (R_PPC64_PLT16_LO_DS, 60)
- RELOC_NUMBER (R_PPC64_SECTOFF_DS, 61)
- RELOC_NUMBER (R_PPC64_SECTOFF_LO_DS, 62)
- RELOC_NUMBER (R_PPC64_TOC16_DS, 63)
- RELOC_NUMBER (R_PPC64_TOC16_LO_DS, 64)
- RELOC_NUMBER (R_PPC64_PLTGOT16_DS, 65)
- RELOC_NUMBER (R_PPC64_PLTGOT16_LO_DS, 66)
+ RELOC_NUMBER (R_PPC_NONE, 0)
+ RELOC_NUMBER (R_PPC_ADDR32, 1)
+ RELOC_NUMBER (R_PPC_ADDR24, 2)
+ RELOC_NUMBER (R_PPC_ADDR16, 3)
+ RELOC_NUMBER (R_PPC_ADDR16_LO, 4)
+ RELOC_NUMBER (R_PPC_ADDR16_HI, 5)
+ RELOC_NUMBER (R_PPC_ADDR16_HA, 6)
+ RELOC_NUMBER (R_PPC_ADDR14, 7)
+ RELOC_NUMBER (R_PPC_ADDR14_BRTAKEN, 8)
+ RELOC_NUMBER (R_PPC_ADDR14_BRNTAKEN, 9)
+ RELOC_NUMBER (R_PPC_REL24, 10)
+ RELOC_NUMBER (R_PPC_REL14, 11)
+ RELOC_NUMBER (R_PPC_REL14_BRTAKEN, 12)
+ RELOC_NUMBER (R_PPC_REL14_BRNTAKEN, 13)
+ RELOC_NUMBER (R_PPC_GOT16, 14)
+ RELOC_NUMBER (R_PPC_GOT16_LO, 15)
+ RELOC_NUMBER (R_PPC_GOT16_HI, 16)
+ RELOC_NUMBER (R_PPC_GOT16_HA, 17)
+ RELOC_NUMBER (R_PPC_PLTREL24, 18)
+ RELOC_NUMBER (R_PPC_COPY, 19)
+ RELOC_NUMBER (R_PPC_GLOB_DAT, 20)
+ RELOC_NUMBER (R_PPC_JMP_SLOT, 21)
+ RELOC_NUMBER (R_PPC_RELATIVE, 22)
+ RELOC_NUMBER (R_PPC_LOCAL24PC, 23)
+ RELOC_NUMBER (R_PPC_UADDR32, 24)
+ RELOC_NUMBER (R_PPC_UADDR16, 25)
+ RELOC_NUMBER (R_PPC_REL32, 26)
+ RELOC_NUMBER (R_PPC_PLT32, 27)
+ RELOC_NUMBER (R_PPC_PLTREL32, 28)
+ RELOC_NUMBER (R_PPC_PLT16_LO, 29)
+ RELOC_NUMBER (R_PPC_PLT16_HI, 30)
+ RELOC_NUMBER (R_PPC_PLT16_HA, 31)
+ RELOC_NUMBER (R_PPC_SDAREL16, 32)
+ RELOC_NUMBER (R_PPC_SECTOFF, 33)
+ RELOC_NUMBER (R_PPC_SECTOFF_LO, 34)
+ RELOC_NUMBER (R_PPC_SECTOFF_HI, 35)
+ RELOC_NUMBER (R_PPC_SECTOFF_HA, 36)
+ RELOC_NUMBER (R_PPC_ADDR30, 37)
+
+ /* Relocs added to support TLS. */
+ RELOC_NUMBER (R_PPC_TLS, 67)
+ RELOC_NUMBER (R_PPC_DTPMOD64, 68)
+ RELOC_NUMBER (R_PPC_TPREL16, 69)
+ RELOC_NUMBER (R_PPC_TPREL16_LO, 70)
+ RELOC_NUMBER (R_PPC_TPREL16_HI, 71)
+ RELOC_NUMBER (R_PPC_TPREL16_HA, 72)
+ RELOC_NUMBER (R_PPC_TPREL64, 73)
+ RELOC_NUMBER (R_PPC_DTPREL16, 74)
+ RELOC_NUMBER (R_PPC_DTPREL16_LO, 75)
+ RELOC_NUMBER (R_PPC_DTPREL16_HI, 76)
+ RELOC_NUMBER (R_PPC_DTPREL16_HA, 77)
+ RELOC_NUMBER (R_PPC_DTPREL64, 78)
+ RELOC_NUMBER (R_PPC_GOT_TLSGD16, 79)
+ RELOC_NUMBER (R_PPC_GOT_TLSGD16_LO, 80)
+ RELOC_NUMBER (R_PPC_GOT_TLSGD16_HI, 81)
+ RELOC_NUMBER (R_PPC_GOT_TLSGD16_HA, 82)
+ RELOC_NUMBER (R_PPC_GOT_TLSLD16, 83)
+ RELOC_NUMBER (R_PPC_GOT_TLSLD16_LO, 84)
+ RELOC_NUMBER (R_PPC_GOT_TLSLD16_HI, 85)
+ RELOC_NUMBER (R_PPC_GOT_TLSLD16_HA, 86)
+ RELOC_NUMBER (R_PPC_GOT_TPREL16, 87)
+ RELOC_NUMBER (R_PPC_GOT_TPREL16_LO, 88)
+ RELOC_NUMBER (R_PPC_GOT_TPREL16_HI, 89)
+ RELOC_NUMBER (R_PPC_GOT_TPREL16_HA, 90)
+ RELOC_NUMBER (R_PPC_GOT_DTPREL16, 91)
+ RELOC_NUMBER (R_PPC_GOT_DTPREL16_LO, 92)
+ RELOC_NUMBER (R_PPC_GOT_DTPREL16_HI, 93)
+ RELOC_NUMBER (R_PPC_GOT_DTPREL16_HA, 94)
/* The remaining relocs are from the Embedded ELF ABI, and are not
in the SVR4 ELF ABI. */
- RELOC_NUMBER (R_PPC_EMB_NADDR32, 101)
- RELOC_NUMBER (R_PPC_EMB_NADDR16, 102)
- RELOC_NUMBER (R_PPC_EMB_NADDR16_LO, 103)
- RELOC_NUMBER (R_PPC_EMB_NADDR16_HI, 104)
- RELOC_NUMBER (R_PPC_EMB_NADDR16_HA, 105)
- RELOC_NUMBER (R_PPC_EMB_SDAI16, 106)
- RELOC_NUMBER (R_PPC_EMB_SDA2I16, 107)
- RELOC_NUMBER (R_PPC_EMB_SDA2REL, 108)
- RELOC_NUMBER (R_PPC_EMB_SDA21, 109)
- RELOC_NUMBER (R_PPC_EMB_MRKREF, 110)
- RELOC_NUMBER (R_PPC_EMB_RELSEC16, 111)
- RELOC_NUMBER (R_PPC_EMB_RELST_LO, 112)
- RELOC_NUMBER (R_PPC_EMB_RELST_HI, 113)
- RELOC_NUMBER (R_PPC_EMB_RELST_HA, 114)
- RELOC_NUMBER (R_PPC_EMB_BIT_FLD, 115)
- RELOC_NUMBER (R_PPC_EMB_RELSDA, 116)
+ RELOC_NUMBER (R_PPC_EMB_NADDR32, 101)
+ RELOC_NUMBER (R_PPC_EMB_NADDR16, 102)
+ RELOC_NUMBER (R_PPC_EMB_NADDR16_LO, 103)
+ RELOC_NUMBER (R_PPC_EMB_NADDR16_HI, 104)
+ RELOC_NUMBER (R_PPC_EMB_NADDR16_HA, 105)
+ RELOC_NUMBER (R_PPC_EMB_SDAI16, 106)
+ RELOC_NUMBER (R_PPC_EMB_SDA2I16, 107)
+ RELOC_NUMBER (R_PPC_EMB_SDA2REL, 108)
+ RELOC_NUMBER (R_PPC_EMB_SDA21, 109)
+ RELOC_NUMBER (R_PPC_EMB_MRKREF, 110)
+ RELOC_NUMBER (R_PPC_EMB_RELSEC16, 111)
+ RELOC_NUMBER (R_PPC_EMB_RELST_LO, 112)
+ RELOC_NUMBER (R_PPC_EMB_RELST_HI, 113)
+ RELOC_NUMBER (R_PPC_EMB_RELST_HA, 114)
+ RELOC_NUMBER (R_PPC_EMB_BIT_FLD, 115)
+ RELOC_NUMBER (R_PPC_EMB_RELSDA, 116)
/* These are GNU extensions to enable C++ vtable garbage collection. */
- RELOC_NUMBER (R_PPC_GNU_VTINHERIT, 253)
- RELOC_NUMBER (R_PPC_GNU_VTENTRY, 254)
+ RELOC_NUMBER (R_PPC_GNU_VTINHERIT, 253)
+ RELOC_NUMBER (R_PPC_GNU_VTENTRY, 254)
/* This is a phony reloc to handle any old fashioned TOC16 references
that may still be in object files. */
- RELOC_NUMBER (R_PPC_TOC16, 255)
+ RELOC_NUMBER (R_PPC_TOC16, 255)
END_RELOC_NUMBERS (R_PPC_max)
-/* Aliases for R_PPC64-relocs. */
-#define R_PPC64_NONE R_PPC_NONE
-#define R_PPC64_ADDR32 R_PPC_ADDR32
-#define R_PPC64_ADDR24 R_PPC_ADDR24
-#define R_PPC64_ADDR16 R_PPC_ADDR16
-#define R_PPC64_ADDR16_LO R_PPC_ADDR16_LO
-#define R_PPC64_ADDR16_HI R_PPC_ADDR16_HI
-#define R_PPC64_ADDR16_HA R_PPC_ADDR16_HA
-#define R_PPC64_ADDR14 R_PPC_ADDR14
-#define R_PPC64_ADDR14_BRTAKEN R_PPC_ADDR14_BRTAKEN
-#define R_PPC64_ADDR14_BRNTAKEN R_PPC_ADDR14_BRNTAKEN
-#define R_PPC64_REL24 R_PPC_REL24
-#define R_PPC64_REL14 R_PPC_REL14
-#define R_PPC64_REL14_BRTAKEN R_PPC_REL14_BRTAKEN
-#define R_PPC64_REL14_BRNTAKEN R_PPC_REL14_BRNTAKEN
-#define R_PPC64_GOT16 R_PPC_GOT16
-#define R_PPC64_GOT16_LO R_PPC_GOT16_LO
-#define R_PPC64_GOT16_HI R_PPC_GOT16_HI
-#define R_PPC64_GOT16_HA R_PPC_GOT16_HA
-#define R_PPC64_COPY R_PPC_COPY
-#define R_PPC64_GLOB_DAT R_PPC_GLOB_DAT
-#define R_PPC64_JMP_SLOT R_PPC_JMP_SLOT
-#define R_PPC64_RELATIVE R_PPC_RELATIVE
-#define R_PPC64_UADDR32 R_PPC_UADDR32
-#define R_PPC64_UADDR16 R_PPC_UADDR16
-#define R_PPC64_REL32 R_PPC_REL32
-#define R_PPC64_PLT32 R_PPC_PLT32
-#define R_PPC64_PLTREL32 R_PPC_PLTREL32
-#define R_PPC64_PLT16_LO R_PPC_PLT16_LO
-#define R_PPC64_PLT16_HI R_PPC_PLT16_HI
-#define R_PPC64_PLT16_HA R_PPC_PLT16_HA
-#define R_PPC64_SECTOFF R_PPC_SECTOFF
-#define R_PPC64_SECTOFF_LO R_PPC_SECTOFF_LO
-#define R_PPC64_SECTOFF_HI R_PPC_SECTOFF_HI
-#define R_PPC64_SECTOFF_HA R_PPC_SECTOFF_HA
-#define R_PPC64_ADDR30 R_PPC_ADDR30
-#define R_PPC64_GNU_VTINHERIT R_PPC_GNU_VTINHERIT
-#define R_PPC64_GNU_VTENTRY R_PPC_GNU_VTENTRY
-
-/* Specify the start of the .glink section. */
-#define DT_PPC64_GLINK DT_LOPROC
-
-/* Specify the start and size of the .opd section. */
-#define DT_PPC64_OPD (DT_LOPROC + 1)
-#define DT_PPC64_OPDSZ (DT_LOPROC + 2)
/* Processor specific flags for the ELF header e_flags field. */
diff --git a/include/elf/ppc64.h b/include/elf/ppc64.h
new file mode 100644
index 00000000000..8b801871714
--- /dev/null
+++ b/include/elf/ppc64.h
@@ -0,0 +1,156 @@
+/* PPC64 ELF support for BFD.
+ Copyright 2003 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_PPC64_H
+#define _ELF_PPC64_H
+
+#include "elf/reloc-macros.h"
+
+/* Relocations. */
+START_RELOC_NUMBERS (elf_ppc64_reloc_type)
+ RELOC_NUMBER (R_PPC64_NONE, 0)
+ RELOC_NUMBER (R_PPC64_ADDR32, 1)
+ RELOC_NUMBER (R_PPC64_ADDR24, 2)
+ RELOC_NUMBER (R_PPC64_ADDR16, 3)
+ RELOC_NUMBER (R_PPC64_ADDR16_LO, 4)
+ RELOC_NUMBER (R_PPC64_ADDR16_HI, 5)
+ RELOC_NUMBER (R_PPC64_ADDR16_HA, 6)
+ RELOC_NUMBER (R_PPC64_ADDR14, 7)
+ RELOC_NUMBER (R_PPC64_ADDR14_BRTAKEN, 8)
+ RELOC_NUMBER (R_PPC64_ADDR14_BRNTAKEN, 9)
+ RELOC_NUMBER (R_PPC64_REL24, 10)
+ RELOC_NUMBER (R_PPC64_REL14, 11)
+ RELOC_NUMBER (R_PPC64_REL14_BRTAKEN, 12)
+ RELOC_NUMBER (R_PPC64_REL14_BRNTAKEN, 13)
+ RELOC_NUMBER (R_PPC64_GOT16, 14)
+ RELOC_NUMBER (R_PPC64_GOT16_LO, 15)
+ RELOC_NUMBER (R_PPC64_GOT16_HI, 16)
+ RELOC_NUMBER (R_PPC64_GOT16_HA, 17)
+ /* 18 unused. 32-bit reloc is R_PPC_PLTREL24. */
+ RELOC_NUMBER (R_PPC64_COPY, 19)
+ RELOC_NUMBER (R_PPC64_GLOB_DAT, 20)
+ RELOC_NUMBER (R_PPC64_JMP_SLOT, 21)
+ RELOC_NUMBER (R_PPC64_RELATIVE, 22)
+ /* 23 unused. 32-bit reloc is R_PPC_LOCAL24PC. */
+ RELOC_NUMBER (R_PPC64_UADDR32, 24)
+ RELOC_NUMBER (R_PPC64_UADDR16, 25)
+ RELOC_NUMBER (R_PPC64_REL32, 26)
+ RELOC_NUMBER (R_PPC64_PLT32, 27)
+ RELOC_NUMBER (R_PPC64_PLTREL32, 28)
+ RELOC_NUMBER (R_PPC64_PLT16_LO, 29)
+ RELOC_NUMBER (R_PPC64_PLT16_HI, 30)
+ RELOC_NUMBER (R_PPC64_PLT16_HA, 31)
+ /* 32 unused. 32-bit reloc is R_PPC_SDAREL16. */
+ RELOC_NUMBER (R_PPC64_SECTOFF, 33)
+ RELOC_NUMBER (R_PPC64_SECTOFF_LO, 34)
+ RELOC_NUMBER (R_PPC64_SECTOFF_HI, 35)
+ RELOC_NUMBER (R_PPC64_SECTOFF_HA, 36)
+ RELOC_NUMBER (R_PPC64_REL30, 37)
+ RELOC_NUMBER (R_PPC64_ADDR64, 38)
+ RELOC_NUMBER (R_PPC64_ADDR16_HIGHER, 39)
+ RELOC_NUMBER (R_PPC64_ADDR16_HIGHERA, 40)
+ RELOC_NUMBER (R_PPC64_ADDR16_HIGHEST, 41)
+ RELOC_NUMBER (R_PPC64_ADDR16_HIGHESTA, 42)
+ RELOC_NUMBER (R_PPC64_UADDR64, 43)
+ RELOC_NUMBER (R_PPC64_REL64, 44)
+ RELOC_NUMBER (R_PPC64_PLT64, 45)
+ RELOC_NUMBER (R_PPC64_PLTREL64, 46)
+ RELOC_NUMBER (R_PPC64_TOC16, 47)
+ RELOC_NUMBER (R_PPC64_TOC16_LO, 48)
+ RELOC_NUMBER (R_PPC64_TOC16_HI, 49)
+ RELOC_NUMBER (R_PPC64_TOC16_HA, 50)
+ RELOC_NUMBER (R_PPC64_TOC, 51)
+ RELOC_NUMBER (R_PPC64_PLTGOT16, 52)
+ RELOC_NUMBER (R_PPC64_PLTGOT16_LO, 53)
+ RELOC_NUMBER (R_PPC64_PLTGOT16_HI, 54)
+ RELOC_NUMBER (R_PPC64_PLTGOT16_HA, 55)
+
+ /* The following relocs were added in the 64-bit PowerPC ELF ABI
+ revision 1.2. */
+ RELOC_NUMBER (R_PPC64_ADDR16_DS, 56)
+ RELOC_NUMBER (R_PPC64_ADDR16_LO_DS, 57)
+ RELOC_NUMBER (R_PPC64_GOT16_DS, 58)
+ RELOC_NUMBER (R_PPC64_GOT16_LO_DS, 59)
+ RELOC_NUMBER (R_PPC64_PLT16_LO_DS, 60)
+ RELOC_NUMBER (R_PPC64_SECTOFF_DS, 61)
+ RELOC_NUMBER (R_PPC64_SECTOFF_LO_DS, 62)
+ RELOC_NUMBER (R_PPC64_TOC16_DS, 63)
+ RELOC_NUMBER (R_PPC64_TOC16_LO_DS, 64)
+ RELOC_NUMBER (R_PPC64_PLTGOT16_DS, 65)
+ RELOC_NUMBER (R_PPC64_PLTGOT16_LO_DS, 66)
+
+ /* Relocs added to support TLS. PowerPC64 ELF ABI revision 1.5. */
+ RELOC_NUMBER (R_PPC64_TLS, 67)
+ RELOC_NUMBER (R_PPC64_DTPMOD64, 68)
+ RELOC_NUMBER (R_PPC64_TPREL16, 69)
+ RELOC_NUMBER (R_PPC64_TPREL16_LO, 70)
+ RELOC_NUMBER (R_PPC64_TPREL16_HI, 71)
+ RELOC_NUMBER (R_PPC64_TPREL16_HA, 72)
+ RELOC_NUMBER (R_PPC64_TPREL64, 73)
+ RELOC_NUMBER (R_PPC64_DTPREL16, 74)
+ RELOC_NUMBER (R_PPC64_DTPREL16_LO, 75)
+ RELOC_NUMBER (R_PPC64_DTPREL16_HI, 76)
+ RELOC_NUMBER (R_PPC64_DTPREL16_HA, 77)
+ RELOC_NUMBER (R_PPC64_DTPREL64, 78)
+ RELOC_NUMBER (R_PPC64_GOT_TLSGD16, 79)
+ RELOC_NUMBER (R_PPC64_GOT_TLSGD16_LO, 80)
+ RELOC_NUMBER (R_PPC64_GOT_TLSGD16_HI, 81)
+ RELOC_NUMBER (R_PPC64_GOT_TLSGD16_HA, 82)
+ RELOC_NUMBER (R_PPC64_GOT_TLSLD16, 83)
+ RELOC_NUMBER (R_PPC64_GOT_TLSLD16_LO, 84)
+ RELOC_NUMBER (R_PPC64_GOT_TLSLD16_HI, 85)
+ RELOC_NUMBER (R_PPC64_GOT_TLSLD16_HA, 86)
+ RELOC_NUMBER (R_PPC64_GOT_TPREL16_DS, 87)
+ RELOC_NUMBER (R_PPC64_GOT_TPREL16_LO_DS, 88)
+ RELOC_NUMBER (R_PPC64_GOT_TPREL16_HI, 89)
+ RELOC_NUMBER (R_PPC64_GOT_TPREL16_HA, 90)
+ RELOC_NUMBER (R_PPC64_GOT_DTPREL16_DS, 91)
+ RELOC_NUMBER (R_PPC64_GOT_DTPREL16_LO_DS, 92)
+ RELOC_NUMBER (R_PPC64_GOT_DTPREL16_HI, 93)
+ RELOC_NUMBER (R_PPC64_GOT_DTPREL16_HA, 94)
+ RELOC_NUMBER (R_PPC64_TPREL16_DS, 95)
+ RELOC_NUMBER (R_PPC64_TPREL16_LO_DS, 96)
+ RELOC_NUMBER (R_PPC64_TPREL16_HIGHER, 97)
+ RELOC_NUMBER (R_PPC64_TPREL16_HIGHERA, 98)
+ RELOC_NUMBER (R_PPC64_TPREL16_HIGHEST, 99)
+ RELOC_NUMBER (R_PPC64_TPREL16_HIGHESTA, 100)
+ RELOC_NUMBER (R_PPC64_DTPREL16_DS, 101)
+ RELOC_NUMBER (R_PPC64_DTPREL16_LO_DS, 102)
+ RELOC_NUMBER (R_PPC64_DTPREL16_HIGHER, 103)
+ RELOC_NUMBER (R_PPC64_DTPREL16_HIGHERA, 104)
+ RELOC_NUMBER (R_PPC64_DTPREL16_HIGHEST, 105)
+ RELOC_NUMBER (R_PPC64_DTPREL16_HIGHESTA, 106)
+
+ /* These are GNU extensions to enable C++ vtable garbage collection. */
+ RELOC_NUMBER (R_PPC64_GNU_VTINHERIT, 253)
+ RELOC_NUMBER (R_PPC64_GNU_VTENTRY, 254)
+
+END_RELOC_NUMBERS (R_PPC64_max)
+
+#define IS_TLS_RELOC(R) \
+ ((R) >= R_PPC64_TLS && (R) <= R_PPC64_DTPREL16_HIGHESTA)
+
+/* Specify the start of the .glink section. */
+#define DT_PPC64_GLINK DT_LOPROC
+
+/* Specify the start and size of the .opd section. */
+#define DT_PPC64_OPD (DT_LOPROC + 1)
+#define DT_PPC64_OPDSZ (DT_LOPROC + 2)
+
+#endif /* _ELF_PPC64_H */
diff --git a/include/elf/s390.h b/include/elf/s390.h
index 8b67c967a9a..6a21c3b6fe2 100644
--- a/include/elf/s390.h
+++ b/include/elf/s390.h
@@ -49,7 +49,7 @@ START_RELOC_NUMBERS (elf_s390_reloc_type)
RELOC_NUMBER (R_390_GLOB_DAT, 10) /* Create GOT entry. */
RELOC_NUMBER (R_390_JMP_SLOT, 11) /* Create PLT entry. */
RELOC_NUMBER (R_390_RELATIVE, 12) /* Adjust by program base. */
- RELOC_NUMBER (R_390_GOTOFF, 13) /* 32 bit offset to GOT. */
+ RELOC_NUMBER (R_390_GOTOFF32, 13) /* 32 bit offset to GOT. */
RELOC_NUMBER (R_390_GOTPC, 14) /* 32 bit PC relative offset to GOT. */
RELOC_NUMBER (R_390_GOT16, 15) /* 16 bit GOT offset. */
RELOC_NUMBER (R_390_PC16, 16) /* PC relative 16 bit. */
@@ -63,6 +63,53 @@ START_RELOC_NUMBERS (elf_s390_reloc_type)
RELOC_NUMBER (R_390_GOT64, 24) /* 64 bit GOT offset. */
RELOC_NUMBER (R_390_PLT64, 25) /* 64 bit PC relative PLT address. */
RELOC_NUMBER (R_390_GOTENT, 26) /* 32 bit PC rel. to GOT entry >> 1. */
+ RELOC_NUMBER (R_390_GOTOFF16, 27) /* 16 bit offset to GOT. */
+ RELOC_NUMBER (R_390_GOTOFF64, 28) /* 64 bit offset to GOT. */
+ RELOC_NUMBER (R_390_GOTPLT12, 29) /* 12 bit offset to jump slot. */
+ RELOC_NUMBER (R_390_GOTPLT16, 30) /* 16 bit offset to jump slot. */
+ RELOC_NUMBER (R_390_GOTPLT32, 31) /* 32 bit offset to jump slot. */
+ RELOC_NUMBER (R_390_GOTPLT64, 32) /* 64 bit offset to jump slot. */
+ RELOC_NUMBER (R_390_GOTPLTENT, 33) /* 32 bit rel. offset to jump slot. */
+ RELOC_NUMBER (R_390_PLTOFF16, 34) /* 16 bit offset from GOT to PLT. */
+ RELOC_NUMBER (R_390_PLTOFF32, 35) /* 32 bit offset from GOT to PLT. */
+ RELOC_NUMBER (R_390_PLTOFF64, 36) /* 16 bit offset from GOT to PLT. */
+ RELOC_NUMBER (R_390_TLS_LOAD, 37) /* Tag for load insn in TLS code. */
+ RELOC_NUMBER (R_390_TLS_GDCALL, 38) /* Tag for function call in general
+ dynamic TLS code. */
+ RELOC_NUMBER (R_390_TLS_LDCALL, 39) /* Tag for function call in local
+ dynamic TLS code. */
+ RELOC_NUMBER (R_390_TLS_GD32, 40) /* Direct 32 bit for general dynamic
+ thread local data. */
+ RELOC_NUMBER (R_390_TLS_GD64, 41) /* Direct 64 bit for general dynamic
+ thread local data. */
+ RELOC_NUMBER (R_390_TLS_GOTIE12, 42)/* 12 bit GOT offset for static TLS
+ block offset. */
+ RELOC_NUMBER (R_390_TLS_GOTIE32, 43)/* 32 bit GOT offset for static TLS
+ block offset. */
+ RELOC_NUMBER (R_390_TLS_GOTIE64, 44)/* 64 bit GOT offset for static TLS
+ block offset. */
+ RELOC_NUMBER (R_390_TLS_LDM32, 45) /* Direct 32 bit for local dynamic
+ thread local data in LD code. */
+ RELOC_NUMBER (R_390_TLS_LDM64, 46) /* Direct 64 bit for local dynamic
+ thread local data in LD code. */
+ RELOC_NUMBER (R_390_TLS_IE32, 47) /* 32 bit address of GOT entry for
+ negated static TLS block offset. */
+ RELOC_NUMBER (R_390_TLS_IE64, 48) /* 64 bit address of GOT entry for
+ negated static TLS block offset. */
+ RELOC_NUMBER (R_390_TLS_IEENT, 49) /* 32 bit rel. offset to GOT entry for
+ negated static TLS block offset. */
+ RELOC_NUMBER (R_390_TLS_LE32, 50) /* 32 bit negated offset relative to
+ static TLS block. */
+ RELOC_NUMBER (R_390_TLS_LE64, 51) /* 64 bit negated offset relative to
+ static TLS block. */
+ RELOC_NUMBER (R_390_TLS_LDO32, 52) /* 32 bit offset relative to TLS
+ block. */
+ RELOC_NUMBER (R_390_TLS_LDO64, 53) /* 64 bit offset relative to TLS
+ block. */
+ RELOC_NUMBER (R_390_TLS_DTPMOD, 54) /* ID of module containing symbol. */
+ RELOC_NUMBER (R_390_TLS_DTPOFF, 55) /* Offset in TLS block. */
+ RELOC_NUMBER (R_390_TLS_TPOFF, 56) /* Negate offset in static TLS
+ block. */
/* These are GNU extensions to enable C++ vtable garbage collection. */
RELOC_NUMBER (R_390_GNU_VTINHERIT, 250)
RELOC_NUMBER (R_390_GNU_VTENTRY, 251)
diff --git a/include/elf/sh.h b/include/elf/sh.h
index 68a2c542e66..41bf0bf6967 100644
--- a/include/elf/sh.h
+++ b/include/elf/sh.h
@@ -1,5 +1,5 @@
/* SH ELF support for BFD.
- Copyright 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1998, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -33,6 +33,7 @@
#define EF_SH_HAS_FP(flags) ((flags) & 8)
#define EF_SH3E 8
#define EF_SH4 9
+#define EF_SH2E 11
/* This one can only mix in objects from other EF_SH5 objects. */
#define EF_SH5 10
@@ -45,6 +46,13 @@
: (((mach1) < EF_SH3 && (mach2) == EF_SH_UNKNOWN) \
|| ((mach2) < EF_SH3 && (mach1) == EF_SH_UNKNOWN)) \
? EF_SH3 \
+ : ((mach1) == EF_SH2E && EF_SH_HAS_FP (mach2)) \
+ ? (mach2) \
+ : ((mach2) == EF_SH2E && EF_SH_HAS_FP (mach1)) \
+ ? (mach1) \
+ : (((mach1) == EF_SH2E && (mach2) == EF_SH_UNKNOWN) \
+ || ((mach2) == EF_SH2E && (mach1) == EF_SH_UNKNOWN)) \
+ ? EF_SH2E \
: (((mach1) == EF_SH3E && (mach2) == EF_SH_UNKNOWN) \
|| ((mach2) == EF_SH3E && (mach1) == EF_SH_UNKNOWN)) \
? EF_SH4 \
@@ -71,61 +79,6 @@
symbols). */
#define STT_DATALABEL STT_LOPROC
-#define SH64_CRANGES_SECTION_NAME ".cranges"
-enum sh64_elf_cr_type {
- CRT_NONE = 0,
- CRT_DATA = 1,
- CRT_SH5_ISA16 = 2,
- CRT_SH5_ISA32 = 3
-};
-
-/* The official definition is this:
-
- typedef struct {
- Elf32_Addr cr_addr;
- Elf32_Word cr_size;
- Elf32_Half cr_type;
- } Elf32_CRange;
-
- but we have no use for that exact type. Instead we use this struct for
- the internal representation. */
-typedef struct {
- bfd_vma cr_addr;
- bfd_size_type cr_size;
- enum sh64_elf_cr_type cr_type;
-} sh64_elf_crange;
-
-#define SH64_CRANGE_SIZE (4 + 4 + 2)
-#define SH64_CRANGE_CR_ADDR_OFFSET 0
-#define SH64_CRANGE_CR_SIZE_OFFSET 4
-#define SH64_CRANGE_CR_TYPE_OFFSET (4 + 4)
-
-/* Get the contents type of an arbitrary address, or return CRT_NONE. */
-extern enum sh64_elf_cr_type sh64_get_contents_type
- PARAMS ((asection *, bfd_vma, sh64_elf_crange *));
-
-/* Simpler interface.
- FIXME: This seems redundant now that we export the interface above. */
-extern bfd_boolean sh64_address_is_shmedia PARAMS ((asection *, bfd_vma));
-
-extern int _bfd_sh64_crange_qsort_cmpb PARAMS ((const void *, const void *));
-extern int _bfd_sh64_crange_qsort_cmpl PARAMS ((const void *, const void *));
-extern int _bfd_sh64_crange_bsearch_cmpb PARAMS ((const void *, const void *));
-extern int _bfd_sh64_crange_bsearch_cmpl PARAMS ((const void *, const void *));
-
-/* We put this in elf_section_data (section)->tdata. */
-struct sh64_section_data
-{
- flagword contents_flags;
-
- /* Only used in the cranges section, but we don't have an official
- backend-specific bfd field. */
- bfd_size_type cranges_growth;
-};
-
-#define sh64_elf_section_data(sec) \
- ((struct sh64_section_data *) ((elf_section_data (sec))->tdata))
-
#include "elf/reloc-macros.h"
/* Relocations. */
diff --git a/include/elf/sparc.h b/include/elf/sparc.h
index 7c780f7c3b9..2d28d26f9b4 100644
--- a/include/elf/sparc.h
+++ b/include/elf/sparc.h
@@ -1,5 +1,5 @@
/* SPARC ELF support for BFD.
- Copyright 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
By Doug Evans, Cygnus Support, <dje@cygnus.com>.
This file is part of BFD, the Binary File Descriptor library.
@@ -126,13 +126,36 @@ START_RELOC_NUMBERS (elf_sparc_reloc_type)
RELOC_NUMBER (R_SPARC_UA64, 54)
RELOC_NUMBER (R_SPARC_UA16, 55)
- /* little endian data relocs */
- RELOC_NUMBER (R_SPARC_REV32, 56)
-
+ RELOC_NUMBER (R_SPARC_TLS_GD_HI22, 56)
+ RELOC_NUMBER (R_SPARC_TLS_GD_LO10, 57)
+ RELOC_NUMBER (R_SPARC_TLS_GD_ADD, 58)
+ RELOC_NUMBER (R_SPARC_TLS_GD_CALL, 59)
+ RELOC_NUMBER (R_SPARC_TLS_LDM_HI22, 60)
+ RELOC_NUMBER (R_SPARC_TLS_LDM_LO10, 61)
+ RELOC_NUMBER (R_SPARC_TLS_LDM_ADD, 62)
+ RELOC_NUMBER (R_SPARC_TLS_LDM_CALL, 63)
+ RELOC_NUMBER (R_SPARC_TLS_LDO_HIX22, 64)
+ RELOC_NUMBER (R_SPARC_TLS_LDO_LOX10, 65)
+ RELOC_NUMBER (R_SPARC_TLS_LDO_ADD, 66)
+ RELOC_NUMBER (R_SPARC_TLS_IE_HI22, 67)
+ RELOC_NUMBER (R_SPARC_TLS_IE_LO10, 68)
+ RELOC_NUMBER (R_SPARC_TLS_IE_LD, 69)
+ RELOC_NUMBER (R_SPARC_TLS_IE_LDX, 70)
+ RELOC_NUMBER (R_SPARC_TLS_IE_ADD, 71)
+ RELOC_NUMBER (R_SPARC_TLS_LE_HIX22, 72)
+ RELOC_NUMBER (R_SPARC_TLS_LE_LOX10, 73)
+ RELOC_NUMBER (R_SPARC_TLS_DTPMOD32, 74)
+ RELOC_NUMBER (R_SPARC_TLS_DTPMOD64, 75)
+ RELOC_NUMBER (R_SPARC_TLS_DTPOFF32, 76)
+ RELOC_NUMBER (R_SPARC_TLS_DTPOFF64, 77)
+ RELOC_NUMBER (R_SPARC_TLS_TPOFF32, 78)
+ RELOC_NUMBER (R_SPARC_TLS_TPOFF64, 79)
+
EMPTY_RELOC (R_SPARC_max_std)
RELOC_NUMBER (R_SPARC_GNU_VTINHERIT, 250)
RELOC_NUMBER (R_SPARC_GNU_VTENTRY, 251)
+ RELOC_NUMBER (R_SPARC_REV32, 252)
END_RELOC_NUMBERS (R_SPARC_max)
diff --git a/include/gdb/ChangeLog b/include/gdb/ChangeLog
index c39a7a04725..b36341ddba7 100644
--- a/include/gdb/ChangeLog
+++ b/include/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2002-12-26 Kazu Hirata <kazu@cs.umass.edu>
+
+ * sim-h8300.h: Remove ^M.
+
2002-07-29 Andrey Volkov <avolkov@transas.com>
* sim-h8300.h: Rename all enums from H8300_ to SIM_H8300_
diff --git a/include/gdb/sim-h8300.h b/include/gdb/sim-h8300.h
index ecc68835296..246370aec23 100644
--- a/include/gdb/sim-h8300.h
+++ b/include/gdb/sim-h8300.h
@@ -1,36 +1,36 @@
-/* This file defines the interface between the h8300 simulator and gdb.
- Copyright (C) 2002 Free Software Foundation, Inc.
-
-This file is part of GDB.
-
-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
+/* This file defines the interface between the h8300 simulator and gdb.
+ Copyright (C) 2002 Free Software Foundation, Inc.
+
+This file is part of GDB.
+
+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. */
-#if !defined (SIM_H8300_H)
-#define SIM_H8300_H
-
-#ifdef __cplusplus
+#if !defined (SIM_H8300_H)
+#define SIM_H8300_H
+
+#ifdef __cplusplus
extern "C" { //}
#endif
-
-/* The simulator makes use of the following register information. */
-
+
+/* The simulator makes use of the following register information. */
+
enum sim_h8300_regs
{
/* Registers common to all the H8 variants. */
/* Start here: */
- SIM_H8300_R0_REGNUM,
+ SIM_H8300_R0_REGNUM,
SIM_H8300_R1_REGNUM,
SIM_H8300_R2_REGNUM,
SIM_H8300_R3_REGNUM,
@@ -42,8 +42,8 @@ extern "C" { //}
SIM_H8300_CCR_REGNUM, /* Contains processor status */
SIM_H8300_PC_REGNUM, /* Contains program counter */
/* End here */
-
- SIM_H8300_EXR_REGNUM, /* Contains extended processor status
+
+ SIM_H8300_EXR_REGNUM, /* Contains extended processor status
H8S and higher */
SIM_H8300_MACL_REGNUM, /* Lower part of MAC register (26xx only)*/
SIM_H8300_MACH_REGNUM, /* High part of MAC register (26xx only) */
@@ -55,11 +55,11 @@ extern "C" { //}
enum
{
- SIM_H8300_ARG_FIRST_REGNUM = SIM_H8300_R0_REGNUM, /* first reg in which an arg
- may be passed */
- SIM_H8300_ARG_LAST_REGNUM = SIM_H8300_R3_REGNUM, /* last reg in which an arg
+ SIM_H8300_ARG_FIRST_REGNUM = SIM_H8300_R0_REGNUM, /* first reg in which an arg
may be passed */
- SIM_H8300_FP_REGNUM = SIM_H8300_R6_REGNUM, /* Contain address of executing
+ SIM_H8300_ARG_LAST_REGNUM = SIM_H8300_R3_REGNUM, /* last reg in which an arg
+ may be passed */
+ SIM_H8300_FP_REGNUM = SIM_H8300_R6_REGNUM, /* Contain address of executing
stack frame */
SIM_H8300_SP_REGNUM = SIM_H8300_R7_REGNUM /* Contains address of top of stack */
};
@@ -71,8 +71,8 @@ extern "C" { //}
SIM_H8300_NUM_REGS = 16
};
-#ifdef __cplusplus
+#ifdef __cplusplus
}
#endif
-
+
#endif /* SIM_H8300_H */
diff --git a/include/hashtab.h b/include/hashtab.h
index be866b51ee6..4995a9a10e0 100644
--- a/include/hashtab.h
+++ b/include/hashtab.h
@@ -1,5 +1,5 @@
/* An expandable hash tables datatype.
- Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
Contributed by Vladimir Makarov (vmakarov@cygnus.com).
This program is free software; you can redistribute it and/or modify
@@ -76,10 +76,16 @@ typedef PTR (*htab_alloc) PARAMS ((size_t, size_t));
/* We also need a free() routine. */
typedef void (*htab_free) PARAMS ((PTR));
+/* Memory allocation and deallocation; variants which take an extra
+ argument. */
+typedef PTR (*htab_alloc_with_arg) PARAMS ((void *, size_t, size_t));
+typedef void (*htab_free_with_arg) PARAMS ((void *, void *));
+
/* Hash tables are of the following type. The structure
(implementation) of this type is not needed for using the hash
tables. All work with hash table should be executed only through
- functions mentioned below. */
+ functions mentioned below. The size of this structure is subject to
+ change. */
struct htab GTY(())
{
@@ -115,6 +121,11 @@ struct htab GTY(())
/* Pointers to allocate/free functions. */
htab_alloc alloc_f;
htab_free free_f;
+
+ /* Alternate allocate/free functions, which take an extra argument. */
+ PTR GTY((skip (""))) alloc_arg;
+ htab_alloc_with_arg alloc_with_arg_f;
+ htab_free_with_arg free_with_arg_f;
};
typedef struct htab *htab_t;
@@ -128,10 +139,20 @@ extern htab_t htab_create_alloc PARAMS ((size_t, htab_hash,
htab_eq, htab_del,
htab_alloc, htab_free));
+extern htab_t htab_create_alloc_ex PARAMS ((size_t, htab_hash,
+ htab_eq, htab_del,
+ PTR, htab_alloc_with_arg,
+ htab_free_with_arg));
+
/* Backward-compatibility functions. */
extern htab_t htab_create PARAMS ((size_t, htab_hash, htab_eq, htab_del));
extern htab_t htab_try_create PARAMS ((size_t, htab_hash, htab_eq, htab_del));
+extern void htab_set_functions_ex PARAMS ((htab_t, htab_hash,
+ htab_eq, htab_del,
+ PTR, htab_alloc_with_arg,
+ htab_free_with_arg));
+
extern void htab_delete PARAMS ((htab_t));
extern void htab_empty PARAMS ((htab_t));
diff --git a/include/opcode/ChangeLog b/include/opcode/ChangeLog
index 5aa92e9ab23..c7c4484cc80 100644
--- a/include/opcode/ChangeLog
+++ b/include/opcode/ChangeLog
@@ -1,3 +1,48 @@
+2003-01-23 Alan Modra <amodra@bigpond.net.au>
+
+ * m68hc11.h (cpu6812s): Define.
+
+2003-01-07 Chris Demetriou <cgd@broadcom.com>
+
+ * mips.h: Fix missing space in comment.
+ (INSN_ISA1, INSN_ISA2, INSN_ISA3, INSN_ISA4, INSN_ISA5)
+ (INSN_ISA32, INSN_ISA32R2, INSN_ISA64): Shift values right
+ by four bits.
+
+2003-01-02 Chris Demetriou <cgd@broadcom.com>
+
+ * mips.h: Update copyright years to include 2002 (which had
+ been missed previously) and 2003. Make comments about "+A",
+ "+B", and "+C" operand types more descriptive.
+
+2002-12-31 Chris Demetriou <cgd@broadcom.com>
+
+ * mips.h: Note that the "+D" operand type name is now used.
+
+2002-12-30 Chris Demetriou <cgd@broadcom.com>
+
+ * mips.h: Document "+" as the start of two-character operand
+ type names, and add new "K", "+A", "+B", and "+C" operand types.
+ (OP_MASK_INSMSB, OP_SH_INSMSB, OP_MASK_EXTMSB)
+ (OP_SH_EXTMSB, INSN_ISA32R2, ISA_MIPS32R2, CPU_MIPS32R2): New
+ defines.
+
+2002-12-24 Dmitry Diky <diwil@mail.ru>
+
+ * msp430.h: New file. Defines msp430 opcodes.
+
+2002-12-30 D.Venkatasubramanian <dvenkat@noida.hcltech.com>
+
+ * h8300.h: Added some more pseudo opcodes for system call
+ processing.
+
+2002-12-19 Chris Demetriou <cgd@broadcom.com>
+
+ * mips.h (OP_OP_COP0, OP_OP_COP1, OP_OP_COP2, OP_OP_COP3)
+ (OP_OP_LWC1, OP_OP_LWC2, OP_OP_LWC3, OP_OP_LDC1, OP_OP_LDC2)
+ (OP_OP_LDC3, OP_OP_SWC1, OP_OP_SWC2, OP_OP_SWC3, OP_OP_SDC1)
+ (OP_OP_SDC2, OP_OP_SDC3): Define.
+
2002-12-16 Alan Modra <amodra@bigpond.net.au>
* hppa.h (completer_chars): #if 0 out.
diff --git a/include/opcode/h8300.h b/include/opcode/h8300.h
index d5404c2c2ff..4141c575e5a 100644
--- a/include/opcode/h8300.h
+++ b/include/opcode/h8300.h
@@ -301,6 +301,16 @@ struct h8_opcode
#define O_STM 86
#define O_STMAC 87
#define O_LAST 88
+/* Change made for System Call processing. */
+#define O_SYS_CREAT 100
+#define O_SYS_OPEN 101
+#define O_SYS_READ 102
+#define O_SYS_WRITE 103
+#define O_SYS_LSEEK 104
+#define O_SYS_CLOSE 105
+#define O_SYS_STAT 106
+#define O_SYS_FSTAT 107
+/* End of System Call specific Changes. */
#define SB 0
#define SW 1
#define SL 2
diff --git a/include/opcode/hppa.h b/include/opcode/hppa.h
index 471161788ad..8234664a626 100644
--- a/include/opcode/hppa.h
+++ b/include/opcode/hppa.h
@@ -407,6 +407,7 @@ static const struct pa_opcode pa_opcodes[] =
{ "ldbx", 0x0c000000, 0xfc001fc0, "cXx(b),t", pa10, 0},
{ "ldwa", 0x0c000180, 0xfc00d3c0, "cxccx(b),t", pa10, FLAG_STRICT},
{ "ldwa", 0x0c001180, 0xfc00d3c0, "cmcc5(b),t", pa10, FLAG_STRICT},
+{ "ldwa", 0x0c0011a0, 0xfc1ff3e0, "cocc@(b),t", pa20, FLAG_STRICT},
{ "ldcw", 0x0c0001c0, 0xfc0013c0, "cxcdx(s,b),t", pa10, FLAG_STRICT},
{ "ldcw", 0x0c0001c0, 0xfc0013c0, "cxcdx(b),t", pa10, FLAG_STRICT},
{ "ldcw", 0x0c0011c0, 0xfc0013c0, "cmcd5(s,b),t", pa10, FLAG_STRICT},
@@ -417,6 +418,7 @@ static const struct pa_opcode pa_opcodes[] =
{ "stby", 0x0c001300, 0xfc0013c0, "cscCx,V(b)", pa10, FLAG_STRICT},
{ "ldda", 0x0c000100, 0xfc00d3c0, "cxccx(b),t", pa20, FLAG_STRICT},
{ "ldda", 0x0c001100, 0xfc00d3c0, "cmcc5(b),t", pa20, FLAG_STRICT},
+{ "ldda", 0x0c001120, 0xfc1ff3e0, "cocc@(b),t", pa20, FLAG_STRICT},
{ "ldcd", 0x0c000140, 0xfc0013c0, "cxcdx(s,b),t", pa20, FLAG_STRICT},
{ "ldcd", 0x0c000140, 0xfc0013c0, "cxcdx(b),t", pa20, FLAG_STRICT},
{ "ldcd", 0x0c001140, 0xfc0013c0, "cmcd5(s,b),t", pa20, FLAG_STRICT},
diff --git a/include/opcode/m68hc11.h b/include/opcode/m68hc11.h
index a538026f84a..5d2fc9bb04f 100644
--- a/include/opcode/m68hc11.h
+++ b/include/opcode/m68hc11.h
@@ -1,5 +1,5 @@
/* m68hc11.h -- Header file for Motorola 68HC11 & 68HC12 opcode table
- Copyright 1999, 2000, 2002 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
Written by Stephane Carrez (stcarrez@nerim.fr)
This file is part of GDB, GAS, and the GNU binutils.
@@ -388,6 +388,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
/* CPU identification. */
#define cpu6811 0x01
#define cpu6812 0x02
+#define cpu6812s 0x04
/* The opcode table is an array of struct m68hc11_opcode. */
struct m68hc11_opcode {
@@ -424,4 +425,3 @@ extern const struct m68hc12_opcode_alias m68hc12_alias[];
extern const int m68hc12_num_alias;
#endif /* _OPCODE_M68HC11_H */
-
diff --git a/include/opcode/mips.h b/include/opcode/mips.h
index 3849fdce68b..1f90cfd7636 100644
--- a/include/opcode/mips.h
+++ b/include/opcode/mips.h
@@ -1,5 +1,5 @@
/* mips.h. Mips opcode list for GDB, the GNU debugger.
- Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Contributed by Ralph Campbell and OSF
Commented and modified by Ian Lance Taylor, Cygnus Support
@@ -142,6 +142,27 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
#define OP_SH_VECBYTE 22
#define OP_MASK_VECALIGN 0x7 /* Vector byte-align (alni.ob) op. */
#define OP_SH_VECALIGN 21
+#define OP_MASK_INSMSB 0x1f /* "ins" MSB. */
+#define OP_SH_INSMSB 11
+#define OP_MASK_EXTMSBD 0x1f /* "ext" MSBD. */
+#define OP_SH_EXTMSBD 11
+
+#define OP_OP_COP0 0x10
+#define OP_OP_COP1 0x11
+#define OP_OP_COP2 0x12
+#define OP_OP_COP3 0x13
+#define OP_OP_LWC1 0x31
+#define OP_OP_LWC2 0x32
+#define OP_OP_LWC3 0x33 /* a.k.a. pref */
+#define OP_OP_LDC1 0x35
+#define OP_OP_LDC2 0x36
+#define OP_OP_LDC3 0x37 /* a.k.a. ld */
+#define OP_OP_SWC1 0x39
+#define OP_OP_SWC2 0x3a
+#define OP_OP_SWC3 0x3b
+#define OP_OP_SDC1 0x3d
+#define OP_OP_SDC2 0x3e
+#define OP_OP_SDC3 0x3f /* a.k.a. sd */
/* Values in the 'VSEL' field. */
#define MDMX_FMTSEL_IMM_QH 0x1d
@@ -211,6 +232,15 @@ struct mips_opcode
"J" 19 bit wait function code (OP_*_CODE19)
"x" accept and ignore register name
"z" must be zero register
+ "K" 5 bit Hardware Register (rdhwr instruction) (OP_*_RD)
+ "+A" 5 bit ins/ext position, which becomes LSB (OP_*_SHAMT).
+ Enforces: 0 <= pos < 32.
+ "+B" 5 bit ins size, which becomes MSB (OP_*_INSMSB).
+ Requires that "+A" occur first to set position.
+ Enforces: 0 < (pos+size) <= 32.
+ "+C" 5 bit ext size, which becomes MSBD (OP_*_EXTMSBD).
+ Requires that "+A" occur first to set position.
+ Enforces: 0 < (pos+size) <= 32.
Floating point instructions:
"D" 5 bit destination register (OP_*_FD)
@@ -230,6 +260,8 @@ struct mips_opcode
"e" 5 bit vector register byte specifier (OP_*_VECBYTE)
"%" 3 bit immediate vr5400 vector alignment operand (OP_*_VECALIGN)
see also "k" above
+ "+D" Combined destination register ("G") and sel ("H") for CP0 ops,
+ for pretty-printing in disassembly only.
Macro instructions:
"A" General 32 bit expression
@@ -251,11 +283,16 @@ struct mips_opcode
"()" parens surrounding optional value
"," separates operands
"[]" brackets around index for vector-op scalar operand specifier (vr5400)
+ "+" Start of extension sequence.
Characters used so far, for quick reference when adding more:
- "%[]<>(),"
- "ABCDEFGHIJLMNOPQRSTUVWXYZ"
+ "%[]<>(),+"
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"abcdefhijklopqrstuvwxz"
+
+ Extension character sequences used so far ("+" followed by the
+ following), for quick reference when adding more:
+ "ABCD"
*/
/* These are the bits which may be set in the pinfo field of an
@@ -336,17 +373,18 @@ struct mips_opcode
/* Masks used to mark instructions to indicate which MIPS ISA level
they were introduced in. ISAs, as defined below, are logical
- ORs of these bits, indicatingthat they support the instructions
+ ORs of these bits, indicating that they support the instructions
defined at the given level. */
#define INSN_ISA_MASK 0x00000fff
-#define INSN_ISA1 0x00000010
-#define INSN_ISA2 0x00000020
-#define INSN_ISA3 0x00000040
-#define INSN_ISA4 0x00000080
-#define INSN_ISA5 0x00000100
-#define INSN_ISA32 0x00000200
-#define INSN_ISA64 0x00000400
+#define INSN_ISA1 0x00000001
+#define INSN_ISA2 0x00000002
+#define INSN_ISA3 0x00000004
+#define INSN_ISA4 0x00000008
+#define INSN_ISA5 0x00000010
+#define INSN_ISA32 0x00000020
+#define INSN_ISA64 0x00000040
+#define INSN_ISA32R2 0x00000080
/* Masks used for MIPS-defined ASEs. */
#define INSN_ASE_MASK 0x0000f000
@@ -389,9 +427,12 @@ struct mips_opcode
#define ISA_MIPS3 (ISA_MIPS2 | INSN_ISA3)
#define ISA_MIPS4 (ISA_MIPS3 | INSN_ISA4)
#define ISA_MIPS5 (ISA_MIPS4 | INSN_ISA5)
+
#define ISA_MIPS32 (ISA_MIPS2 | INSN_ISA32)
#define ISA_MIPS64 (ISA_MIPS5 | INSN_ISA32 | INSN_ISA64)
+#define ISA_MIPS32R2 (ISA_MIPS32 | INSN_ISA32R2)
+
/* CPU defines, use instead of hardcoding processor number. Keep this
in sync with bfd/archures.c in order for machine selection to work. */
#define CPU_UNKNOWN 0 /* Gas internal use. */
@@ -415,6 +456,7 @@ struct mips_opcode
#define CPU_R12000 12000
#define CPU_MIPS16 16
#define CPU_MIPS32 32
+#define CPU_MIPS32R2 33
#define CPU_MIPS5 5
#define CPU_MIPS64 64
#define CPU_SB1 12310201 /* octal 'SB', 01. */
diff --git a/include/opcode/msp430.h b/include/opcode/msp430.h
new file mode 100644
index 00000000000..19702254eef
--- /dev/null
+++ b/include/opcode/msp430.h
@@ -0,0 +1,111 @@
+/* Opcode table for the TI MSP430 microcontrollers
+
+ Copyright 2002 Free Software Foundation, Inc.
+ Contributed by Dmitry Diky <diwil@mail.ru>
+
+ 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, 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 __MSP430_H_
+#define __MSP430_H_
+
+struct msp430_operand_s
+{
+ int ol; /* Operand length words. */
+ int am; /* Addr mode. */
+ int reg; /* Register. */
+ int mode; /* Pperand mode. */
+#define OP_REG 0
+#define OP_EXP 1
+#ifndef DASM_SECTION
+ expressionS exp;
+#endif
+};
+
+#define BYTE_OPERATION (1 << 6) /* Byte operation flag for all instructions. */
+
+struct msp430_opcode_s
+{
+ char *name;
+ int fmt;
+ int insn_opnumb;
+ int bin_opcode;
+ int bin_mask;
+};
+
+#define MSP_INSN(name, size, numb, bin, mask) { #name, size, numb, bin, mask }
+
+static struct msp430_opcode_s msp430_opcodes[] =
+{
+ MSP_INSN (and, 1, 2, 0xf000, 0xf000),
+ MSP_INSN (inv, 0, 1, 0xe330, 0xfff0),
+ MSP_INSN (xor, 1, 2, 0xe000, 0xf000),
+ MSP_INSN (setz, 0, 0, 0xd322, 0xffff),
+ MSP_INSN (setc, 0, 0, 0xd312, 0xffff),
+ MSP_INSN (eint, 0, 0, 0xd232, 0xffff),
+ MSP_INSN (setn, 0, 0, 0xd222, 0xffff),
+ MSP_INSN (bis, 1, 2, 0xd000, 0xf000),
+ MSP_INSN (clrz, 0, 0, 0xc322, 0xffff),
+ MSP_INSN (clrc, 0, 0, 0xc312, 0xffff),
+ MSP_INSN (dint, 0, 0, 0xc232, 0xffff),
+ MSP_INSN (clrn, 0, 0, 0xc222, 0xffff),
+ MSP_INSN (bic, 1, 2, 0xc000, 0xf000),
+ MSP_INSN (bit, 1, 2, 0xb000, 0xf000),
+ MSP_INSN (dadc, 0, 1, 0xa300, 0xff30),
+ MSP_INSN (dadd, 1, 2, 0xa000, 0xf000),
+ MSP_INSN (tst, 0, 1, 0x9300, 0xff30),
+ MSP_INSN (cmp, 1, 2, 0x9000, 0xf000),
+ MSP_INSN (decd, 0, 1, 0x8320, 0xff30),
+ MSP_INSN (dec, 0, 1, 0x8310, 0xff30),
+ MSP_INSN (sub, 1, 2, 0x8000, 0xf000),
+ MSP_INSN (sbc, 0, 1, 0x7300, 0xff30),
+ MSP_INSN (subc, 1, 2, 0x7000, 0xf000),
+ MSP_INSN (adc, 0, 1, 0x6300, 0xff30),
+ MSP_INSN (rlc, 0, 2, 0x6000, 0xf000),
+ MSP_INSN (addc, 1, 2, 0x6000, 0xf000),
+ MSP_INSN (incd, 0, 1, 0x5320, 0xff30),
+ MSP_INSN (inc, 0, 1, 0x5310, 0xff30),
+ MSP_INSN (rla, 0, 2, 0x5000, 0xf000),
+ MSP_INSN (add, 1, 2, 0x5000, 0xf000),
+ MSP_INSN (nop, 0, 0, 0x4303, 0xffff),
+ MSP_INSN (clr, 0, 1, 0x4300, 0xff30),
+ MSP_INSN (ret, 0, 0, 0x4130, 0xff30),
+ MSP_INSN (pop, 0, 1, 0x4130, 0xff30),
+ MSP_INSN (br, 0, 3, 0x4000, 0xf000),
+ MSP_INSN (mov, 1, 2, 0x4000, 0xf000),
+ MSP_INSN (jmp, 3, 1, 0x3c00, 0xfc00),
+ MSP_INSN (jl, 3, 1, 0x3800, 0xfc00),
+ MSP_INSN (jge, 3, 1, 0x3400, 0xfc00),
+ MSP_INSN (jn, 3, 1, 0x3000, 0xfc00),
+ MSP_INSN (jc, 3, 1, 0x2c00, 0xfc00),
+ MSP_INSN (jhs, 3, 1, 0x2c00, 0xfc00),
+ MSP_INSN (jnc, 3, 1, 0x2800, 0xfc00),
+ MSP_INSN (jlo, 3, 1, 0x2800, 0xfc00),
+ MSP_INSN (jz, 3, 1, 0x2400, 0xfc00),
+ MSP_INSN (jeq, 3, 1, 0x2400, 0xfc00),
+ MSP_INSN (jnz, 3, 1, 0x2000, 0xfc00),
+ MSP_INSN (jne, 3, 1, 0x2000, 0xfc00),
+ MSP_INSN (reti, 2, 0, 0x1300, 0xffc0),
+ MSP_INSN (call, 2, 1, 0x1280, 0xffc0),
+ MSP_INSN (push, 2, 1, 0x1200, 0xff80),
+ MSP_INSN (sxt, 2, 1, 0x1180, 0xffc0),
+ MSP_INSN (rra, 2, 1, 0x1100, 0xff80),
+ MSP_INSN (swpb, 2, 1, 0x1080, 0xffc0),
+ MSP_INSN (rrc, 2, 1, 0x1000, 0xff80),
+
+ /* End of instruction set. */
+ { NULL, 0, 0, 0, 0 }
+};
+
+#endif
diff --git a/include/splay-tree.h b/include/splay-tree.h
index 23f7ac69d42..86707fc1d2f 100644
--- a/include/splay-tree.h
+++ b/include/splay-tree.h
@@ -36,6 +36,10 @@ extern "C" {
#include "ansidecl.h"
+#ifndef GTY
+#define GTY(X)
+#endif
+
/* Use typedefs for the key and data types to facilitate changing
these types, if necessary. These types should be sufficiently wide
that any pointer or scalar can be cast to these types, and then
@@ -65,7 +69,7 @@ typedef int (*splay_tree_foreach_fn) PARAMS((splay_tree_node, void*));
node structures. The first argument is the number of bytes needed;
the second is a data pointer the splay tree functions pass through
to the allocator. This function must never return zero. */
-typedef void *(*splay_tree_allocate_fn) PARAMS((int, void *));
+typedef PTR (*splay_tree_allocate_fn) PARAMS((int, void *));
/* The type of a function used to free memory allocated using the
corresponding splay_tree_allocate_fn. The first argument is the
@@ -74,24 +78,24 @@ typedef void *(*splay_tree_allocate_fn) PARAMS((int, void *));
typedef void (*splay_tree_deallocate_fn) PARAMS((void *, void *));
/* The nodes in the splay tree. */
-struct splay_tree_node_s
+struct splay_tree_node_s GTY(())
{
/* The key. */
- splay_tree_key key;
+ splay_tree_key GTY ((use_param1 (""))) key;
/* The value. */
- splay_tree_value value;
+ splay_tree_value GTY ((use_param2 (""))) value;
/* The left and right children, respectively. */
- splay_tree_node left;
- splay_tree_node right;
+ splay_tree_node GTY ((use_params (""))) left;
+ splay_tree_node GTY ((use_params (""))) right;
};
/* The splay tree itself. */
-typedef struct splay_tree_s
+struct splay_tree_s GTY(())
{
/* The root of the tree. */
- splay_tree_node root;
+ splay_tree_node GTY ((use_params (""))) root;
/* The comparision function. */
splay_tree_compare_fn comp;
@@ -105,9 +109,10 @@ typedef struct splay_tree_s
/* Allocate/free functions, and a data pointer to pass to them. */
splay_tree_allocate_fn allocate;
splay_tree_deallocate_fn deallocate;
- void *allocate_data;
+ PTR GTY((skip (""))) allocate_data;
-} *splay_tree;
+};
+typedef struct splay_tree_s *splay_tree;
extern splay_tree splay_tree_new PARAMS((splay_tree_compare_fn,
splay_tree_delete_key_fn,