aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorcvs2svn <>2002-02-09 22:54:17 +0000
committercvs2svn <>2002-02-09 22:54:17 +0000
commit34124a07180b9c8c7479517436c49292cfd12dcd (patch)
tree75b8ab96fbc6007f3c2f5289a74119190b1c246c /include
parent53c570dbbc783190848fb72380c42664c4a5e808 (diff)
downloadnewlib-34124a07180b9c8c7479517436c49292cfd12dcd.zip
newlib-34124a07180b9c8c7479517436c49292cfd12dcd.tar.gz
newlib-34124a07180b9c8c7479517436c49292cfd12dcd.tar.bz2
This commit was manufactured by cvs2svn to create branch 'binutils-binutils-2_12-branchpoint
2_12-branch'. Sprout from gdb_5_1-2001-07-29-branch 2001-07-26 14:20:06 UTC cvs2svn 'This commit was manufactured by cvs2svn to create branch' Cherrypick from master 2002-02-09 22:54:16 UTC Richard Henderson <rth@redhat.com> ' * alpha.h (R_ALPHA_BRSGP): New.': COPYING.NEWLIB ChangeLog MAINTAINERS Makefile.in config.guess config.sub configure configure.in etc/ChangeLog etc/Makefile.in gettext.m4 include/ChangeLog include/ansidecl.h include/aout/ChangeLog include/aout/aout64.h include/aout/hp300hpux.h include/bfdlink.h include/coff/ChangeLog include/coff/arm.h include/coff/external.h include/coff/internal.h include/coff/m88k.h include/coff/or32.h include/coff/ti.h include/coff/tic54x.h include/coff/xcoff.h include/demangle.h include/dis-asm.h include/dyn-string.h include/elf/ChangeLog include/elf/alpha.h include/elf/arm.h include/elf/common.h include/elf/dwarf2.h include/elf/external.h include/elf/h8.h include/elf/ia64.h include/elf/internal.h include/elf/mips.h include/elf/mmix.h include/elf/or32.h include/elf/ppc.h include/elf/sh.h include/elf/xstormy16.h include/fibheap.h include/filenames.h include/floatformat.h include/hashtab.h include/libiberty.h include/nlm/ChangeLog include/nlm/common.h include/objalloc.h include/opcode/ChangeLog include/opcode/alpha.h include/opcode/arc.h include/opcode/avr.h include/opcode/cgen.h include/opcode/d10v.h include/opcode/d30v.h include/opcode/h8300.h include/opcode/hppa.h include/opcode/i386.h include/opcode/mips.h include/opcode/mmix.h include/opcode/or32.h include/opcode/ppc.h include/opcode/tic54x.h include/opcode/v850.h include/partition.h include/safe-ctype.h include/sort.h include/splay-tree.h include/xregex.h libtool.m4 ltcf-c.sh ltcf-cxx.sh ltcf-gcj.sh ltconfig ltmain.sh symlink-tree
Diffstat (limited to 'include')
-rw-r--r--include/ChangeLog202
-rw-r--r--include/ansidecl.h318
-rw-r--r--include/aout/ChangeLog8
-rw-r--r--include/aout/aout64.h75
-rw-r--r--include/aout/hp300hpux.h14
-rw-r--r--include/bfdlink.h30
-rw-r--r--include/coff/ChangeLog67
-rw-r--r--include/coff/arm.h3
-rw-r--r--include/coff/external.h8
-rw-r--r--include/coff/internal.h6
-rw-r--r--include/coff/m88k.h30
-rw-r--r--include/coff/or32.h287
-rw-r--r--include/coff/ti.h189
-rw-r--r--include/coff/tic54x.h27
-rw-r--r--include/coff/xcoff.h320
-rw-r--r--include/demangle.h16
-rw-r--r--include/dis-asm.h51
-rw-r--r--include/dyn-string.h8
-rw-r--r--include/elf/ChangeLog197
-rw-r--r--include/elf/alpha.h31
-rw-r--r--include/elf/arm.h4
-rw-r--r--include/elf/common.h41
-rw-r--r--include/elf/dwarf2.h54
-rw-r--r--include/elf/external.h4
-rw-r--r--include/elf/h8.h96
-rw-r--r--include/elf/ia64.h22
-rw-r--r--include/elf/internal.h36
-rw-r--r--include/elf/mips.h2
-rw-r--r--include/elf/mmix.h168
-rw-r--r--include/elf/or32.h62
-rw-r--r--include/elf/ppc.h77
-rw-r--r--include/elf/sh.h132
-rw-r--r--include/elf/xstormy16.h53
-rw-r--r--include/fibheap.h81
-rw-r--r--include/filenames.h4
-rw-r--r--include/floatformat.h10
-rw-r--r--include/hashtab.h3
-rw-r--r--include/libiberty.h69
-rw-r--r--include/nlm/ChangeLog6
-rw-r--r--include/nlm/common.h51
-rw-r--r--include/objalloc.h11
-rw-r--r--include/opcode/ChangeLog220
-rw-r--r--include/opcode/alpha.h8
-rw-r--r--include/opcode/arc.h6
-rw-r--r--include/opcode/avr.h12
-rw-r--r--include/opcode/cgen.h38
-rw-r--r--include/opcode/d10v.h12
-rw-r--r--include/opcode/d30v.h2
-rw-r--r--include/opcode/h8300.h6
-rw-r--r--include/opcode/hppa.h192
-rw-r--r--include/opcode/i386.h9
-rw-r--r--include/opcode/mips.h31
-rw-r--r--include/opcode/mmix.h185
-rw-r--r--include/opcode/or32.h188
-rw-r--r--include/opcode/ppc.h19
-rw-r--r--include/opcode/tic54x.h28
-rw-r--r--include/opcode/v850.h3
-rw-r--r--include/partition.h8
-rw-r--r--include/safe-ctype.h5
-rw-r--r--include/sort.h8
-rw-r--r--include/splay-tree.h8
-rw-r--r--include/xregex.h4
62 files changed, 3059 insertions, 806 deletions
diff --git a/include/ChangeLog b/include/ChangeLog
index 0dc6acd..c0fd95b 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,11 +1,192 @@
-2001-07-18 Andreas Jaeger <aj@suse.de>
+2002-02-08 Alexandre Oliva <aoliva@redhat.com>
- * xregex2.h: Place under LGPL version 2.1.
+ Contribute sh64-elf.
+ 2000-11-25 Hans-Peter Nilsson <hpn@cygnus.com>
+ * dis-asm.h (print_insn_sh64): New prototype.
+ (print_insn_sh64l): New prototype.
+ (print_insn_sh64x_media): New prototype.
+
+2002-02-05 Frank Ch. Eigler <fche@redhat.com>
+
+ * dis-asm.h (disassemble_info): New field `insn_sets'.
+ (INIT_DISASSEMBLE_INFO): Clear it.
+
+2002-02-05 Jason Merrill <jason@redhat.com>
+
+ * demangle.h (cplus_demangle_v3): Add "options" parm.
+ (cplus_demangle_v3_type): Remove prototype.
+ (DMGL_VERBOSE): New macro.
+ (DMGL_TYPES): New macro.
+
+2002-02-02 H.J. Lu (hjl@gnu.org)
+
+ * demangle.h (cplus_demangle_v3_type): New prototype.
+
+2002-01-31 Ivan Guzvinec <ivang@opencores.org>
+
+ * dis-asm.h : Add support for or32 targets
+
+2002-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * libiberty.h (C_alloca): Add ATTRIBUTE_MALLOC.
+
+2002-01-27 David O'Brien <obrien@FreeBSD.org>
+
+ * cgen.h (BFD_VERSION): Use BFD_VERSION_DATE instead.
+
+2001-12-14 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * dis-asm.h (INIT_DISASSEMBLE_INFO_NO_ARCH): Initialise the
+ disassembler_options field (to NULL).
+
+2001-12-13 Jakub Jelinek <jakub@redhat.com>
+
+ * bfdlink.h (struct bfd_link_info): Add eh_frame_hdr field.
+
+2001-12-07 Geoffrey Keating <geoffk@redhat.com>
+
+ * dis-asm.h (print_insn_xstormy16): Declare.
+
+2001-12-06 Richard Henderson <rth@redhat.com>
+
+ * demangle.h (no_demangling): New.
+ (NO_DEMANGLING_STYLE_STRING): New.
+
+2001-11-14 Alan Modra <amodra@bigpond.net.au>
+
+ * dis-asm.h (print_insn_i386): Declare.
+
+2001-11-11 Timothy Wall <twall@alum.mit.edu>
+
+ * dis-asm.h: Fix comment to refer to octets rather than bytes.
+
+2001-10-30 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * dis-asm.h (print_insn_mmix): Add prototype.
+
+2001-10-24 Neil Booth <neil@daikokuya.demon.co.uk>
+
+ * safe-ctype.h (_sch_isbasic, IS_ISOBASIC): New.
+
+2001-10-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * libiberty.h (hex_init): Revert delete.
+
+ * libiberty.h (_hex_value): Const-ify.
+ (hex_init): Delete.
+
+2001-10-16 Christopher Faylor <cgf@redhat.com>
+
+ * filenames.h: Add cygwin to the list of dosish style path systems.
+
+2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * demangle.h (demangler_engine): Const-ify.
+ * libiberty.h (buildargv): Likewise.
+
+2001-10-03 Vassili Karpov <malc@pulsesoft.com>
+
+ * bfdlink.h (struct bfd_link_info): Add nocopyreloc field.
+
+2001-09-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-2001-07-12 Jeff Johnston <jjohnstn@redhat.com>
+ * libiberty.h (reconcat): New function.
- * opcode/cgen.h (CGEN_INSN): Add regex support.
- (build_insn_regex): Declare.
+2001-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * libiberty.h (concat, concat_length, concat_copy, concat_copy2,
+ ACONCAT): Improve comments.
+
+2001-09-18 Alan Modra <amodra@bigpond.net.au>
+
+ * objalloc.h (OBJALLOC_ALIGN): Define using offsetof.
+
+2001-09-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * libiberty.h (concat_length, concat_copy, concat_copy2,
+ libiberty_concat_ptr, ACONCAT): New.
+
+ * libiberty.h (ASTRDUP): New macro.
+ libiberty_optr, libiberty_nptr, libiberty_len): Declare.
+
+2001-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * ansidecl.h: Update comments reflecting previous change.
+
+2001-08-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * ansidecl.h (VA_OPEN, VA_CLOSE): Allow multiple uses.
+
+2001-08-25 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * bfdlink.h (struct bfd_link_info): Change 'spare_dynamic_tags' to
+ unsigned to remove a compile time warning message.
+
+2001-08-24 H.J. Lu <hjl@gnu.org>
+
+ * bfdlink.h (bfd_link_hash_table_type): New. The linker hash
+ table type, bfd_link_generic_hash_table and
+ bfd_link_elf_hash_table.
+ (bfd_link_hash_table): Add a new field, type, for the linker
+ hash table type.
+
+2001-08-23 Jakub Jelinek <jakub@redhat.com>
+
+ * bfdlink.h (struct bfd_link_info): Add combreloc and
+ spare_dynamic_tags fields.
+
+2001-08-23 Lars Brinkhoff <lars@nocrew.org>
+
+ * dyn-string.h, fibheap.h, partition.h, sort.h, splay-tree.h:
+ replace "GNU CC" with "GCC".
+
+2001-08-21 Richard Henderson <rth@redhat.com>
+
+ * fibheap.h: Tidy formatting.
+ (fibnode_t): Limit degree to 31 bits to avoid warning.
+
+2001-08-20 Daniel Berlin <dan@cgsoftware.com>
+
+ * fibheap.h: New file. Fibonacci heap.
+
+2001-08-20 Andrew Cagney <ac131313@redhat.com>
+
+ * floatformat.h (floatformat_arm_ext): Document as deprecated.
+ (floatformat_arm_ext_big, floatformat_arm_ext_littlebyte_bigword)
+ (floatformat_ia64_spill_little, floatformat_ia64_quad_little)
+ (floatformat_ia64_spill_big, floatformat_ia64_quad_big)
+ (floatformat_m88110_harris_ext): Declare.
+
+2001-08-18 Zack Weinberg <zackw@panix.com>
+
+ * ansidecl.h: Reorganize for readability, remove documentation
+ of obsolete macros, document PARAMS and VPARAMS. Add new
+ macros VA_OPEN, VA_CLOSE, and VA_FIXEDARG for nicer variadic
+ function implementation.
+
+2001-08-16 Richard Henderson <rth@redhat.com>
+
+ * hashtab.h (htab_hash_string): Declare.
+
+2001-08-10 Andrew Cagney <ac131313@redhat.com>
+
+ * libiberty.h (lbasename): Change function declaration to return a
+ const char pointer.
+
+2001-08-02 Mark Kettenis <kettenis@gnu.org>
+
+ * xregex.h (_REGEX_RE_COMP): Define.
+ (re_comp): Define to xre_comp.
+ (re_exec): Define to xre_exec.
+
+2001-08-02 Charles Wilson <cwilson@ece.gatech.edu>
+
+ * bfdlink.h (struct bfd_link_info): add new boolean
+ field pei386_auto_import.
+
+2001-07-18 Andreas Jaeger <aj@suse.de>
+
+ * xregex2.h: Place under LGPL version 2.1.
2001-07-10 Jeff Johnston <jjohnstn@redhat.com>
@@ -24,11 +205,6 @@
* ansidecl.h (NULL_PTR): Delete.
-2001-05-11 Jakub Jelinek <jakub@redhat.com>
-
- * elf/ia64.h (ELF_STRING_ia64_unwind_once): Define.
- (ELF_STRING_ia64_unwind_info_once): Define.
-
2001-05-07 Zack Weinberg <zackw@stanford.edu>
* demangle.h: Use PARAMS for all prototypes.
@@ -141,11 +317,11 @@
* getopt.h obstack.h: Standarize copyright statement.
-2000-12-05 Richard Henderson <rth@redhat.com>
+2000-12-04 Richard Henderson <rth@redhat.com>
* demangle.h: Change "new_abi" to "v3" everywhere.
-2000-11-29 Zack Weinberg <zack@wolery.stanford.edu>
+2000-11-22 Zack Weinberg <zack@wolery.stanford.edu>
* libiberty.h: Move #includes to top. Prototype xmalloc_failed.
@@ -1895,7 +2071,7 @@ Fri Oct 25 03:18:20 1991 John Gilmore (gnu at cygnus.com)
Thu Oct 24 22:11:11 1991 John Gilmore (gnu at cygnus.com)
- RS/6000 support, by Metin G. Ozisik, Mimi Phûông-Thåo Võ, and
+ RS/6000 support, by Metin G. Ozisik, Mimi Phûông-Thåo Võ, and
John Gilmore.
* a.out.gnu.h: Update slightly.
diff --git a/include/ansidecl.h b/include/ansidecl.h
index 4ef6db8..9a7c577 100644
--- a/include/ansidecl.h
+++ b/include/ansidecl.h
@@ -1,5 +1,5 @@
/* ANSI and traditional C compatability macros
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -21,164 +21,216 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
ANSI C is assumed if __STDC__ is #defined.
- Macro ANSI C definition Traditional C definition
- ----- ---- - ---------- ----------- - ----------
- PTR `void *' `char *'
- LONG_DOUBLE `long double' `double'
- VOLATILE `volatile' `'
- SIGNED `signed' `'
- PTRCONST `void *const' `char *'
- ANSI_PROTOTYPES 1 not defined
-
- CONST is also defined, but is obsolete. Just use const.
-
- obsolete -- DEFUN (name, arglist, args)
-
- Defines function NAME.
-
- ARGLIST lists the arguments, separated by commas and enclosed in
- parentheses. ARGLIST becomes the argument list in traditional C.
-
- ARGS list the arguments with their types. It becomes a prototype in
- ANSI C, and the type declarations in traditional C. Arguments should
- be separated with `AND'. For functions with a variable number of
- arguments, the last thing listed should be `DOTS'.
-
- obsolete -- DEFUN_VOID (name)
-
- Defines a function NAME, which takes no arguments.
-
- obsolete -- EXFUN (name, (prototype)) -- obsolete.
-
- Replaced by PARAMS. Do not use; will disappear someday soon.
- Was used in external function declarations.
- In ANSI C it is `NAME PROTOTYPE' (so PROTOTYPE should be enclosed in
- parentheses). In traditional C it is `NAME()'.
- For a function that takes no arguments, PROTOTYPE should be `(void)'.
-
- obsolete -- PROTO (type, name, (prototype) -- obsolete.
-
- This one has also been replaced by PARAMS. Do not use.
-
- PARAMS ((args))
-
- We could use the EXFUN macro to handle prototype declarations, but
- the name is misleading and the result is ugly. So we just define a
- simple macro to handle the parameter lists, as in:
-
- static int foo PARAMS ((int, char));
-
- This produces: `static int foo();' or `static int foo (int, char);'
-
- EXFUN would have done it like this:
-
- static int EXFUN (foo, (int, char));
-
- but the function is not external...and it's hard to visually parse
- the function name out of the mess. EXFUN should be considered
- obsolete; new code should be written to use PARAMS.
-
- DOTS is also obsolete.
-
- Examples:
-
- extern int printf PARAMS ((const char *format, ...));
-*/
+ Macro ANSI C definition Traditional C definition
+ ----- ---- - ---------- ----------- - ----------
+ ANSI_PROTOTYPES 1 not defined
+ PTR `void *' `char *'
+ PTRCONST `void *const' `char *'
+ LONG_DOUBLE `long double' `double'
+ const not defined `'
+ volatile not defined `'
+ signed not defined `'
+ VA_START(ap, var) va_start(ap, var) va_start(ap)
+
+ Note that it is safe to write "void foo();" indicating a function
+ with no return value, in all K+R compilers we have been able to test.
+
+ For declaring functions with prototypes, we also provide these:
+
+ PARAMS ((prototype))
+ -- for functions which take a fixed number of arguments. Use this
+ when declaring the function. When defining the function, write a
+ K+R style argument list. For example:
+
+ char *strcpy PARAMS ((char *dest, char *source));
+ ...
+ char *
+ strcpy (dest, source)
+ char *dest;
+ char *source;
+ { ... }
+
+
+ VPARAMS ((prototype, ...))
+ -- for functions which take a variable number of arguments. Use
+ PARAMS to declare the function, VPARAMS to define it. For example:
+
+ int printf PARAMS ((const char *format, ...));
+ ...
+ int
+ printf VPARAMS ((const char *format, ...))
+ {
+ ...
+ }
+
+ For writing functions which take variable numbers of arguments, we
+ also provide the VA_OPEN, VA_CLOSE, and VA_FIXEDARG macros. These
+ hide the differences between K+R <varargs.h> and C89 <stdarg.h> more
+ thoroughly than the simple VA_START() macro mentioned above.
+
+ VA_OPEN and VA_CLOSE are used *instead of* va_start and va_end.
+ Immediately after VA_OPEN, put a sequence of VA_FIXEDARG calls
+ corresponding to the list of fixed arguments. Then use va_arg
+ normally to get the variable arguments, or pass your va_list object
+ around. You do not declare the va_list yourself; VA_OPEN does it
+ for you.
+
+ Here is a complete example:
+
+ int
+ printf VPARAMS ((const char *format, ...))
+ {
+ int result;
+
+ VA_OPEN (ap, format);
+ VA_FIXEDARG (ap, const char *, format);
+
+ result = vfprintf (stdout, format, ap);
+ VA_CLOSE (ap);
+
+ return result;
+ }
+
+
+ You can declare variables either before or after the VA_OPEN,
+ VA_FIXEDARG sequence. Also, VA_OPEN and VA_CLOSE are the beginning
+ and end of a block. They must appear at the same nesting level,
+ and any variables declared after VA_OPEN go out of scope at
+ VA_CLOSE. Unfortunately, with a K+R compiler, that includes the
+ argument list. You can have multiple instances of VA_OPEN/VA_CLOSE
+ pairs in a single function in case you need to traverse the
+ argument list more than once.
+
+ For ease of writing code which uses GCC extensions but needs to be
+ portable to other compilers, we provide the GCC_VERSION macro that
+ simplifies testing __GNUC__ and __GNUC_MINOR__ together, and various
+ wrappers around __attribute__. Also, __extension__ will be #defined
+ to nothing if it doesn't work. See below.
+
+ This header also defines a lot of obsolete macros:
+ CONST, VOLATILE, SIGNED, PROTO, EXFUN, DEFUN, DEFUN_VOID,
+ AND, DOTS, NOARGS. Don't use them. */
#ifndef _ANSIDECL_H
-
-#define _ANSIDECL_H 1
-
+#define _ANSIDECL_H 1
/* Every source file includes this file,
so they will all get the switch for lint. */
/* LINTLIBRARY */
+/* Using MACRO(x,y) in cpp #if conditionals does not work with some
+ older preprocessors. Thus we can't define something like this:
+
+#define HAVE_GCC_VERSION(MAJOR, MINOR) \
+ (__GNUC__ > (MAJOR) || (__GNUC__ == (MAJOR) && __GNUC_MINOR__ >= (MINOR)))
+
+and then test "#if HAVE_GCC_VERSION(2,7)".
+
+So instead we use the macro below and test it against specific values. */
+
+/* This macro simplifies testing whether we are using gcc, and if it
+ is of a particular minimum version. (Both major & minor numbers are
+ significant.) This macro will evaluate to 0 if we are not using
+ gcc at all. */
+#ifndef GCC_VERSION
+#define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
+#endif /* GCC_VERSION */
#if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(_WIN32)
/* All known AIX compilers implement these things (but don't always
define __STDC__). The RISC/OS MIPS compiler defines these things
in SVR4 mode, but does not define __STDC__. */
-#define PTR void *
-#define PTRCONST void *CONST
-#define LONG_DOUBLE long double
-
-#ifndef IN_GCC
-#define AND ,
-#define NOARGS void
-#define VOLATILE volatile
-#define SIGNED signed
-#endif /* ! IN_GCC */
-
-#define PARAMS(paramlist) paramlist
-#define ANSI_PROTOTYPES 1
-
-#define VPARAMS(ARGS) ARGS
-#define VA_START(va_list,var) va_start(va_list,var)
+#define ANSI_PROTOTYPES 1
+#define PTR void *
+#define PTRCONST void *const
+#define LONG_DOUBLE long double
+
+#define PARAMS(ARGS) ARGS
+#define VPARAMS(ARGS) ARGS
+#define VA_START(VA_LIST, VAR) va_start(VA_LIST, VAR)
+
+/* variadic function helper macros */
+/* "struct Qdmy" swallows the semicolon after VA_OPEN/VA_FIXEDARG's
+ use without inhibiting further decls and without declaring an
+ actual variable. */
+#define VA_OPEN(AP, VAR) { va_list AP; va_start(AP, VAR); { struct Qdmy
+#define VA_CLOSE(AP) } va_end(AP); }
+#define VA_FIXEDARG(AP, T, N) struct Qdmy
+
+#undef const
+#undef volatile
+#undef signed
+
+/* inline requires special treatment; it's in C99, and GCC >=2.7 supports
+ it too, but it's not in C89. */
+#undef inline
+#if __STDC_VERSION__ > 199901L
+/* it's a keyword */
+#else
+# if GCC_VERSION >= 2007
+# define inline __inline__ /* __inline__ prevents -pedantic warnings */
+# else
+# define inline /* nothing */
+# endif
+#endif
/* These are obsolete. Do not use. */
#ifndef IN_GCC
-#define CONST const
-#define DOTS , ...
+#define CONST const
+#define VOLATILE volatile
+#define SIGNED signed
+
#define PROTO(type, name, arglist) type name arglist
#define EXFUN(name, proto) name proto
#define DEFUN(name, arglist, args) name(args)
#define DEFUN_VOID(name) name(void)
+#define AND ,
+#define DOTS , ...
+#define NOARGS void
#endif /* ! IN_GCC */
#else /* Not ANSI C. */
-#define PTR char *
-#define PTRCONST PTR
-#define LONG_DOUBLE double
+#undef ANSI_PROTOTYPES
+#define PTR char *
+#define PTRCONST PTR
+#define LONG_DOUBLE double
+
+#define PARAMS(args) ()
+#define VPARAMS(args) (va_alist) va_dcl
+#define VA_START(va_list, var) va_start(va_list)
+
+#define VA_OPEN(AP, VAR) { va_list AP; va_start(AP); { struct Qdmy
+#define VA_CLOSE(AP) } va_end(AP); }
+#define VA_FIXEDARG(AP, TYPE, NAME) TYPE NAME = va_arg(AP, TYPE)
+
+/* some systems define these in header files for non-ansi mode */
+#undef const
+#undef volatile
+#undef signed
+#undef inline
+#define const
+#define volatile
+#define signed
+#define inline
#ifndef IN_GCC
-#define AND ;
-#define NOARGS
-#define VOLATILE
-#define SIGNED
-#endif /* !IN_GCC */
-
-#ifndef const /* some systems define it in header files for non-ansi mode */
-#define const
-#endif
-
-#define PARAMS(paramlist) ()
-
-#define VPARAMS(ARGS) (va_alist) va_dcl
-#define VA_START(va_list,var) va_start(va_list)
-
-/* These are obsolete. Do not use. */
-#ifndef IN_GCC
#define CONST
-#define DOTS
+#define VOLATILE
+#define SIGNED
+
#define PROTO(type, name, arglist) type name ()
#define EXFUN(name, proto) name()
#define DEFUN(name, arglist, args) name arglist args;
#define DEFUN_VOID(name) name()
+#define AND ;
+#define DOTS
+#define NOARGS
#endif /* ! IN_GCC */
#endif /* ANSI C. */
-/* Using MACRO(x,y) in cpp #if conditionals does not work with some
- older preprocessors. Thus we can't define something like this:
-
-#define HAVE_GCC_VERSION(MAJOR, MINOR) \
- (__GNUC__ > (MAJOR) || (__GNUC__ == (MAJOR) && __GNUC_MINOR__ >= (MINOR)))
-
-and then test "#if HAVE_GCC_VERSION(2,7)".
-
-So instead we use the macro below and test it against specific values. */
-
-/* This macro simplifies testing whether we are using gcc, and if it
- is of a particular minimum version. (Both major & minor numbers are
- significant.) This macro will evaluate to 0 if we are not using
- gcc at all. */
-#ifndef GCC_VERSION
-#define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
-#endif /* GCC_VERSION */
-
/* Define macros for some gcc attributes. This permits us to use the
macros freely, and know that they will come into play for the
version of gcc in which they are supported. */
@@ -229,20 +281,12 @@ So instead we use the macro below and test it against specific values. */
#define __extension__
#endif
-/* Bootstrap support: Autoconf will possibly define the `inline' or
- `const' keywords as macros, however this is only valid for the
- stage1 compiler. If we detect a modern version of gcc,
- unconditionally reset the values. This makes sure the right thing
- happens in stage2 and later. We need to do this very early;
- i.e. before any header files that might use these keywords.
- Otherwise conflicts might occur. */
-
+/* Bootstrap support: Adjust certain macros defined by Autoconf,
+ which are only valid for the stage1 compiler. If we detect
+ a modern version of GCC, we are probably in stage2 or beyond,
+ so unconditionally reset the values. Note that const, inline,
+ etc. have been dealt with above. */
#if (GCC_VERSION >= 2007)
-# ifdef __STDC__
-# undef const
-# endif
-# undef inline
-# define inline __inline__ /* __inline__ prevents -pedantic warnings */
# ifndef HAVE_LONG_DOUBLE
# define HAVE_LONG_DOUBLE 1
# endif
diff --git a/include/aout/ChangeLog b/include/aout/ChangeLog
index f107b84..d215c59 100644
--- a/include/aout/ChangeLog
+++ b/include/aout/ChangeLog
@@ -1,3 +1,11 @@
+2001-09-18 Alan Modra <amodra@bigpond.net.au>
+
+ * aout64.h: Formatting fixes.
+ (N_TXTADDR): Evaluate to a bfd_vma.
+ (N_DATADDR): Avoid negative unsigned warning.
+ * hp300hpux.h: Formatting fixes.
+ (N_DATADDR): Avoid negative unsigned warning.
+
Mon Apr 3 13:29:08 2000 Hans-Peter Nilsson <hp@axis.com>
* aout64.h (RELOC_EXT_BITS_EXTERN_BIG): Wrap definition in #ifndef.
diff --git a/include/aout/aout64.h b/include/aout/aout64.h
index a8a8cd1..bc96d2a 100644
--- a/include/aout/aout64.h
+++ b/include/aout/aout64.h
@@ -131,7 +131,8 @@ struct external_exec
/* This macro is only relevant for ZMAGIC files; QMAGIC always has the header
in the text. */
#ifndef N_HEADER_IN_TEXT
-#define N_HEADER_IN_TEXT(x) (((x).a_entry & (TARGET_PAGE_SIZE-1)) >= EXEC_BYTES_SIZE)
+#define N_HEADER_IN_TEXT(x) \
+ (((x).a_entry & (TARGET_PAGE_SIZE-1)) >= EXEC_BYTES_SIZE)
#endif
/* Sun shared libraries, not linux. This macro is only relevant for ZMAGIC
@@ -151,15 +152,17 @@ struct external_exec
#ifndef N_TXTADDR
#define N_TXTADDR(x) \
- (/* The address of a QMAGIC file is always one page in, */ \
- /* with the header in the text. */ \
- N_IS_QMAGIC (x) ? TARGET_PAGE_SIZE + EXEC_BYTES_SIZE : \
- N_MAGIC(x) != ZMAGIC ? 0 : /* object file or NMAGIC */\
- N_SHARED_LIB(x) ? 0 : \
- N_HEADER_IN_TEXT(x) ? \
- TEXT_START_ADDR + EXEC_BYTES_SIZE : /* no padding */\
- TEXT_START_ADDR /* a page of padding */\
- )
+ (/* The address of a QMAGIC file is always one page in, */ \
+ /* with the header in the text. */ \
+ N_IS_QMAGIC (x) \
+ ? (bfd_vma) TARGET_PAGE_SIZE + EXEC_BYTES_SIZE \
+ : (N_MAGIC (x) != ZMAGIC \
+ ? (bfd_vma) 0 /* object file or NMAGIC */ \
+ : (N_SHARED_LIB (x) \
+ ? (bfd_vma) 0 \
+ : (N_HEADER_IN_TEXT (x) \
+ ? (bfd_vma) TEXT_START_ADDR + EXEC_BYTES_SIZE \
+ : (bfd_vma) TEXT_START_ADDR))))
#endif
/* If N_HEADER_IN_TEXT is not true for ZMAGIC, there is some padding
@@ -177,14 +180,15 @@ struct external_exec
/* Offset in an a.out of the start of the text section. */
#ifndef N_TXTOFF
-#define N_TXTOFF(x) \
- (/* For {O,N,Q}MAGIC, no padding. */ \
- N_MAGIC(x) != ZMAGIC ? EXEC_BYTES_SIZE : \
- N_SHARED_LIB(x) ? 0 : \
- N_HEADER_IN_TEXT(x) ? \
- EXEC_BYTES_SIZE : /* no padding */\
- ZMAGIC_DISK_BLOCK_SIZE /* a page of padding */\
- )
+#define N_TXTOFF(x) \
+ (/* For {O,N,Q}MAGIC, no padding. */ \
+ N_MAGIC (x) != ZMAGIC \
+ ? EXEC_BYTES_SIZE \
+ : (N_SHARED_LIB (x) \
+ ? 0 \
+ : (N_HEADER_IN_TEXT (x) \
+ ? EXEC_BYTES_SIZE /* no padding */ \
+ : ZMAGIC_DISK_BLOCK_SIZE /* a page of padding */)))
#endif
/* Size of the text section. It's always as stated, except that we
offset it to `undo' the adjustment to N_TXTADDR and N_TXTOFF
@@ -193,25 +197,28 @@ struct external_exec
exec header to be part of the text segment.) */
#ifndef N_TXTSIZE
#define N_TXTSIZE(x) \
- (/* For QMAGIC, we don't consider the header part of the text section. */\
- N_IS_QMAGIC (x) ? (x).a_text - EXEC_BYTES_SIZE : \
- (N_MAGIC(x) != ZMAGIC || N_SHARED_LIB(x)) ? (x).a_text : \
- N_HEADER_IN_TEXT(x) ? \
- (x).a_text - EXEC_BYTES_SIZE: /* no padding */\
- (x).a_text /* a page of padding */\
- )
+ (/* For QMAGIC, we don't consider the header part of the text section. */\
+ N_IS_QMAGIC (x) \
+ ? (x).a_text - EXEC_BYTES_SIZE \
+ : ((N_MAGIC (x) != ZMAGIC || N_SHARED_LIB (x)) \
+ ? (x).a_text \
+ : (N_HEADER_IN_TEXT (x) \
+ ? (x).a_text - EXEC_BYTES_SIZE /* no padding */ \
+ : (x).a_text /* a page of padding */ )))
#endif
/* The address of the data segment in virtual memory.
It is the text segment address, plus text segment size, rounded
up to a N_SEGSIZE boundary for pure or pageable files. */
#ifndef N_DATADDR
#define N_DATADDR(x) \
- (N_MAGIC(x)==OMAGIC? (N_TXTADDR(x)+N_TXTSIZE(x)) \
- : (N_SEGSIZE(x) + ((N_TXTADDR(x)+N_TXTSIZE(x)-1) & ~(N_SEGSIZE(x)-1))))
+ (N_MAGIC (x) == OMAGIC \
+ ? (N_TXTADDR (x) + N_TXTSIZE (x)) \
+ : (N_SEGSIZE (x) + ((N_TXTADDR (x) + N_TXTSIZE (x) - 1) \
+ & ~ (bfd_vma) (N_SEGSIZE (x) - 1))))
#endif
/* The address of the BSS segment -- immediately after the data segment. */
-#define N_BSSADDR(x) (N_DATADDR(x) + (x).a_data)
+#define N_BSSADDR(x) (N_DATADDR (x) + (x).a_data)
/* Offsets of the various portions of the file after the text segment. */
@@ -228,21 +235,19 @@ struct external_exec
for NMAGIC. */
#ifndef N_DATOFF
-#define N_DATOFF(x) \
- (N_TXTOFF(x) + N_TXTSIZE(x))
+#define N_DATOFF(x) ( N_TXTOFF (x) + N_TXTSIZE (x) )
#endif
-
#ifndef N_TRELOFF
-#define N_TRELOFF(x) ( N_DATOFF(x) + (x).a_data )
+#define N_TRELOFF(x) ( N_DATOFF (x) + (x).a_data )
#endif
#ifndef N_DRELOFF
-#define N_DRELOFF(x) ( N_TRELOFF(x) + (x).a_trsize )
+#define N_DRELOFF(x) ( N_TRELOFF (x) + (x).a_trsize )
#endif
#ifndef N_SYMOFF
-#define N_SYMOFF(x) ( N_DRELOFF(x) + (x).a_drsize )
+#define N_SYMOFF(x) ( N_DRELOFF (x) + (x).a_drsize )
#endif
#ifndef N_STROFF
-#define N_STROFF(x) ( N_SYMOFF(x) + (x).a_syms )
+#define N_STROFF(x) ( N_SYMOFF (x) + (x).a_syms )
#endif
/* Symbols */
diff --git a/include/aout/hp300hpux.h b/include/aout/hp300hpux.h
index b4ad093..1174761 100644
--- a/include/aout/hp300hpux.h
+++ b/include/aout/hp300hpux.h
@@ -1,5 +1,5 @@
/* Special version of <a.out.h> for use under hp-ux.
- Copyright 1988, 1993, 1995 Free Software Foundation, Inc. */
+ Copyright 1988, 1993, 1995, 2001 Free Software Foundation, Inc. */
struct hp300hpux_exec_bytes
{
@@ -73,13 +73,13 @@ struct hp300hpux_header_extension
#define N_BADMAG(x) ((_N_BADMAG (x)) || (_N_BADMACH (x)))
#define N_DATADDR(x) \
- ((N_MAGIC(x)==OMAGIC || N_MAGIC(x)==HPUX_DOT_O_MAGIC) ? \
- (N_TXTADDR(x)+N_TXTSIZE(x)) \
- : (N_SEGSIZE(x) + ((N_TXTADDR(x)+N_TXTSIZE(x)-1) & ~(N_SEGSIZE(x)-1))))
+ ((N_MAGIC (x) == OMAGIC || N_MAGIC (x) == HPUX_DOT_O_MAGIC) \
+ ? (N_TXTADDR (x) + N_TXTSIZE (x)) \
+ : (N_SEGSIZE (x) + ((N_TXTADDR (x) + N_TXTSIZE (x) - 1) \
+ & ~ (bfd_vma) (N_SEGSIZE (x) - 1))))
-#define _N_BADMACH(x) \
-(((N_MACHTYPE (x)) != HP9000S200_ID) && \
- ((N_MACHTYPE (x)) != HP98x6_ID))
+#define _N_BADMACH(x) \
+ (((N_MACHTYPE (x)) != HP9000S200_ID) && ((N_MACHTYPE (x)) != HP98x6_ID))
#define _N_BADMAG(x) (N_MAGIC(x) != HPUX_DOT_O_MAGIC \
&& N_MAGIC(x) != OMAGIC \
diff --git a/include/bfdlink.h b/include/bfdlink.h
index 3308f82..c02a1e8 100644
--- a/include/bfdlink.h
+++ b/include/bfdlink.h
@@ -41,6 +41,15 @@ enum bfd_link_discard
discard_l, /* Discard local temporary symbols. */
discard_all /* Discard all locals. */
};
+
+/* Describes the type of hash table entry structure being used.
+ Different hash table structure have different fields and so
+ support different linking features. */
+enum bfd_link_hash_table_type
+ {
+ bfd_link_generic_hash_table,
+ bfd_link_elf_hash_table
+ };
/* These are the possible types of an entry in the BFD link hash
table. */
@@ -146,6 +155,8 @@ struct bfd_link_hash_table
struct bfd_link_hash_entry *undefs;
/* Entries are added to the tail of the undefs list. */
struct bfd_link_hash_entry *undefs_tail;
+ /* The type of the ink hash table. */
+ enum bfd_link_hash_table_type type;
};
/* Look up an entry in a link hash table. If FOLLOW is true, this
@@ -274,6 +285,25 @@ struct bfd_link_info
/* May be used to set DT_FLAGS_1 for ELF. */
bfd_vma flags_1;
+
+ /* True if auto-import thunks for DATA items in pei386 DLLs
+ should be generated/linked against. */
+ boolean pei386_auto_import;
+
+ /* True if non-PLT relocs should be merged into one reloc section
+ and sorted so that relocs against the same symbol come together. */
+ boolean combreloc;
+
+ /* True if executable should not contain copy relocs.
+ Setting this true may result in a non-sharable text segment. */
+ boolean nocopyreloc;
+
+ /* True if .eh_frame_hdr section and PT_GNU_EH_FRAME ELF segment
+ should be created. */
+ boolean eh_frame_hdr;
+
+ /* How many spare .dynamic DT_NULL entries should be added? */
+ unsigned int spare_dynamic_tags;
};
/* This structures holds a set of callback functions. These are
diff --git a/include/coff/ChangeLog b/include/coff/ChangeLog
index 712ecc1..79e8e18 100644
--- a/include/coff/ChangeLog
+++ b/include/coff/ChangeLog
@@ -1,3 +1,70 @@
+2002-02-01 Tom Rix <trix@redhat.com>
+
+ * xcoff.h: Conditionally support <aiaff> for pre AIX 4.3.
+
+2002-01-31 Ivan Guzvinec <ivang@opencores.org>
+
+ * or32.h: New file.
+
+2001-12-24 Tom Rix <trix@redhat.com>
+
+ * xcoff.h (xcoff_big_format_p): Make <bigaf> the default archive
+ format.
+ (XCOFFARMAG_ELEMENT_SIZE, XCOFFARMAGBIG_ELEMENT_SIZE): Define for
+ archive header ascii elements.
+
+2001-12-17 Tom Rix <trix@redhat.com>
+
+ * xcoff.h : Add .except and .typchk section string and styp flags.
+ Fix xcoff_big_format_p macro.
+
+2001-12-16 Tom Rix <trix@redhat.com>
+
+ * xcoff.h : Clean up formatting.
+
+2002-01-15 Richard Earnshaw <rearnsha@arm.com>
+
+ * arm.h (F_VFP_FLOAT): Define.
+
+2001-11-11 Timothy Wall <twall@alum.mit.edu>
+
+ * ti.h: Move arch-specific stuff from here...
+ (COFF_ADJUST_SYM_IN/OUT): Optionally put page flag into symbol
+ value.
+ * tic54x.h: ...to here.
+
+2001-10-26 Christian Groessler <cpg@aladdin.de>
+
+ * external.h (GET_LINENO_LNNO): Fix usage of H_GET_32/16.
+ (PUT_LINENO_LNNO): Likewise with H_PUT_32/16.
+
+2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * ti.h (GET_SCNHDR_PAGE): Fix compile time warning.
+
+2001-09-18 Alan Modra <amodra@bigpond.net.au>
+
+ * external.h (GET_LINENO_LNNO): Use H_GET_32/16.
+ (PUT_LINENO_LNNO): Use H_PUT_32/16.
+ * m88k.h (GET_LNSZ_SIZE, GET_LNSZ_LNNO, GET_SCN_NRELOC,
+ GET_SCN_NLINNO): Use H_GET_32.
+ (PUT_LNSZ_LNNO, PUT_LNSZ_SIZE, PUT_SCN_NRELOC, PUT_SCN_NLINNO):
+ Use H_PUT_32.
+ * ti.h: Formatting fixes. Make use of H_GET_* and H_PUT_* throughout.
+ * xcoff.h: White space changes.
+
+2001-09-05 Tom Rix <trix@redhat.com>
+
+ * xcoff.h : Add XCOFF_SYSCALL32 and XCOFF_SYSCALL64 hash table flags.
+
+2001-08-27 Andreas Jaeger <aj@suse.de>
+
+ * xcoff.h (struct __rtinit): Make proper prototype for rtl.
+
+Fri Aug 24 01:18:51 2001 J"orn Rennecke <amylaar@redhat.com>
+
+ * internal.h (R_JMP2, R_JMPL2, R_MOVL2): Comment spelling fix.
+
2001-04-05 Tom Rix <trix@redhat.com>
* rs6000.h : move xcoff32 external structures from xcofflink.
diff --git a/include/coff/arm.h b/include/coff/arm.h
index 77830ca..bcfdcbe 100644
--- a/include/coff/arm.h
+++ b/include/coff/arm.h
@@ -1,5 +1,5 @@
/* ARM COFF support for BFD.
- Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -50,6 +50,7 @@
#define F_APCS_26 (0x0400)
#define F_APCS_SET (0x0800)
#define F_SOFT_FLOAT (0x2000)
+#define F_VFP_FLOAT (0x4000)
/* Bits stored in flags field of the internal_f structure */
diff --git a/include/coff/external.h b/include/coff/external.h
index 6fd41f1..19636da 100644
--- a/include/coff/external.h
+++ b/include/coff/external.h
@@ -113,12 +113,12 @@ struct external_lineno
#define LINESZ (4 + L_LNNO_SIZE)
#if L_LNNO_SIZE == 4
-#define GET_LINENO_LNNO(abfd, ext) bfd_h_get_32 (abfd, (bfd_byte *) (ext->l_lnno));
-#define PUT_LINENO_LNNO(abfd, val, ext) bfd_h_put_32 (abfd, val, (bfd_byte *) (ext->l_lnno));
+#define GET_LINENO_LNNO(abfd, ext) H_GET_32 (abfd, (ext->l_lnno))
+#define PUT_LINENO_LNNO(abfd, val, ext) H_PUT_32 (abfd, val, (ext->l_lnno))
#endif
#if L_LNNO_SIZE == 2
-#define GET_LINENO_LNNO(abfd, ext) bfd_h_get_16 (abfd, (bfd_byte *) (ext->l_lnno));
-#define PUT_LINENO_LNNO(abfd,val, ext) bfd_h_put_16 (abfd,val, (bfd_byte *) (ext->l_lnno));
+#define GET_LINENO_LNNO(abfd, ext) H_GET_16 (abfd, (ext->l_lnno))
+#define PUT_LINENO_LNNO(abfd, val, ext) H_PUT_16 (abfd, val, (ext->l_lnno))
#endif
#endif /* not DO_NOT_DEFINE_LINENO */
diff --git a/include/coff/internal.h b/include/coff/internal.h
index bc62b06..4babbd4 100644
--- a/include/coff/internal.h
+++ b/include/coff/internal.h
@@ -639,7 +639,7 @@ struct internal_reloc
#define R_JMP1 0x43
/* This reloc identifies a bra with an 8-bit pc-relative
- target that was formerlly a jmp insn with a 16bit target. */
+ target that was formerly a jmp insn with a 16bit target. */
#define R_JMP2 0x44
/* ??? */
@@ -651,7 +651,7 @@ struct internal_reloc
#define R_JMPL1 0x46
/* This reloc identifies a bra with an 8-bit pc-relative
- target that was formerlly a jmp insn with a 24bit target. */
+ target that was formerly a jmp insn with a 24bit target. */
#define R_JMPL2 0x47
/* This reloc identifies mov.b instructions with a 24bit absolute
@@ -679,7 +679,7 @@ struct internal_reloc
insn with a 16bit absolute address. */
#define R_MOVL1 0x4c
-/* This reloc identifies mov.[wl] insns which formerlly had
+/* This reloc identifies mov.[wl] insns which formerly had
a 32/24bit absolute address and now have a 16bit absolute address. */
#define R_MOVL2 0x4d
diff --git a/include/coff/m88k.h b/include/coff/m88k.h
index 3863564..331d97c 100644
--- a/include/coff/m88k.h
+++ b/include/coff/m88k.h
@@ -158,20 +158,22 @@ union external_auxent
} x_tv; /* info about .tv section (in auxent of symbol .tv)) */
};
-#define GET_FCN_LNNOPTR(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *)ext->x_sym.x_fcnary.x_fcn.x_lnnoptr)
-#define GET_FCN_ENDNDX(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) ext->x_sym.x_fcnary.x_fcn.x_endndx)
-#define PUT_FCN_LNNOPTR(abfd, in, ext) bfd_h_put_32(abfd, in, (bfd_byte *) ext->x_sym.x_fcnary.x_fcn.x_lnnoptr)
-#define PUT_FCN_ENDNDX(abfd, in, ext) bfd_h_put_32(abfd, in, (bfd_byte *) ext->x_sym.x_fcnary.x_fcn.x_endndx)
-#define GET_LNSZ_SIZE(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) ext->x_sym.x_misc.x_lnsz.x_size)
-#define GET_LNSZ_LNNO(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) ext->x_sym.x_misc.x_lnsz.x_lnno)
-#define PUT_LNSZ_LNNO(abfd, in, ext) bfd_h_put_32(abfd, in, (bfd_byte *) ext->x_sym.x_misc.x_lnsz.x_lnno)
-#define PUT_LNSZ_SIZE(abfd, in, ext) bfd_h_put_32(abfd, in, (bfd_byte *) ext->x_sym.x_misc.x_lnsz.x_size)
-#define GET_SCN_SCNLEN(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) ext->x_scn.x_scnlen)
-#define GET_SCN_NRELOC(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) ext->x_scn.x_nreloc)
-#define GET_SCN_NLINNO(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) ext->x_scn.x_nlinno)
-#define PUT_SCN_SCNLEN(abfd,in, ext) bfd_h_put_32(abfd, in, (bfd_byte *) ext->x_scn.x_scnlen)
-#define PUT_SCN_NRELOC(abfd,in, ext) bfd_h_put_32(abfd, in, (bfd_byte *)ext->x_scn.x_nreloc)
-#define PUT_SCN_NLINNO(abfd,in, ext) bfd_h_put_32(abfd,in, (bfd_byte *) ext->x_scn.x_nlinno)
+#define GET_LNSZ_SIZE(abfd, ext) \
+ H_GET_32 (abfd, ext->x_sym.x_misc.x_lnsz.x_size)
+#define GET_LNSZ_LNNO(abfd, ext) \
+ H_GET_32 (abfd, ext->x_sym.x_misc.x_lnsz.x_lnno)
+#define PUT_LNSZ_LNNO(abfd, in, ext) \
+ H_PUT_32 (abfd, in, ext->x_sym.x_misc.x_lnsz.x_lnno)
+#define PUT_LNSZ_SIZE(abfd, in, ext) \
+ H_PUT_32 (abfd, in, ext->x_sym.x_misc.x_lnsz.x_size)
+#define GET_SCN_NRELOC(abfd, ext) \
+ H_GET_32 (abfd, ext->x_scn.x_nreloc)
+#define GET_SCN_NLINNO(abfd, ext) \
+ H_GET_32 (abfd, ext->x_scn.x_nlinno)
+#define PUT_SCN_NRELOC(abfd, in, ext) \
+ H_PUT_32 (abfd, in, ext->x_scn.x_nreloc)
+#define PUT_SCN_NLINNO(abfd, in, ext) \
+ H_PUT_32 (abfd,in, ext->x_scn.x_nlinno)
#define SYMENT struct external_syment
#define SYMESZ 20
diff --git a/include/coff/or32.h b/include/coff/or32.h
new file mode 100644
index 0000000..c2797aa
--- /dev/null
+++ b/include/coff/or32.h
@@ -0,0 +1,287 @@
+/* COFF specification for OpenRISC 1000.
+ Copyright (C) 1993-2000, 2002 Free Software Foundation, Inc.
+ Contributed by David Wood @ New York University.
+ Modified by Johan Rydberg, <johan.rydberg@netinsight.se>
+
+ 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 OR32
+# define OR32
+#endif
+
+/* File Header and related definitions. */
+struct external_filehdr
+{
+ char f_magic[2]; /* magic number */
+ char f_nscns[2]; /* number of sections */
+ char f_timdat[4]; /* time & date stamp */
+ char f_symptr[4]; /* file pointer to symtab */
+ char f_nsyms[4]; /* number of symtab entries */
+ char f_opthdr[2]; /* sizeof(optional hdr) */
+ char f_flags[2]; /* flags */
+};
+
+#define FILHDR struct external_filehdr
+#define FILHSZ 20
+
+/* Magic numbers for OpenRISC 1000. As it is know we use the
+ numbers for Am29000.
+
+ (AT&T will assign the "real" magic number). */
+#define SIPFBOMAGIC 0572 /* Am29000 (Byte 0 is MSB). */
+#define SIPRBOMAGIC 0573 /* Am29000 (Byte 0 is LSB). */
+
+#define OR32_MAGIC_BIG SIPFBOMAGIC
+#define OR32_MAGIC_LITTLE SIPRBOMAGIC
+#define OR32BADMAG(x) (((x).f_magic!=OR32_MAGIC_BIG) && \
+ ((x).f_magic!=OR32_MAGIC_LITTLE))
+
+#define OMAGIC OR32_MAGIC_BIG
+
+/* Optional (a.out) header. */
+typedef struct external_aouthdr
+{
+ char magic[2]; /* type of file */
+ char vstamp[2]; /* version stamp */
+ char tsize[4]; /* text size in bytes, padded to FW bdry */
+ char dsize[4]; /* initialized data " " */
+ char bsize[4]; /* uninitialized data " " */
+ char entry[4]; /* entry pt. */
+ char text_start[4]; /* base of text used for this file */
+ char data_start[4]; /* base of data used for this file */
+} AOUTHDR;
+
+#define AOUTSZ 28
+#define AOUTHDRSZ 28
+
+/* aouthdr magic numbers. */
+#define NMAGIC 0410 /* separate i/d executable. */
+#define SHMAGIC 0406 /* NYU/Ultra3 shared data executable
+ (writable text). */
+
+#define _ETEXT "_etext"
+
+/* Section header and related definitions. */
+struct external_scnhdr
+{
+ char s_name[8]; /* section name */
+ char s_paddr[4]; /* physical address, aliased s_nlib */
+ char s_vaddr[4]; /* virtual address */
+ char s_size[4]; /* section size */
+ char s_scnptr[4]; /* file ptr to raw data for section */
+ char s_relptr[4]; /* file ptr to relocation */
+ char s_lnnoptr[4]; /* file ptr to line numbers */
+ char s_nreloc[2]; /* number of relocation entries */
+ char s_nlnno[2]; /* number of line number entries */
+ char s_flags[4]; /* flags */
+};
+
+#define SCNHDR struct external_scnhdr
+#define SCNHSZ 40
+
+/* Names of "special" sections: */
+#define _TEXT ".text"
+#define _DATA ".data"
+#define _BSS ".bss"
+#define _LIT ".lit"
+
+/* Section types - with additional section type for global
+ registers which will be relocatable for the OpenRISC 1000.
+
+ In instances where it is necessary for a linker to produce an
+ output file which contains text or data not based at virtual
+ address 0, e.g. for a ROM, then the linker should accept
+ address base information as command input and use PAD sections
+ to skip over unused addresses. */
+#define STYP_BSSREG 0x1200 /* Global register area (like STYP_INFO) */
+#define STYP_ENVIR 0x2200 /* Environment (like STYP_INFO) */
+#define STYP_ABS 0x4000 /* Absolute (allocated, not reloc, loaded) */
+
+/* Relocation information declaration and related definitions: */
+struct external_reloc
+{
+ char r_vaddr[4]; /* (virtual) address of reference */
+ char r_symndx[4]; /* index into symbol table */
+ char r_type[2]; /* relocation type */
+};
+
+#define RELOC struct external_reloc
+#define RELSZ 10 /* sizeof (RELOC) */
+
+/* Relocation types for the OpenRISC 1000: */
+
+#define R_ABS 0 /* reference is absolute */
+#define R_IREL 030 /* instruction relative (jmp/call) */
+#define R_IABS 031 /* instruction absolute (jmp/call) */
+#define R_ILOHALF 032 /* instruction low half (const) */
+#define R_IHIHALF 033 /* instruction high half (consth) part 1 */
+#define R_IHCONST 034 /* instruction high half (consth) part 2 */
+ /* constant offset of R_IHIHALF relocation */
+#define R_BYTE 035 /* relocatable byte value */
+#define R_HWORD 036 /* relocatable halfword value */
+#define R_WORD 037 /* relocatable word value */
+
+#define R_IGLBLRC 040 /* instruction global register RC */
+#define R_IGLBLRA 041 /* instruction global register RA */
+#define R_IGLBLRB 042 /* instruction global register RB */
+
+/*
+ NOTE:
+ All the "I" forms refer to 29000 instruction formats. The linker is
+ expected to know how the numeric information is split and/or aligned
+ within the instruction word(s). R_BYTE works for instructions, too.
+
+ If the parameter to a CONSTH instruction is a relocatable type, two
+ relocation records are written. The first has an r_type of R_IHIHALF
+ (33 octal) and a normal r_vaddr and r_symndx. The second relocation
+ record has an r_type of R_IHCONST (34 octal), a normal r_vaddr (which
+ is redundant), and an r_symndx containing the 32-bit constant offset
+ to the relocation instead of the actual symbol table index. This
+ second record is always written, even if the constant offset is zero.
+ The constant fields of the instruction are set to zero. */
+
+/* Line number entry declaration and related definitions: */
+struct external_lineno
+{
+ union
+ {
+ char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/
+ char l_paddr[4]; /* (physical) address of line number */
+ }
+ l_addr;
+
+ char l_lnno[2]; /* line number */
+};
+
+#define LINENO struct external_lineno
+#define LINESZ 6 /* sizeof (LINENO) */
+
+/* Symbol entry declaration and related definitions: */
+#define E_SYMNMLEN 8 /* Number of characters in a symbol name */
+
+struct external_syment
+{
+ union
+ {
+ char e_name[E_SYMNMLEN];
+ struct
+ {
+ char e_zeroes[4];
+ char e_offset[4];
+ }
+ e;
+ }
+ e;
+
+ char e_value[4];
+ char e_scnum[2];
+ char e_type[2];
+ char e_sclass[1];
+ char e_numaux[1];
+};
+
+#define SYMENT struct external_syment
+#define SYMESZ 18
+
+/* Storage class definitions - new classes for global registers: */
+#define C_GLBLREG 19 /* global register */
+#define C_EXTREG 20 /* external global register */
+#define C_DEFREG 21 /* ext. def. of global register */
+
+/* Derived symbol mask/shifts: */
+#define N_BTMASK (0xf)
+#define N_BTSHFT (4)
+#define N_TMASK (0x30)
+#define N_TSHIFT (2)
+
+/* Auxiliary symbol table entry declaration and related
+ definitions. */
+#define E_FILNMLEN 14 /* # characters in a file name */
+#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
+
+union external_auxent
+{
+ struct
+ {
+ char x_tagndx[4]; /* str, un, or enum tag indx */
+ union
+ {
+ struct
+ {
+ char x_lnno[2]; /* declaration line number */
+ char x_size[2]; /* str/union/array size */
+ }
+ x_lnsz;
+
+ char x_fsize[4]; /* size of function */
+ }
+ x_misc;
+
+ union
+ {
+ struct /* if ISFCN, tag, or .bb */
+ {
+ char x_lnnoptr[4]; /* ptr to fcn line # */
+ char x_endndx[4]; /* entry ndx past block end */
+ }
+ x_fcn;
+
+ struct /* if ISARY, up to 4 dimen. */
+ {
+ char x_dimen[E_DIMNUM][2];
+ }
+ x_ary;
+ }
+ x_fcnary;
+
+ char x_tvndx[2]; /* tv index */
+ }
+ x_sym;
+
+ union
+ {
+ char x_fname[E_FILNMLEN];
+
+ struct
+ {
+ char x_zeroes[4];
+ char x_offset[4];
+ }
+ x_n;
+ }
+ x_file;
+
+ struct
+ {
+ char x_scnlen[4]; /* section length */
+ char x_nreloc[2]; /* # relocation entries */
+ char x_nlinno[2]; /* # line numbers */
+ }
+ x_scn;
+
+ struct
+ {
+ char x_tvfill[4]; /* tv fill value */
+ char x_tvlen[2]; /* length of .tv */
+ char x_tvran[2][2]; /* tv range */
+ }
+ x_tv; /* info about .tv section
+ (in auxent of symbol .tv)) */
+};
+
+#define AUXENT union external_auxent
+#define AUXESZ 18
diff --git a/include/coff/ti.h b/include/coff/ti.h
index 57e0dec..d98fc89 100644
--- a/include/coff/ti.h
+++ b/include/coff/ti.h
@@ -91,17 +91,23 @@ struct external_filehdr
/* we need to read/write an extra field in the coff file header */
#ifndef COFF_ADJUST_FILEHDR_IN_POST
-#define COFF_ADJUST_FILEHDR_IN_POST(abfd,src,dst) \
-do { ((struct internal_filehdr *)(dst))->f_target_id = \
-bfd_h_get_16(abfd, (bfd_byte *)(((FILHDR *)(src))->f_target_id)); \
-} while(0)
+#define COFF_ADJUST_FILEHDR_IN_POST(abfd, src, dst) \
+ do \
+ { \
+ ((struct internal_filehdr *)(dst))->f_target_id = \
+ H_GET_16 (abfd, ((FILHDR *)(src))->f_target_id); \
+ } \
+ while (0)
#endif
#ifndef COFF_ADJUST_FILEHDR_OUT_POST
-#define COFF_ADJUST_FILEHDR_OUT_POST(abfd,src,dst) \
-do { bfd_h_put_16(abfd, ((struct internal_filehdr *)(src))->f_target_id, \
- (bfd_byte *)(((FILHDR *)(dst))->f_target_id)); \
-} while(0)
+#define COFF_ADJUST_FILEHDR_OUT_POST(abfd, src, dst) \
+ do \
+ { \
+ H_PUT_16 (abfd, ((struct internal_filehdr *)(src))->f_target_id, \
+ ((FILHDR *)(dst))->f_target_id); \
+ } \
+ while (0)
#endif
#define FILHDR struct external_filehdr
@@ -200,74 +206,59 @@ struct external_scnhdr {
Assume we're dealing with the COFF2 scnhdr structure, and adjust
accordingly
*/
-#define GET_SCNHDR_NRELOC(ABFD,PTR) \
-(COFF2_P(ABFD) ? bfd_h_get_32 (ABFD,PTR) : bfd_h_get_16 (ABFD, PTR))
-#define PUT_SCNHDR_NRELOC(ABFD,VAL,PTR) \
-(COFF2_P(ABFD) ? bfd_h_put_32 (ABFD,VAL,PTR) : bfd_h_put_16 (ABFD,VAL,PTR))
-#define GET_SCNHDR_NLNNO(ABFD,PTR) \
-(COFF2_P(ABFD) ? bfd_h_get_32 (ABFD,PTR) : bfd_h_get_16 (ABFD, (PTR)-2))
-#define PUT_SCNHDR_NLNNO(ABFD,VAL,PTR) \
-(COFF2_P(ABFD) ? bfd_h_put_32 (ABFD,VAL,PTR) : bfd_h_put_16 (ABFD,VAL,(PTR)-2))
-#define GET_SCNHDR_FLAGS(ABFD,PTR) \
-(COFF2_P(ABFD) ? bfd_h_get_32 (ABFD,PTR) : bfd_h_get_16 (ABFD, (PTR)-4))
-#define PUT_SCNHDR_FLAGS(ABFD,VAL,PTR) \
-(COFF2_P(ABFD) ? bfd_h_put_32 (ABFD,VAL,PTR) : bfd_h_put_16 (ABFD,VAL,(PTR)-4))
-#define GET_SCNHDR_PAGE(ABFD,PTR) \
-(COFF2_P(ABFD) ? bfd_h_get_16 (ABFD,PTR) : bfd_h_get_8 (ABFD, (PTR)-7))
+#define GET_SCNHDR_NRELOC(ABFD, PTR) \
+ (COFF2_P (ABFD) ? H_GET_32 (ABFD, PTR) : H_GET_16 (ABFD, PTR))
+#define PUT_SCNHDR_NRELOC(ABFD, VAL, PTR) \
+ (COFF2_P (ABFD) ? H_PUT_32 (ABFD, VAL, PTR) : H_PUT_16 (ABFD, VAL, PTR))
+#define GET_SCNHDR_NLNNO(ABFD, PTR) \
+ (COFF2_P (ABFD) ? H_GET_32 (ABFD, PTR) : H_GET_16 (ABFD, (PTR) -2))
+#define PUT_SCNHDR_NLNNO(ABFD, VAL, PTR) \
+ (COFF2_P (ABFD) ? H_PUT_32 (ABFD, VAL, PTR) : H_PUT_16 (ABFD, VAL, (PTR) -2))
+#define GET_SCNHDR_FLAGS(ABFD, PTR) \
+ (COFF2_P (ABFD) ? H_GET_32 (ABFD, PTR) : H_GET_16 (ABFD, (PTR) -4))
+#define PUT_SCNHDR_FLAGS(ABFD, VAL, PTR) \
+ (COFF2_P (ABFD) ? H_PUT_32 (ABFD, VAL, PTR) : H_PUT_16 (ABFD, VAL, (PTR) -4))
+#define GET_SCNHDR_PAGE(ABFD, PTR) \
+ (COFF2_P (ABFD) ? H_GET_16 (ABFD, PTR) : (unsigned) H_GET_8 (ABFD, (PTR) -7))
/* on output, make sure that the "reserved" field is zero */
-#define PUT_SCNHDR_PAGE(ABFD,VAL,PTR) \
-(COFF2_P(ABFD) ? bfd_h_put_16 (ABFD,VAL,PTR) : \
-bfd_h_put_8 (ABFD,VAL,(PTR)-7), bfd_h_put_8 (ABFD, 0, (PTR)-8))
+#define PUT_SCNHDR_PAGE(ABFD, VAL, PTR) \
+ (COFF2_P (ABFD) \
+ ? H_PUT_16 (ABFD, VAL, PTR) \
+ : H_PUT_8 (ABFD, VAL, (PTR) -7), H_PUT_8 (ABFD, 0, (PTR) -8))
/* TI COFF stores section size as number of bytes (address units, not octets),
so adjust to be number of octets, which is what BFD expects */
-#define GET_SCNHDR_SIZE(ABFD,SZP) \
-(bfd_h_get_32(ABFD,SZP)*bfd_octets_per_byte(ABFD))
-#define PUT_SCNHDR_SIZE(ABFD,SZ,SZP) \
-bfd_h_put_32(ABFD,(SZ)/bfd_octets_per_byte(ABFD),SZP)
-
-#define COFF_ADJUST_SCNHDR_IN_POST(ABFD,EXT,INT) \
-do { ((struct internal_scnhdr *)(INT))->s_page = \
-GET_SCNHDR_PAGE(ABFD,(bfd_byte *)((SCNHDR *)(EXT))->s_page); \
-} while(0)
+#define GET_SCNHDR_SIZE(ABFD, SZP) \
+ (H_GET_32 (ABFD, SZP) * bfd_octets_per_byte (ABFD))
+#define PUT_SCNHDR_SIZE(ABFD, SZ, SZP) \
+ H_PUT_32 (ABFD, (SZ) / bfd_octets_per_byte (ABFD), SZP)
+
+#define COFF_ADJUST_SCNHDR_IN_POST(ABFD, EXT, INT) \
+ do \
+ { \
+ ((struct internal_scnhdr *)(INT))->s_page = \
+ GET_SCNHDR_PAGE (ABFD, ((SCNHDR *)(EXT))->s_page); \
+ } \
+ while (0)
/* The line number and reloc overflow checking in coff_swap_scnhdr_out in
coffswap.h doesn't use PUT_X for s_nlnno and s_nreloc.
Due to different sized v0/v1/v2 section headers, we have to re-write these
fields.
*/
-#define COFF_ADJUST_SCNHDR_OUT_POST(ABFD,INT,EXT) \
-do { \
-PUT_SCNHDR_NLNNO(ABFD,((struct internal_scnhdr *)(INT))->s_nlnno,\
- (bfd_byte *)((SCNHDR *)(EXT))->s_nlnno); \
-PUT_SCNHDR_NRELOC(ABFD,((struct internal_scnhdr *)(INT))->s_nreloc,\
- (bfd_byte *)((SCNHDR *)(EXT))->s_nreloc); \
-PUT_SCNHDR_FLAGS(ABFD,((struct internal_scnhdr *)(INT))->s_flags, \
- (bfd_byte *)((SCNHDR *)(EXT))->s_flags); \
-PUT_SCNHDR_PAGE(ABFD,((struct internal_scnhdr *)(INT))->s_page, \
- (bfd_byte *)((SCNHDR *)(EXT))->s_page); \
-} while(0)
-
-/* Page macros
-
- The first GDB port requires flags in its remote memory access commands to
- distinguish between data/prog space. Hopefully we can make this go away
- eventually. Stuff the page in the upper bits of a 32-bit address, since
- the c5x family only uses 16 or 23 bits.
-
- c2x, c5x and most c54x devices have 16-bit addresses, but the c548 has
- 23-bit program addresses. Make sure the page flags don't interfere.
- These flags are used by GDB to identify the destination page for
- addresses.
-*/
-
-/* recognized load pages */
-#define PG_PROG 0x0 /* PROG page */
-#define PG_DATA 0x1 /* DATA page */
-
-#define ADDR_MASK 0x00FFFFFF
-#define PG_TO_FLAG(p) (((unsigned long)(p) & 0xFF) << 24)
-#define FLAG_TO_PG(f) (((f) >> 24) & 0xFF)
+#define COFF_ADJUST_SCNHDR_OUT_POST(ABFD, INT, EXT) \
+ do \
+ { \
+ PUT_SCNHDR_NLNNO (ABFD, ((struct internal_scnhdr *)(INT))->s_nlnno, \
+ ((SCNHDR *)(EXT))->s_nlnno); \
+ PUT_SCNHDR_NRELOC (ABFD, ((struct internal_scnhdr *)(INT))->s_nreloc,\
+ ((SCNHDR *)(EXT))->s_nreloc); \
+ PUT_SCNHDR_FLAGS (ABFD, ((struct internal_scnhdr *)(INT))->s_flags, \
+ ((SCNHDR *)(EXT))->s_flags); \
+ PUT_SCNHDR_PAGE (ABFD, ((struct internal_scnhdr *)(INT))->s_page, \
+ ((SCNHDR *)(EXT))->s_page); \
+ } \
+ while (0)
/*
* names of "special" sections
@@ -386,40 +377,58 @@ union external_auxent {
#define AUXESZ 18
/* section lengths are in target bytes (not host bytes) */
-#define GET_SCN_SCNLEN(ABFD,EXT) \
-(bfd_h_get_32(ABFD,(bfd_byte *)(EXT)->x_scn.x_scnlen)*bfd_octets_per_byte(ABFD))
-#define PUT_SCN_SCNLEN(ABFD,INT,EXT) \
-bfd_h_put_32(ABFD,(INT)/bfd_octets_per_byte(ABFD),\
- (bfd_byte *)(EXT)->x_scn.x_scnlen)
+#define GET_SCN_SCNLEN(ABFD, EXT) \
+ (H_GET_32 (ABFD, (EXT)->x_scn.x_scnlen) * bfd_octets_per_byte (ABFD))
+#define PUT_SCN_SCNLEN(ABFD, INT, EXT) \
+ H_PUT_32 (ABFD, (INT) / bfd_octets_per_byte (ABFD), (EXT)->x_scn.x_scnlen)
/* lnsz size is in bits in COFF file, in bytes in BFD */
#define GET_LNSZ_SIZE(abfd, ext) \
-(bfd_h_get_16(abfd, (bfd_byte *)ext->x_sym.x_misc.x_lnsz.x_size) / \
- (class != C_FIELD ? 8 : 1))
+ (H_GET_16 (abfd, ext->x_sym.x_misc.x_lnsz.x_size) / (class != C_FIELD ? 8 : 1))
#define PUT_LNSZ_SIZE(abfd, in, ext) \
- bfd_h_put_16(abfd, ((class != C_FIELD) ? (in)*8 : (in)), \
- (bfd_byte*) ext->x_sym.x_misc.x_lnsz.x_size)
+ H_PUT_16 (abfd, ((class != C_FIELD) ? (in) * 8 : (in)), \
+ ext->x_sym.x_misc.x_lnsz.x_size)
-/* TI COFF stores offsets for MOS and MOU in bits; BFD expects bytes */
-#define COFF_ADJUST_SYM_IN_POST(ABFD,EXT,INT) \
-do { struct internal_syment *dst = (struct internal_syment *)(INT); \
-if (dst->n_sclass == C_MOS || dst->n_sclass == C_MOU) dst->n_value /= 8; \
-} while (0)
-
-#define COFF_ADJUST_SYM_OUT_POST(ABFD,INT,EXT) \
-do { struct internal_syment *src = (struct internal_syment *)(INT); \
-SYMENT *dst = (SYMENT *)(EXT); \
-if(src->n_sclass == C_MOU || src->n_sclass == C_MOS) \
-bfd_h_put_32(abfd,src->n_value * 8,(bfd_byte *)dst->e_value); \
-} while (0)
+/* TI COFF stores offsets for MOS and MOU in bits; BFD expects bytes
+ Also put the load page flag of the section into the symbol value if it's an
+ address. */
+#ifndef NEEDS_PAGE
+#define NEEDS_PAGE(X) 0
+#define PAGE_MASK 0
+#endif
+#define COFF_ADJUST_SYM_IN_POST(ABFD, EXT, INT) \
+ do \
+ { \
+ struct internal_syment *dst = (struct internal_syment *)(INT); \
+ if (dst->n_sclass == C_MOS || dst->n_sclass == C_MOU) \
+ dst->n_value /= 8; \
+ else if (NEEDS_PAGE (dst->n_sclass)) { \
+ asection *scn = coff_section_from_bfd_index (abfd, dst->n_scnum); \
+ dst->n_value |= (scn->lma & PAGE_MASK); \
+ } \
+ } \
+ while (0)
+
+#define COFF_ADJUST_SYM_OUT_POST(ABFD, INT, EXT) \
+ do \
+ { \
+ struct internal_syment *src = (struct internal_syment *)(INT); \
+ SYMENT *dst = (SYMENT *)(EXT); \
+ if (src->n_sclass == C_MOU || src->n_sclass == C_MOS) \
+ H_PUT_32 (abfd, src->n_value * 8, dst->e_value); \
+ else if (NEEDS_PAGE (src->n_sclass)) { \
+ H_PUT_32 (abfd, src->n_value &= ~PAGE_MASK, dst->e_value); \
+ } \
+ } \
+ while (0)
/* Detect section-relative absolute symbols so they get flagged with a sym
index of -1.
*/
-#define SECTION_RELATIVE_ABSOLUTE_SYMBOL_P(RELOC,SECT) \
-((*(RELOC)->sym_ptr_ptr)->section->output_section == (SECT) \
- && (RELOC)->howto->name[0] == 'A')
+#define SECTION_RELATIVE_ABSOLUTE_SYMBOL_P(RELOC, SECT) \
+ ((*(RELOC)->sym_ptr_ptr)->section->output_section == (SECT) \
+ && (RELOC)->howto->name[0] == 'A')
/********************** RELOCATION DIRECTIVES **********************/
diff --git a/include/coff/tic54x.h b/include/coff/tic54x.h
index a41c8d2..a7b7003 100644
--- a/include/coff/tic54x.h
+++ b/include/coff/tic54x.h
@@ -18,8 +18,8 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef COFF_TIC54X_H
-
#define COFF_TIC54X_H
+
#define TIC54X_TARGET_ID 0x98
#define TIC54XALGMAGIC 0x009B /* c54x algebraic assembler output */
#define TIC5X_TARGET_ID 0x92
@@ -29,6 +29,31 @@
#define TICOFF_TARGET_ARCH bfd_arch_tic54x
#define TICOFF_DEFAULT_MAGIC TICOFF1MAGIC /* we use COFF1 for compatibility */
+/* Page macros
+
+ The first GDB port requires flags in its remote memory access commands to
+ distinguish between data/prog space. Hopefully we can make this go away
+ eventually. Stuff the page in the upper bits of a 32-bit address, since
+ the c5x family only uses 16 or 23 bits.
+
+ c2x, c5x and most c54x devices have 16-bit addresses, but the c548 has
+ 23-bit program addresses. Make sure the page flags don't interfere.
+ These flags are used by GDB to identify the destination page for
+ addresses.
+*/
+
+/* Recognized load pages (by common convention). */
+#define PG_PROG 0x0 /* PROG page */
+#define PG_DATA 0x1 /* DATA page */
+#define PG_IO 0x2 /* I/O page */
+
+/** Indicate whether the given storage class requires a page flag. */
+#define NEEDS_PAGE(X) ((X)==C_EXT)
+#define PAGE_MASK 0xFF000000
+#define ADDR_MASK 0x00FFFFFF
+#define PG_TO_FLAG(p) (((unsigned long)(p) & 0xFF) << 24)
+#define FLAG_TO_PG(f) (((f) >> 24) & 0xFF)
+
#include "coff/ti.h"
#endif /* COFF_TIC54X_H */
diff --git a/include/coff/xcoff.h b/include/coff/xcoff.h
index bc1ee5c..0bb9d6c 100644
--- a/include/coff/xcoff.h
+++ b/include/coff/xcoff.h
@@ -1,6 +1,7 @@
/* Internal format of XCOFF object file data structures for BFD.
- Copyright 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001
+ Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>, Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -22,18 +23,16 @@
#ifndef _INTERNAL_XCOFF_H
#define _INTERNAL_XCOFF_H
-/*
- * LINKER
- */
+/* Linker */
-/*
- * names of "special" sections
- */
+/* Names of "special" sections. */
#define _TEXT ".text"
#define _DATA ".data"
#define _BSS ".bss"
#define _PAD ".pad"
#define _LOADER ".loader"
+#define _EXCEPT ".except"
+#define _TYPCHK ".typchk"
/* XCOFF uses a special .loader section with type STYP_LOADER. */
#define STYP_LOADER 0x1000
@@ -45,11 +44,19 @@
another section header with STYP_OVRFLO set. */
#define STYP_OVRFLO 0x8000
+/* Specifies an exception section. A section of this type provides
+ information to identify the reason that a trap or ececptin occured within
+ and executable object program */
+#define STYP_EXCEPT 0x0100
+
+/* Specifies a type check section. A section of this type contains parameter
+ argument type check strings used by the AIX binder. */
+#define STYP_TYPCHK 0x4000
+
#define RS6K_AOUTHDR_OMAGIC 0x0107 /* old: text & data writeable */
#define RS6K_AOUTHDR_NMAGIC 0x0108 /* new: text r/o, data r/w */
#define RS6K_AOUTHDR_ZMAGIC 0x010B /* paged: text r/o, both page-aligned */
-
/* XCOFF relocation types.
The relocations are described in the function
xcoff[64]_ppc_relocate_section in coff64-rs6000.c and coff-rs6000.c */
@@ -77,22 +84,15 @@
#define R_RBR (0x1a)
#define R_RBRC (0x1b)
+/* Storage class #defines, from /usr/include/storclass.h that are not already
+ defined in internal.h */
-/*
- * Storage class #defines, from /usr/include/storclass.h
- * That are not already defined in internal.h
- */
-#define C_INFO 110 /* Comment string in .info section */
+/* Comment string in .info section */
+#define C_INFO 110
-
-/*
- * AUXILLARY SYMBOL ENTRIES
- *
- * auxemt
- */
+/* Auxillary Symbol Entries */
/* x_smtyp values: */
-
#define SMTYP_ALIGN(x) ((x) >> 3) /* log2 of alignment */
#define SMTYP_SMTYP(x) ((x) & 0x7) /* symbol type */
/* Symbol type values: */
@@ -104,7 +104,6 @@
#define XTY_US 5 /* "Reserved for internal use" */
/* x_smclas values: */
-
#define XMC_PR 0 /* Read-only program code */
#define XMC_RO 1 /* Read-only constant */
#define XMC_DB 2 /* Read-only debug dictionary table */
@@ -122,36 +121,45 @@
/* 14 ??? */
#define XMC_TC0 15 /* Read-write TOC anchor */
#define XMC_TD 16 /* Read-write data in TOC */
+#define XMC_SV64 17 /* Read-only 64 bit supervisor call */
+#define XMC_SV3264 18 /* Read-only 32 or 64 bit supervisor call */
/* The ldhdr structure. This appears at the start of the .loader
section. */
struct internal_ldhdr
{
- /*
- * The version number:
- * 1 : 32 bit
- * 2 : 64 bit
- */
+ /* The version number:
+ 1 : 32 bit
+ 2 : 64 bit */
unsigned long l_version;
+
/* The number of symbol table entries. */
bfd_size_type l_nsyms;
+
/* The number of relocation table entries. */
bfd_size_type l_nreloc;
+
/* The length of the import file string table. */
bfd_size_type l_istlen;
+
/* The number of import files. */
bfd_size_type l_nimpid;
+
/* The offset from the start of the .loader section to the first
entry in the import file table. */
bfd_size_type l_impoff;
+
/* The length of the string table. */
bfd_size_type l_stlen;
+
/* The offset from the start of the .loader section to the first
entry in the string table. */
bfd_size_type l_stoff;
+
/* The offset to start of the symbol table, only in XCOFF64 */
bfd_vma l_symoff;
+
/* The offset to the start of the relocation table, only in XCOFF64 */
bfd_vma l_rldoff;
};
@@ -162,28 +170,37 @@ struct internal_ldhdr
struct internal_ldsym
{
union
+ {
+ /* The symbol name if <= SYMNMLEN characters. */
+ char _l_name[SYMNMLEN];
+ struct
{
- /* The symbol name if <= SYMNMLEN characters. */
- char _l_name[SYMNMLEN];
- struct
- {
- /* Zero if the symbol name is more than SYMNMLEN characters. */
- long _l_zeroes;
- /* The offset in the string table if the symbol name is more
- than SYMNMLEN characters. */
- long _l_offset;
- } _l_l;
- } _l;
+ /* Zero if the symbol name is more than SYMNMLEN characters. */
+ long _l_zeroes;
+
+ /* The offset in the string table if the symbol name is more
+ than SYMNMLEN characters. */
+ long _l_offset;
+ }
+ _l_l;
+ }
+ _l;
+
/* The symbol value. */
bfd_vma l_value;
+
/* The symbol section number. */
short l_scnum;
+
/* The symbol type and flags. */
char l_smtype;
+
/* The symbol storage class. */
char l_smclas;
+
/* The import file ID. */
bfd_size_type l_ifile;
+
/* Offset to the parameter type check string. */
bfd_size_type l_parm;
};
@@ -205,10 +222,13 @@ struct internal_ldrel
{
/* The reloc address. */
bfd_vma l_vaddr;
+
/* The symbol table index in the .loader section symbol table. */
bfd_size_type l_symndx;
+
/* The relocation type and size. */
short l_rtype;
+
/* The section number this relocation applies to. */
short l_rsecnm;
};
@@ -227,14 +247,16 @@ struct xcoff_link_hash_entry
asection *toc_section;
union
- {
- /* If we have created a TOC entry (the XCOFF_SET_TOC flag is
- set), this is the offset in toc_section. */
- bfd_vma toc_offset;
- /* If the TOC entry comes from an input file, this is set to the
- symbol index of the C_HIDEXT XMC_TC or XMC_TD symbol. */
- long toc_indx;
- } u;
+ {
+ /* If we have created a TOC entry (the XCOFF_SET_TOC flag is
+ set), this is the offset in toc_section. */
+ bfd_vma toc_offset;
+
+ /* If the TOC entry comes from an input file, this is set to the
+ symbol index of the C_HIDEXT XMC_TC or XMC_TD symbol. */
+ long toc_indx;
+ }
+ u;
/* If this symbol is a function entry point which is called, this
field holds a pointer to the function descriptor. If this symbol
@@ -257,72 +279,42 @@ struct xcoff_link_hash_entry
unsigned char smclas;
};
-/*
- * #define for xcoff_link_hash_entry.flags
- *
- * XCOFF_REF_REGULAR
- * Symbol is referenced by a regular object.
- *
- * XCOFF_DEF_REGULAR
- * Symbol is defined by a regular object.
- *
- * XCOFF_DEF_DYNAMIC
- * Symbol is defined by a dynamic object.
- *
- * XCOFF_LDREL
- * Symbol is used in a reloc being copied into the .loader section.
- *
- * XCOFF_ENTRY
- * Symbol is the entry point.
- *
- * XCOFF_CALLED
- * Symbol is called; this is, it appears in a R_BR reloc.
- *
- * XCOFF_SET_TOC
- * Symbol needs the TOC entry filled in.
- *
- * XCOFF_IMPORT
- * Symbol is explicitly imported.
- *
- * XCOFF_EXPORT
- * Symbol is explicitly exported.
- *
- * XCOFF_BUILT_LDSYM
- * Symbol has been processed by xcoff_build_ldsyms.
- *
- * XCOFF_MARK
- * Symbol is mentioned by a section which was not garbage collected.
- *
- * XCOFF_HAS_SIZE
- * Symbol size is recorded in size_list list from hash table.
- *
- * XCOFF_DESCRIPTOR
- * Symbol is a function descriptor.
- *
- * XCOFF_MULTIPLY_DEFINED
- * Multiple definitions have been for the symbol.
- *
- * XCOFF_RTINIT
- * Symbol is the __rtinit symbol
- *
- */
+/* Flags for xcoff_link_hash_entry. */
+/* Symbol is referenced by a regular object. */
#define XCOFF_REF_REGULAR 0x00000001
+/* Symbol is defined by a regular object. */
#define XCOFF_DEF_REGULAR 0x00000002
+/* Symbol is defined by a dynamic object. */
#define XCOFF_DEF_DYNAMIC 0x00000004
+/* Symbol is used in a reloc being copied into the .loader section. */
#define XCOFF_LDREL 0x00000008
+/* Symbol is the entry point. */
#define XCOFF_ENTRY 0x00000010
+/* Symbol is called; this is, it appears in a R_BR reloc. */
#define XCOFF_CALLED 0x00000020
+/* Symbol needs the TOC entry filled in. */
#define XCOFF_SET_TOC 0x00000040
+/* Symbol is explicitly imported. */
#define XCOFF_IMPORT 0x00000080
+/* Symbol is explicitly exported. */
#define XCOFF_EXPORT 0x00000100
+/* Symbol has been processed by xcoff_build_ldsyms. */
#define XCOFF_BUILT_LDSYM 0x00000200
+/* Symbol is mentioned by a section which was not garbage collected. */
#define XCOFF_MARK 0x00000400
+/* Symbol size is recorded in size_list list from hash table. */
#define XCOFF_HAS_SIZE 0x00000800
+/* Symbol is a function descriptor. */
#define XCOFF_DESCRIPTOR 0x00001000
+/* Multiple definitions have been for the symbol. */
#define XCOFF_MULTIPLY_DEFINED 0x00002000
+/* Symbol is the __rtinit symbol. */
#define XCOFF_RTINIT 0x00004000
-
+/* Symbol is an imported 32 bit syscall. */
+#define XCOFF_SYSCALL32 0x00008000
+/* Symbol is an imported 64 bit syscall. */
+#define XCOFF_SYSCALL64 0x00010000
/* The XCOFF linker hash table. */
@@ -381,11 +373,12 @@ struct xcoff_link_hash_table
/* A linked list of symbols for which we have size information. */
struct xcoff_link_size_list
- {
- struct xcoff_link_size_list *next;
- struct xcoff_link_hash_entry *h;
- bfd_size_type size;
- } *size_list;
+ {
+ struct xcoff_link_size_list *next;
+ struct xcoff_link_hash_entry *h;
+ bfd_size_type size;
+ }
+ *size_list;
/* Magic sections: _text, _etext, _data, _edata, _end, end. */
asection *special_sections[XCOFF_NUMBER_OF_SPECIAL_SECTIONS];
@@ -399,61 +392,77 @@ struct xcoff_loader_info
{
/* Set if a problem occurred. */
boolean failed;
+
/* Output BFD. */
bfd *output_bfd;
+
/* Link information structure. */
struct bfd_link_info *info;
+
/* Whether all defined symbols should be exported. */
boolean export_defineds;
+
/* Number of ldsym structures. */
size_t ldsym_count;
+
/* Size of string table. */
size_t string_size;
+
/* String table. */
bfd_byte *strings;
+
/* Allocated size of string table. */
size_t string_alc;
};
/* In case we're on a 32-bit machine, construct a 64-bit "-1" value
from smaller values. Start with zero, widen, *then* decrement. */
-#define MINUS_ONE (((bfd_vma)0) - 1)
-
-
-/*
- * __rtinit
- * from /usr/include/rtinit.h
- */
-struct __rtinit {
- int (*rtl)(); /* Pointer to runtime linker */
- int init_offset; /* Offset to array of init functions
- (0 if none). */
- int fini_offset; /* Offset to array of fini functions
- (0 if none). */
- int __rtinit_descriptor_size; /* Size of __RTINIT_DESCRIPTOR.
- This value should be used instead
- of sizeof(__RTINIT_DESCRIPTOR). */
+#define MINUS_ONE (((bfd_vma) 0) - 1)
+
+/* __rtinit, from /usr/include/rtinit.h. */
+struct __rtinit
+{
+ /* Pointer to runtime linker.
+ XXX: Is the parameter really void? */
+ int (*rtl) PARAMS ((void));
+
+ /* Offset to array of init functions, 0 if none. */
+ int init_offset;
+
+ /* Offset to array of fini functions, 0 if none. */
+ int fini_offset;
+
+ /* Size of __RTINIT_DESCRIPTOR. This value should be used instead of
+ sizeof(__RTINIT_DESCRIPTOR). */
+ int __rtinit_descriptor_size;
};
#define RTINIT_DESCRIPTOR_SIZE (12)
-struct __rtinit_descriptor {
- int f; /* Init/fini function. */
- int name_offset; /* Offset (within __rtinit symbol)
- to name of function. */
- unsigned char flags; /* Flags */
-};
+struct __rtinit_descriptor
+{
+ /* Init/fini function. */
+ int f;
+ /* Offset, relative to the start of the __rtinit symbol, to name of the
+ function. */
+ int name_offset;
-/*
- * ARCHIVE
- */
+ /* Flags */
+ unsigned char flags;
+};
+
+/* Archive */
#define XCOFFARMAG "<aiaff>\012"
#define XCOFFARMAGBIG "<bigaf>\012"
#define SXCOFFARMAG 8
+/* The size of the ascii archive elements */
+#define XCOFFARMAG_ELEMENT_SIZE 12
+#define XCOFFARMAGBIG_ELEMENT_SIZE 20
+
/* This terminates an XCOFF archive member name. */
#define XCOFFARFMAG "`\012"
@@ -467,23 +476,23 @@ struct xcoff_ar_file_hdr
char magic[SXCOFFARMAG];
/* Offset of the member table (decimal ASCII string). */
- char memoff[12];
+ char memoff[XCOFFARMAG_ELEMENT_SIZE];
/* Offset of the global symbol table (decimal ASCII string). */
- char symoff[12];
+ char symoff[XCOFFARMAG_ELEMENT_SIZE];
/* Offset of the first member in the archive (decimal ASCII string). */
- char firstmemoff[12];
+ char firstmemoff[XCOFFARMAG_ELEMENT_SIZE];
/* Offset of the last member in the archive (decimal ASCII string). */
- char lastmemoff[12];
+ char lastmemoff[XCOFFARMAG_ELEMENT_SIZE];
/* Offset of the first member on the free list (decimal ASCII
string). */
- char freeoff[12];
+ char freeoff[XCOFFARMAG_ELEMENT_SIZE];
};
-#define SIZEOF_AR_FILE_HDR (5 * 12 + SXCOFFARMAG)
+#define SIZEOF_AR_FILE_HDR (SXCOFFARMAG + 5 * XCOFFARMAG_ELEMENT_SIZE)
/* This is the equivalent data structure for the big archive format. */
@@ -493,42 +502,41 @@ struct xcoff_ar_file_hdr_big
char magic[SXCOFFARMAG];
/* Offset of the member table (decimal ASCII string). */
- char memoff[20];
+ char memoff[XCOFFARMAGBIG_ELEMENT_SIZE];
/* Offset of the global symbol table for 32-bit objects (decimal ASCII
string). */
- char symoff[20];
+ char symoff[XCOFFARMAGBIG_ELEMENT_SIZE];
/* Offset of the global symbol table for 64-bit objects (decimal ASCII
string). */
- char symoff64[20];
+ char symoff64[XCOFFARMAGBIG_ELEMENT_SIZE];
/* Offset of the first member in the archive (decimal ASCII string). */
- char firstmemoff[20];
+ char firstmemoff[XCOFFARMAGBIG_ELEMENT_SIZE];
/* Offset of the last member in the archive (decimal ASCII string). */
- char lastmemoff[20];
+ char lastmemoff[XCOFFARMAGBIG_ELEMENT_SIZE];
/* Offset of the first member on the free list (decimal ASCII
string). */
- char freeoff[20];
+ char freeoff[XCOFFARMAGBIG_ELEMENT_SIZE];
};
-#define SIZEOF_AR_FILE_HDR_BIG (6 * 20 + SXCOFFARMAG)
-
+#define SIZEOF_AR_FILE_HDR_BIG (SXCOFFARMAG + 6 * XCOFFARMAGBIG_ELEMENT_SIZE)
/* Each XCOFF archive member starts with this (printable) structure. */
struct xcoff_ar_hdr
{
/* File size not including the header (decimal ASCII string). */
- char size[12];
+ char size[XCOFFARMAG_ELEMENT_SIZE];
/* File offset of next archive member (decimal ASCII string). */
- char nextoff[12];
+ char nextoff[XCOFFARMAG_ELEMENT_SIZE];
/* File offset of previous archive member (decimal ASCII string). */
- char prevoff[12];
+ char prevoff[XCOFFARMAG_ELEMENT_SIZE];
/* File mtime (decimal ASCII string). */
char date[12];
@@ -553,20 +561,20 @@ struct xcoff_ar_hdr
bytes is given in the size field. */
};
-#define SIZEOF_AR_HDR (7 * 12 + 4)
+#define SIZEOF_AR_HDR (3 * XCOFFARMAG_ELEMENT_SIZE + 4 * 12 + 4)
/* The equivalent for the big archive format. */
struct xcoff_ar_hdr_big
{
/* File size not including the header (decimal ASCII string). */
- char size[20];
+ char size[XCOFFARMAGBIG_ELEMENT_SIZE];
/* File offset of next archive member (decimal ASCII string). */
- char nextoff[20];
+ char nextoff[XCOFFARMAGBIG_ELEMENT_SIZE];
/* File offset of previous archive member (decimal ASCII string). */
- char prevoff[20];
+ char prevoff[XCOFFARMAGBIG_ELEMENT_SIZE];
/* File mtime (decimal ASCII string). */
char date[12];
@@ -591,13 +599,27 @@ struct xcoff_ar_hdr_big
bytes is given in the size field. */
};
-#define SIZEOF_AR_HDR_BIG (3 * 20 + 4 * 12 + 4)
+#define SIZEOF_AR_HDR_BIG (3 * XCOFFARMAGBIG_ELEMENT_SIZE + 4 * 12 + 4)
/* We often have to distinguish between the old and big file format.
Make it a bit cleaner. We can use `xcoff_ardata' here because the
- `hdr' member has the same size and position in both formats. */
+ `hdr' member has the same size and position in both formats.
+ <bigaf> is the default format, return true even when xcoff_ardata is
+ NULL. */
+#ifndef SMALL_ARCHIVE
+/* Creates big archives by default */
+#define xcoff_big_format_p(abfd) \
+ ((NULL != bfd_ardata (abfd) && NULL == xcoff_ardata (abfd)) || \
+ ((NULL != bfd_ardata (abfd)) && \
+ (NULL != xcoff_ardata (abfd)) && \
+ (xcoff_ardata (abfd)->magic[1] == 'b')))
+#else
+/* Creates small archives by default. */
#define xcoff_big_format_p(abfd) \
- (xcoff_ardata (abfd)->magic[1] == 'b')
+ (((NULL != bfd_ardata (abfd)) && \
+ (NULL != xcoff_ardata (abfd)) && \
+ (xcoff_ardata (abfd)->magic[1] == 'b')))
+#endif
/* We store a copy of the xcoff_ar_file_hdr in the tdata field of the
artdata structure. Similar for the big archive. */
diff --git a/include/demangle.h b/include/demangle.h
index dc1e1f1..ad0569a 100644
--- a/include/demangle.h
+++ b/include/demangle.h
@@ -1,5 +1,5 @@
/* Defs for interface to demanglers.
- Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000
+ Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -29,6 +29,8 @@
#define DMGL_PARAMS (1 << 0) /* Include function args */
#define DMGL_ANSI (1 << 1) /* Include const, volatile, etc */
#define DMGL_JAVA (1 << 2) /* Demangle as Java rather than C++. */
+#define DMGL_VERBOSE (1 << 3) /* Include implementation details. */
+#define DMGL_TYPES (1 << 4) /* Also try to demangle type encodings. */
#define DMGL_AUTO (1 << 8)
#define DMGL_GNU (1 << 9)
@@ -54,6 +56,7 @@
extern enum demangling_styles
{
+ no_demangling = -1,
unknown_demangling = 0,
auto_demangling = DMGL_AUTO,
gnu_demangling = DMGL_GNU,
@@ -68,6 +71,7 @@ extern enum demangling_styles
/* Define string names for the various demangling styles. */
+#define NO_DEMANGLING_STYLE_STRING "none"
#define AUTO_DEMANGLING_STYLE_STRING "auto"
#define GNU_DEMANGLING_STYLE_STRING "gnu"
#define LUCID_DEMANGLING_STYLE_STRING "lucid"
@@ -94,11 +98,11 @@ extern enum demangling_styles
/* Provide information about the available demangle styles. This code is
pulled from gdb into libiberty because it is useful to binutils also. */
-extern struct demangler_engine
+extern const struct demangler_engine
{
- const char *demangling_style_name;
- enum demangling_styles demangling_style;
- const char *demangling_style_doc;
+ const char *const demangling_style_name;
+ const enum demangling_styles demangling_style;
+ const char *const demangling_style_doc;
} libiberty_demanglers[];
extern char *
@@ -123,7 +127,7 @@ cplus_demangle_name_to_style PARAMS ((const char *name));
/* V3 ABI demangling entry points, defined in cp-demangle.c. */
extern char*
-cplus_demangle_v3 PARAMS ((const char* mangled));
+cplus_demangle_v3 PARAMS ((const char* mangled, int options));
extern char*
java_demangle_v3 PARAMS ((const char* mangled));
diff --git a/include/dis-asm.h b/include/dis-asm.h
index c1bd5ce..decc863 100644
--- a/include/dis-asm.h
+++ b/include/dis-asm.h
@@ -1,6 +1,6 @@
/* Interface between the opcode library and its callers.
- Copyright 2001 Free Software Foundation, Inc.
+ Copyright 2001, 2002 Free Software Foundation, Inc.
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
@@ -73,6 +73,11 @@ typedef struct disassemble_info {
unsigned long mach;
/* Endianness (for bi-endian cpus). Mono-endian cpus can ignore this. */
enum bfd_endian endian;
+ /* An arch/mach-specific bitmask of selected instruction subsets, mainly
+ for processors with run-time-switchable instruction sets. The default,
+ zero, means that there is no constraint. CGEN-based opcodes ports
+ may use ISA_foo masks. */
+ unsigned long insn_sets;
/* Some targets need information about the current section to accurately
display insns. If this is NULL, the target disassembler function
@@ -145,8 +150,7 @@ typedef struct disassemble_info {
enum bfd_endian display_endian;
/* Number of octets per incremented target address
- Normally one, but some DSPs have byte sizes of 16 or 32 bits
- */
+ Normally one, but some DSPs have byte sizes of 16 or 32 bits. */
unsigned int octets_per_byte;
/* Results from instruction decoders. Not all decoders yet support
@@ -172,12 +176,13 @@ typedef struct disassemble_info {
/* Standard disassemblers. Disassemble one instruction at the given
- target address. Return number of bytes processed. */
+ target address. Return number of octets processed. */
typedef int (*disassembler_ftype)
PARAMS((bfd_vma, disassemble_info *));
extern int print_insn_big_mips PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_little_mips PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_i386 PARAMS ((bfd_vma, disassemble_info *));
extern int print_insn_i386_att PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_i386_intel PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_ia64 PARAMS ((bfd_vma, disassemble_info*));
@@ -192,41 +197,49 @@ extern int print_insn_h8300h PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_h8300s PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_h8500 PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_alpha PARAMS ((bfd_vma, disassemble_info*));
-extern disassembler_ftype arc_get_disassembler PARAMS ((void *));
extern int print_insn_big_arm PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_little_arm PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_sparc PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_big_a29k PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_little_a29k PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_avr PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_d10v PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_d30v PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_fr30 PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_hppa PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_i860 PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_i960 PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_sh PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_shl PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_hppa PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_fr30 PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_m32r PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_m88k PARAMS ((bfd_vma, disassemble_info*));
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_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*));
+extern int print_insn_little_or32 PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_pdp11 PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_pj PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_big_powerpc PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_little_powerpc PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_rs6000 PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_w65 PARAMS ((bfd_vma, disassemble_info*));
-extern disassembler_ftype cris_get_disassembler PARAMS ((bfd *));
-extern int print_insn_d10v PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_d30v PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_v850 PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_s390 PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_sh PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_shl PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_tic30 PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_vax PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_tic54x PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_tic80 PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_pj PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_avr PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_s390 PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_v850 PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_vax PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_w65 PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_xstormy16 PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_sh64 PARAMS ((bfd_vma, disassemble_info *));
+extern int print_insn_sh64l PARAMS ((bfd_vma, disassemble_info *));
+extern int print_insn_sh64x_media PARAMS ((bfd_vma, disassemble_info *));
+
+extern disassembler_ftype arc_get_disassembler PARAMS ((void *));
+extern disassembler_ftype cris_get_disassembler PARAMS ((bfd *));
extern void print_arm_disassembler_options PARAMS ((FILE *));
extern void parse_arm_disassembler_option PARAMS ((char *));
@@ -270,6 +283,7 @@ extern int generic_symbol_at_address
(INFO).flavour = bfd_target_unknown_flavour, \
(INFO).arch = bfd_arch_unknown, \
(INFO).mach = 0, \
+ (INFO).insn_sets = 0, \
(INFO).endian = BFD_ENDIAN_UNKNOWN, \
(INFO).octets_per_byte = 1, \
INIT_DISASSEMBLE_INFO_NO_ARCH(INFO, STREAM, FPRINTF_FUNC)
@@ -297,6 +311,7 @@ extern int generic_symbol_at_address
(INFO).bytes_per_line = 0, \
(INFO).bytes_per_chunk = 0, \
(INFO).display_endian = BFD_ENDIAN_UNKNOWN, \
+ (INFO).disassembler_options = NULL, \
(INFO).insn_info_valid = 0
#ifdef __cplusplus
diff --git a/include/dyn-string.h b/include/dyn-string.h
index 67f7ab7..315f63f 100644
--- a/include/dyn-string.h
+++ b/include/dyn-string.h
@@ -2,20 +2,20 @@
Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
Contributed by Mark Mitchell (mark@markmitchell.com).
-This file is part of GNU CC.
+This file is part of GCC.
-GNU CC is free software; you can redistribute it and/or modify
+GCC 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.
-GNU CC is distributed in the hope that it will be useful,
+GCC 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 GNU CC; see the file COPYING. If not, write to
+along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
diff --git a/include/elf/ChangeLog b/include/elf/ChangeLog
index 13bcbb8..79f99ac 100644
--- a/include/elf/ChangeLog
+++ b/include/elf/ChangeLog
@@ -1,6 +1,186 @@
+2002-02-09 Richard Henderson <rth@redhat.com>
+
+ * alpha.h (R_ALPHA_BRSGP): New.
+
+2002-02-08 Alexandre Oliva <aoliva@redhat.com>
+
+ Contribute sh64-elf.
+ 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
+ * sh.h (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
+ R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
+ R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
+ R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
+ R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
+ R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
+ R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
+ R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8,
+ R_SH_GOTPLT10BY8, R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64,
+ R_SH_RELATIVE64): New relocs.
+ (R_SH_FIRST_INVALID_RELOC_4): Adjust.
+ 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
+ * sh.h: Renumbered and renamed some SH5 relocations to match
+ official numbers and names; moved unmaching ones to the range
+ 0xf2-0xff.
+ 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
+ * sh.h (sh64_get_contents_type): Declare.
+ (sh64_address_is_shmedia): Likewise.
+ 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
+ * sh.h (sh64_elf_crange): New type.
+ (struct sh64_section_data): New.
+ (sh64_elf_section_data): New macro.
+ (EF_SH5): Rename back from EF_SH64.
+ 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
+ * sh.h (SHF_SH5_ISA32_MIXED, SHT_SH5_CR_SORTED,
+ SH64_CRANGES_SECTION_NAME, SH64_CRANGE_SIZE,
+ SH64_CRANGE_CR_ADDR_OFFSET, SH64_CRANGE_CR_SIZE_OFFSET,
+ SH64_CRANGE_CR_TYPE_OFFSET): New macros.
+ 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
+ * sh.h (EF_SH64): Don't define EF_SH64_ABI64.
+ 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
+ * sh.h (EF_SH64_32BIT_ABI, EF_SH64_64BIT_ABI): Delete.
+ (EF_SH64_ABI64): New.
+ 2000-11-23 Hans-Peter Nilsson <hpn@cygnus.com>
+ * sh.h (EF_SH64): Rename from EF_SH5.
+ (EF_SH64_32BIT_ABI): New.
+ (EF_SH64_64BIT_ABI): New.
+ (R_SH_PT_16, R_SH_SHMEDIA_CODE
+ R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
+ R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
+ R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
+ R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
+ R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL): New
+ relocs.
+ 2000-09-01 Ben Elliston <bje@redhat.com>
+ * sh.h (EF_SH5): Define.
+
+2002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * mmix.h: Tweak comments.
+ (MMIX_LD_ALLOCATED_REG_CONTENTS_SECTION_NAME): New.
+ [BFD_ARCH_SIZE] (_bfd_mmix_prepare_linker_allocated_gregs,
+ _bfd_mmix_finalize_linker_allocated_gregs,
+ _bfd_mmix_check_all_relocs): Provide prototypes.
+
+2002-01-31 Ivan Guzvinec <ivang@opencores.org>
+
+ * or32.h: New file.
+ * common.h: Add support for or32 targets.
+
+2002-01-28 Jason Merrill <jason@redhat.com>
+
+ * dwarf2.h: Sync with gcc version.
+
+2002-01-16 Alan Modra <amodra@bigpond.net.au>
+
+ * ppc.h (DT_PPC64_GLINK): Define.
+
+2002-01-15 Richard Earnshaw <rearnsha@arm.com>
+
+ * arm.h (F_VFP_FLOAT, EF_ARM_VFP_FLOAT): Define.
+
+2002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * common.h: Update copyright years.
+ (NT_NETBSDCORE_PROCINFO): Define.
+ (NT_NETBSDCORE_FIRSTMACH): Define.
+
+2002-01-06 Steve Ellcey <sje@cup.hp.com>
+
+ * ia64.h (ELF_STRING_ia64_unwind_hdr): New Macro for HP-UX.
+ (SHT_IA_64_HP_OPT_ANOT): Ditto
+ (PT_IA_64_HP_OPT_ANOT): Ditto
+ (PT_IA_64_HP_HSL_ANOT): Ditto
+ (PT_IA_64_HP_STACK): Ditto
+ (SHN_IA_64_ANSI_COMMON): Ditto
+
+2001-12-17 Alan Modra <amodra@bigpond.net.au>
+
+ * external.h (Elf_External_Sym_Shndx): Declare.
+ * internal.h (struct elf_internal_sym <st_shndx>): Make it an
+ unsigned int.
+ * common.h (SHN_BAD): Define.
+
+2001-12-13 Jakub Jelinek <jakub@redhat.com>
+
+ * elf/common.h (PT_GNU_EH_FRAME): Define.
+
+2001-12-11 Alan Modra <amodra@bigpond.net.au>
+
+ * common.h (SHN_XINDEX): Comment typo fix.
+ * internal.h (Elf_Internal_Ehdr): Change existing "unsigned short"
+ size, count and index fields to "unsigned int".
+
+2001-12-07 Geoffrey Keating <geoffk@redhat.com>
+ Richard Henderson <rth@redhat.com>
+
+ * common.h (EM_XSTORMY16): Define.
+ * xstormy16.h: New file.
+
+2001-11-15 Alan Modra <amodra@bigpond.net.au>
+
+ * common.h (NT_ARCH): Define. Remove incorrect comment.
+
+2001-11-11 Geoffrey Keating <geoffk@redhat.com>
+
+ * dwarf2.h (dwarf_line_number_ops): Add DWARF 3 opcodes.
+
+2001-10-30 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * mmix.h: New file.
+
+2001-10-23 Alan Modra <amodra@bigpond.net.au>
+
+ * internal.h: White space changes to keep lines under 80 chars.
+
+2001-10-16 Jeff Holcomb <jeffh@redhat.com>
+
+ * internal.h (elf_internal_shdr): Make contents a unsigned char *.
+
+2001-09-18 Alan Modra <amodra@bigpond.net.au>
+
+ * internal.h (elf_internal_rela): Make r_addend a bfd_vma.
+
+2001-09-13 Alexandre Oliva <aoliva@redhat.com>
+
+ * common.h (EM_OPENRISC_OLD): Renamed the old EM_OPENRISC entry.
+
+2001-09-12 Alexandre Oliva <aoliva@redhat.com>
+
+ * common.h (EM_AVR_OLD): Renamed from...
+ (EM_AVR): this, redefined as in the current ELF standard.
+ (EM_PJ_OLD): Renamed from...
+ (EM_PJ): this, redefined as in the current ELF standard.
+ (EM_R30, EM_D10V, EM_D30V, EM_V850, EM_M32R, EM_MN10300,
+ EM_MN10200, EM_OPENRISC, EM_ARC_A5, EM_XTENSA): Defined as in
+ the current ELF standard.
+ (EM_CYGNUS_ARC): Removed, unused for a long time.
+
+2001-09-04 Richard Henderson <rth@redhat.com>
+
+ * alpha.h (R_ALPHA_OP*, R_ALPHA_IMMED*, R_ALPHA_GPVALUE): Remove.
+ (R_ALPHA_GPREL16): Rename from R_ALPHA_IMMED_GP_16.
+
+2001-08-30 Eric Christopher <echristo@redhat.com>
+
+ * mips.h: Remove E_MIPS_MACH_MIPS32_4K.
+
+2001-08-29 Jeff Law <law@redhat.com>
+
+ * h8.h (EF_H8_MACH): New mask for encoded machine type.
+ (E_H8_MACH_H8300, E_H8_MACH_H8300H, E_H8_MACH_H8300S): New
+ machine types.
+
+2001-08-26 J"orn Rennecke <amylaar@redhat.com>
+
+ * h8.h: New file.
+
+2001-08-27 Staffan Ulfberg <staffanu@swox.se>
+
+ * ppc.h: Add relocs from the 64-bit PowerPC ELF ABI revision 1.2.
+
2001-06-30 Daniel Berlin <dan@cgsoftware.com>
- * dwarf2.h: Remerge with gcc version,
+ * dwarf2.h: Remerge with gcc version,
including all new DWARF 2.1 extensions.
2001-06-29 James Cownie <jcownie@etnus.com>
@@ -18,6 +198,11 @@
* common.h: Remove definition of EM_MIPS_RS4_BE. The constant was
never in active use and is used otherwise by the ABI.
+2001-05-11 Jakub Jelinek <jakub@redhat.com>
+
+ * ia64.h (ELF_STRING_ia64_unwind_once): Define.
+ (ELF_STRING_ia64_unwind_info_once): Define.
+
2001-05-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
* external.h: Fix typo.
@@ -45,7 +230,7 @@
2001-04-20 Johan Rydberg <jrydberg@opencores.org>
* openrisc.h: New file.
- * common.h (EM_OPENRISC): New constant.
+ * common.h (EM_OPENRISC): New constant.
2001-04-23 Bo Thorsen <bo@suse.de>
@@ -290,8 +475,8 @@
(ELFOSABI_MODESTO): Defined.
(ELFOSABI_OPENBSD): Likewise.
-Fri Apr 21 13:20:53 2000 Richard Henderson <rth@cygnus.com>
- David Mosberger <davidm@hpl.hp.com>
+2000-04-21 Richard Henderson <rth@cygnus.com>
+ David Mosberger <davidm@hpl.hp.com>
* ia64.h: New file.
@@ -325,7 +510,7 @@ Fri Apr 21 13:20:53 2000 Richard Henderson <rth@cygnus.com>
(PF_ARM_PI): Define.
(PF_ARM_ABS): Define.
-Wed Apr 5 22:08:59 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
+2000-04-05 J"orn Rennecke <amylaar@cygnus.co.uk>
* sh.h (R_SH_LOOP_START, R_SH_LOOP_END): New RELOC_NUMBERs.
@@ -354,7 +539,7 @@ Wed Apr 5 22:08:59 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
* common.h (ELFOSABI_LINUX): Define.
-Thu Feb 17 00:18:33 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
+2000-02-17 J"orn Rennecke <amylaar@cygnus.co.uk>
* sh.h: (EF_SH_MACH_MASK, EF_SH_UNKNOWN, EF_SH1, EF_SH2): New macros.
(EF_SH3, EF_SH_HAS_DSP, EF_SH_DSP, EF_SH3_DSP): Likewise.
diff --git a/include/elf/alpha.h b/include/elf/alpha.h
index 8bf67bd..e937b81 100644
--- a/include/elf/alpha.h
+++ b/include/elf/alpha.h
@@ -80,28 +80,25 @@ START_RELOC_NUMBERS (elf_alpha_reloc_type)
RELOC_NUMBER (R_ALPHA_SREL32, 10) /* PC relative 32 bit */
RELOC_NUMBER (R_ALPHA_SREL64, 11) /* PC relative 64 bit */
-/* Inherited these from ECOFF, but they are not particularly useful
- and are depreciated. And not implemented in the BFD, btw. */
- RELOC_NUMBER (R_ALPHA_OP_PUSH, 12) /* OP stack push */
- RELOC_NUMBER (R_ALPHA_OP_STORE, 13) /* OP stack pop and store */
- RELOC_NUMBER (R_ALPHA_OP_PSUB, 14) /* OP stack subtract */
- RELOC_NUMBER (R_ALPHA_OP_PRSHIFT, 15) /* OP stack right shift */
-
- RELOC_NUMBER (R_ALPHA_GPVALUE, 16)
- RELOC_NUMBER (R_ALPHA_GPRELHIGH, 17)
- RELOC_NUMBER (R_ALPHA_GPRELLOW, 18)
- RELOC_NUMBER (R_ALPHA_IMMED_GP_16, 19)
- RELOC_NUMBER (R_ALPHA_IMMED_GP_HI32, 20)
- RELOC_NUMBER (R_ALPHA_IMMED_SCN_HI32, 21)
- RELOC_NUMBER (R_ALPHA_IMMED_BR_HI32, 22)
- RELOC_NUMBER (R_ALPHA_IMMED_LO32, 23)
-
-/* These relocations are specific to shared libraries. */
+ /* Skip 12 - 16; deprecated ECOFF relocs. */
+
+ RELOC_NUMBER (R_ALPHA_GPRELHIGH, 17) /* GP relative 32 bit, high 16 bits */
+ RELOC_NUMBER (R_ALPHA_GPRELLOW, 18) /* GP relative 32 bit, low 16 bits */
+ RELOC_NUMBER (R_ALPHA_GPREL16, 19) /* GP relative 16 bit */
+
+ /* Skip 20 - 23; deprecated ECOFF relocs. */
+
+ /* These relocations are specific to shared libraries. */
RELOC_NUMBER (R_ALPHA_COPY, 24) /* Copy symbol at runtime */
RELOC_NUMBER (R_ALPHA_GLOB_DAT, 25) /* Create GOT entry */
RELOC_NUMBER (R_ALPHA_JMP_SLOT, 26) /* Create PLT entry */
RELOC_NUMBER (R_ALPHA_RELATIVE, 27) /* Adjust by program base */
+ /* Like BRADDR, but assert that the source and target object file
+ share the same GP value, and adjust the target address for
+ STO_ALPHA_STD_GPLOAD. */
+ RELOC_NUMBER (R_ALPHA_BRSGP, 28)
+
END_RELOC_NUMBERS (R_ALPHA_max)
#endif /* _ELF_ALPHA_H */
diff --git a/include/elf/arm.h b/include/elf/arm.h
index 89dffe1..269a225 100644
--- a/include/elf/arm.h
+++ b/include/elf/arm.h
@@ -1,5 +1,5 @@
/* ARM ELF support for BFD.
- Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -33,6 +33,7 @@
#define EF_ARM_NEW_ABI 0x80
#define EF_ARM_OLD_ABI 0x100
#define EF_ARM_SOFT_FLOAT 0x200
+#define EF_ARM_VFP_FLOAT 0x400
/* Other constants defined in the ARM ELF spec. version B-01. */
#define EF_ARM_SYMSARESORTED 0x04 /* NB conflicts with EF_INTERWORK */
@@ -51,6 +52,7 @@
#define F_APCS_FLOAT EF_ARM_APCS_FLOAT
#define F_PIC EF_ARM_PIC
#define F_SOFT_FLOAT EF_ARM_SOFT_FLOAT
+#define F_VFP_FLOAT EF_ARM_VFP_FLOAT
/* Additional symbol types for Thumb. */
#define STT_ARM_TFUNC STT_LOPROC /* A Thumb function. */
diff --git a/include/elf/common.h b/include/elf/common.h
index e0b80e4..d6e45fc 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
+ 2001, 2002
Free Software Foundation, Inc.
Written by Fred Fish @ Cygnus Support, from information published
@@ -162,6 +162,18 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#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 */
/* If it is necessary to assign new unofficial EM_* values, please pick large
random numbers (0x8523, 0xa7f2, etc.) to minimize the chances of collision
@@ -175,7 +187,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
unofficial e_machine number should eventually ask registry@sco.com for
an officially blessed number to be added to the list above. */
-#define EM_PJ 99 /* picoJava */
+#define EM_PJ_OLD 99 /* picoJava */
/* Cygnus PowerPC ELF backend. Written in the absence of an ABI. */
#define EM_CYGNUS_POWERPC 0x9025
@@ -187,8 +199,8 @@ 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
-/* Cygnus ARC ELF backend. Written in the absence of an ABI. */
-#define EM_CYGNUS_ARC 0x9040
+/* (Depreciated) 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
@@ -218,11 +230,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* AVR magic number
Written in the absense of an ABI. */
-#define EM_AVR 0x1057
+#define EM_AVR_OLD 0x1057
/* OpenRISC magic number
Written in the absense of an ABI. */
-#define EM_OPENRISC 0x3426
+#define EM_OPENRISC_OLD 0x3426
+
+#define EM_XSTORMY16 0xad45
/* See the above comment before you add a new EM_* value here. */
@@ -245,6 +259,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define PT_LOPROC 0x70000000 /* Processor-specific */
#define PT_HIPROC 0x7FFFFFFF /* Processor-specific */
+#define PT_GNU_EH_FRAME (PT_LOOS + 0x474e550)
+
/* Program segment permissions, in program header p_flags field. */
#define PF_X (1 << 0) /* Segment is executable */
@@ -329,10 +345,18 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define NT_LWPSINFO 17 /* Has a struct lwpsinfo_t */
#define NT_WIN32PSTATUS 18 /* Has a struct win32_pstatus */
+
+/* Note segments for core files on NetBSD systems. Note name
+ must start with "NetBSD-CORE". */
+
+#define NT_NETBSDCORE_PROCINFO 1 /* Has a struct procinfo */
+#define NT_NETBSDCORE_FIRSTMACH 32 /* start of machdep note types */
+
+
/* Values of note segment descriptor types for object files. */
-/* (Only for hppa right now. Should this be moved elsewhere?) */
#define NT_VERSION 1 /* Contains a version string. */
+#define NT_ARCH 2 /* Contains an architecture string. */
/* These three macros disassemble and assemble a symbol table st_info field,
which contains the symbol binding and symbol type. The STB_ and STT_
@@ -394,8 +418,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#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 it held elsewhere */
+#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
become part of an executable or shared library. */
diff --git a/include/elf/dwarf2.h b/include/elf/dwarf2.h
index d7c1640..53eb655 100644
--- a/include/elf/dwarf2.h
+++ b/include/elf/dwarf2.h
@@ -1,6 +1,6 @@
/* Declarations and definitions of codes relating to the DWARF2 symbolic
debugging information format.
- Copyright 1992, 1993, 1995, 1996, 1999, 2000, 2001
+ Copyright (C) 1992, 1993, 1995, 1996, 1997, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
Written by Gary Funck (gary@intrepid.com) The Ada Joint Program
@@ -10,21 +10,22 @@
Derived from the DWARF 1 implementation written by Ron Guilmette
(rfg@netcom.com), November 1990.
-This file is part of GNU CC.
+This file is part of GCC.
-GNU CC 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.
+GCC 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.
-GNU CC is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+GCC 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 GNU CC; see the file COPYING. If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+along with GCC; see the file COPYING. If not, write to the Free
+Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+02111-1307, USA. */
/* This file is derived from the DWARF specification (a public document)
Revision 2.0.0 (July 27, 1993) developed by the UNIX International
@@ -32,7 +33,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
by UNIX International. Copies of this specification are available from
UNIX International, 20 Waterview Boulevard, Parsippany, NJ, 07054.
- This file also now contains definitions from the DWARF 2.1 specification. */
+ This file also now contains definitions from the DWARF 3 specification. */
/* This file is shared between GCC and GDB, and should not contain
prototypes. */
@@ -177,7 +178,7 @@ enum dwarf_tag
DW_TAG_variant_part = 0x33,
DW_TAG_variable = 0x34,
DW_TAG_volatile_type = 0x35,
- /* DWARF 2.1. */
+ /* DWARF 3. */
DW_TAG_dwarf_procedure = 0x36,
DW_TAG_restrict_type = 0x37,
DW_TAG_interface_type = 0x38,
@@ -190,8 +191,8 @@ enum dwarf_tag
DW_TAG_MIPS_loop = 0x4081,
/* GNU extensions. */
DW_TAG_format_label = 0x4101, /* For FORTRAN 77 and Fortran 90. */
- DW_TAG_function_template = 0x4102, /* for C++ */
- DW_TAG_class_template = 0x4103, /* for C++ */
+ DW_TAG_function_template = 0x4102, /* For C++. */
+ DW_TAG_class_template = 0x4103, /* For C++. */
DW_TAG_GNU_BINCL = 0x4104,
DW_TAG_GNU_EINCL = 0x4105
};
@@ -295,7 +296,7 @@ enum dwarf_attribute
DW_AT_variable_parameter = 0x4b,
DW_AT_virtuality = 0x4c,
DW_AT_vtable_elem_location = 0x4d,
- /* DWARF 2.1 values. */
+ /* DWARF 3 values. */
DW_AT_allocated = 0x4e,
DW_AT_associated = 0x4f,
DW_AT_data_location = 0x50,
@@ -326,7 +327,9 @@ enum dwarf_attribute
DW_AT_mac_info = 0x2103,
DW_AT_src_coords = 0x2104,
DW_AT_body_begin = 0x2105,
- DW_AT_body_end = 0x2106
+ DW_AT_body_end = 0x2106,
+ /* VMS Extensions. */
+ DW_AT_VMS_rtnbeg_pd_address = 0x2201
};
#define DW_AT_lo_user 0x2000 /* Implementation-defined range start. */
@@ -480,10 +483,10 @@ enum dwarf_location_atom
DW_OP_deref_size = 0x94,
DW_OP_xderef_size = 0x95,
DW_OP_nop = 0x96,
- /* DWARF 2.1 extensions. */
+ /* DWARF 3 extensions. */
DW_OP_push_object_address = 0x97,
- DW_OP_call2 = 0x98, /* 1 2-byte offset of DIE. */
- DW_OP_call4 = 0x99, /* 1 4-byte offset of DIE. */
+ DW_OP_call2 = 0x98,
+ DW_OP_call4 = 0x99,
DW_OP_calli = 0x9a
};
@@ -502,7 +505,7 @@ enum dwarf_type
DW_ATE_signed_char = 0x6,
DW_ATE_unsigned = 0x7,
DW_ATE_unsigned_char = 0x8,
- /* DWARF 2.1. */
+ /* DWARF 3. */
DW_ATE_imaginary_float = 0x9
};
@@ -588,7 +591,11 @@ enum dwarf_line_number_ops
DW_LNS_negate_stmt = 6,
DW_LNS_set_basic_block = 7,
DW_LNS_const_add_pc = 8,
- DW_LNS_fixed_advance_pc = 9
+ DW_LNS_fixed_advance_pc = 9,
+ /* DWARF 3. */
+ DW_LNS_set_prologue_end = 10,
+ DW_LNS_set_epilogue_begin = 11,
+ DW_LNS_set_isa = 12
};
/* Line number extended opcodes. */
@@ -620,9 +627,10 @@ enum dwarf_call_frame_info
DW_CFA_def_cfa = 0x0c,
DW_CFA_def_cfa_register = 0x0d,
DW_CFA_def_cfa_offset = 0x0e,
+
+ /* DWARF 3. */
DW_CFA_def_cfa_expression = 0x0f,
DW_CFA_expression = 0x10,
- /* Dwarf 2.1. */
DW_CFA_offset_extended_sf = 0x11,
DW_CFA_def_cfa_sf = 0x12,
DW_CFA_def_cfa_offset_sf = 0x13,
@@ -662,7 +670,7 @@ enum dwarf_source_language
DW_LANG_Pascal83 = 0x0009,
DW_LANG_Modula2 = 0x000a,
DW_LANG_Java = 0x000b,
- /* DWARF 2.1. */
+ /* DWARF 3. */
DW_LANG_C99 = 0x000c,
DW_LANG_Ada95 = 0x000d,
DW_LANG_Fortran95 = 0x000e,
diff --git a/include/elf/external.h b/include/elf/external.h
index 38e6596..403ee62 100644
--- a/include/elf/external.h
+++ b/include/elf/external.h
@@ -143,6 +143,10 @@ typedef struct {
unsigned char st_size[8]; /* Associated symbol size */
} Elf64_External_Sym;
+typedef struct {
+ unsigned char est_shndx[4]; /* Section index */
+} Elf_External_Sym_Shndx;
+
/* Note segments */
typedef struct {
diff --git a/include/elf/h8.h b/include/elf/h8.h
new file mode 100644
index 0000000..ac9db56
--- /dev/null
+++ b/include/elf/h8.h
@@ -0,0 +1,96 @@
+/* H8300/h8500 ELF support for BFD.
+ Copyright 2001 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_H8_H
+#define _ELF_H8_H
+
+#include "elf/reloc-macros.h"
+
+/* Relocations. */
+/* Relocations 59..63 are GNU extensions. */
+START_RELOC_NUMBERS (elf_h8_reloc_type)
+ RELOC_NUMBER (R_H8_NONE, 0)
+ RELOC_NUMBER (R_H8_DIR32, 1)
+ RELOC_NUMBER (R_H8_DIR32_28, 2)
+ RELOC_NUMBER (R_H8_DIR32_24, 3)
+ RELOC_NUMBER (R_H8_DIR32_16, 4)
+ RELOC_NUMBER (R_H8_DIR32U, 6)
+ RELOC_NUMBER (R_H8_DIR32U_28, 7)
+ RELOC_NUMBER (R_H8_DIR32U_24, 8)
+ RELOC_NUMBER (R_H8_DIR32U_20, 9)
+ RELOC_NUMBER (R_H8_DIR32U_16, 10)
+ RELOC_NUMBER (R_H8_DIR24, 11)
+ RELOC_NUMBER (R_H8_DIR24_20, 12)
+ RELOC_NUMBER (R_H8_DIR24_16, 13)
+ RELOC_NUMBER (R_H8_DIR24U, 14)
+ RELOC_NUMBER (R_H8_DIR24U_20, 15)
+ RELOC_NUMBER (R_H8_DIR24U_16, 16)
+ RELOC_NUMBER (R_H8_DIR16, 17)
+ RELOC_NUMBER (R_H8_DIR16U, 18)
+ RELOC_NUMBER (R_H8_DIR16S_32, 19)
+ RELOC_NUMBER (R_H8_DIR16S_28, 20)
+ RELOC_NUMBER (R_H8_DIR16S_24, 21)
+ RELOC_NUMBER (R_H8_DIR16S_20, 22)
+ RELOC_NUMBER (R_H8_DIR16S, 23)
+ RELOC_NUMBER (R_H8_DIR8, 24)
+ RELOC_NUMBER (R_H8_DIR8U, 25)
+ RELOC_NUMBER (R_H8_DIR8Z_32, 26)
+ RELOC_NUMBER (R_H8_DIR8Z_28, 27)
+ RELOC_NUMBER (R_H8_DIR8Z_24, 28)
+ RELOC_NUMBER (R_H8_DIR8Z_20, 29)
+ RELOC_NUMBER (R_H8_DIR8Z_16, 30)
+ RELOC_NUMBER (R_H8_PCREL16, 31)
+ RELOC_NUMBER (R_H8_PCREL8, 32)
+ RELOC_NUMBER (R_H8_BPOS, 33)
+ FAKE_RELOC (R_H8_FIRST_INVALID_DIR_RELOC, 34)
+ FAKE_RELOC (R_H8_LAST_INVALID_DIR_RELOC, 58)
+ RELOC_NUMBER (R_H8_DIR16A8, 59)
+ RELOC_NUMBER (R_H8_DIR16R8, 60)
+ RELOC_NUMBER (R_H8_DIR24A8, 61)
+ RELOC_NUMBER (R_H8_DIR24R8, 62)
+ RELOC_NUMBER (R_H8_DIR32A16, 63)
+ RELOC_NUMBER (R_H8_ABS32, 65)
+ RELOC_NUMBER (R_H8_ABS32A16, 127)
+ RELOC_NUMBER (R_H8_SYM, 128)
+ RELOC_NUMBER (R_H8_OPneg, 129)
+ RELOC_NUMBER (R_H8_OPadd, 130)
+ RELOC_NUMBER (R_H8_OPsub, 131)
+ RELOC_NUMBER (R_H8_OPmul, 132)
+ RELOC_NUMBER (R_H8_OPdiv, 133)
+ RELOC_NUMBER (R_H8_OPshla, 134)
+ RELOC_NUMBER (R_H8_OPshra, 135)
+ RELOC_NUMBER (R_H8_OPsctsize, 136)
+ RELOC_NUMBER (R_H8_OPhword, 137)
+ RELOC_NUMBER (R_H8_OPlword, 138)
+ RELOC_NUMBER (R_H8_OPhigh, 139)
+ RELOC_NUMBER (R_H8_OPlow, 140)
+ RELOC_NUMBER (R_H8_OPscttop, 141)
+END_RELOC_NUMBERS (R_H8_max)
+
+/* Machine variant if we know it. This field was invented at Cygnus,
+ but it is hoped that other vendors will adopt it. If some standard
+ is developed, this code should be changed to follow it. */
+
+#define EF_H8_MACH 0x00FF0000
+
+#define E_H8_MACH_H8300 0x00800000
+#define E_H8_MACH_H8300H 0x00810000
+#define E_H8_MACH_H8300S 0x00820000
+
+#endif
diff --git a/include/elf/ia64.h b/include/elf/ia64.h
index edfc7c5..5e632ed 100644
--- a/include/elf/ia64.h
+++ b/include/elf/ia64.h
@@ -49,6 +49,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define ELF_STRING_ia64_unwind_info ".IA_64.unwind_info"
#define ELF_STRING_ia64_unwind_once ".gnu.linkonce.ia64unw."
#define ELF_STRING_ia64_unwind_info_once ".gnu.linkonce.ia64unwi."
+/* .IA_64.unwind_hdr is only used by HP-UX. */
+#define ELF_STRING_ia64_unwind_hdr ".IA_64.unwind_hdr"
/* Bits in the sh_flags field of Elf64_Shdr: */
@@ -60,6 +62,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define SHT_IA_64_EXT (SHT_LOPROC + 0) /* extension bits */
#define SHT_IA_64_UNWIND (SHT_LOPROC + 1) /* unwind bits */
+/* SHT_IA_64_HP_OPT_ANOT is only generated by HPUX compilers for its
+ optimization annotation section. GCC does not generate it but we
+ want readelf to know what they are. Do not use two capital Ns in
+ annotate or sed will turn it into 32 or 64 during the build. */
+#define SHT_IA_64_HP_OPT_ANOT 0x60000004
+
/* Bits in the p_flags field of Elf64_Phdr: */
#define PF_IA_64_NORECOV 0x80000000
@@ -69,10 +77,24 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define PT_IA_64_ARCHEXT (PT_LOPROC + 0) /* arch extension bits */
#define PT_IA_64_UNWIND (PT_LOPROC + 1) /* ia64 unwind bits */
+/* HP-UX specific values for p_type in Elf64_Phdr.
+ These values are currently just used to make
+ readelf more usable on HP-UX. */
+
+#define PT_IA_64_HP_OPT_ANOT (PT_LOOS + 0x12)
+#define PT_IA_64_HP_HSL_ANOT (PT_LOOS + 0x13)
+#define PT_IA_64_HP_STACK (PT_LOOS + 0x14)
+
/* Possible values for d_tag in Elf64_Dyn: */
#define DT_IA_64_PLT_RESERVE (DT_LOPROC + 0)
+/* This section only used by HP-UX, The HP linker gives weak symbols
+ precedence over regular common symbols. We want common to override
+ weak. Using this common instead of SHN_COMMON does that. */
+
+#define SHN_IA_64_ANSI_COMMON 0xFF00
+
/* ia64-specific relocation types: */
/* Relocs apply to specific instructions within a bundle. The least
diff --git a/include/elf/internal.h b/include/elf/internal.h
index eb79917..5d39d3a 100644
--- a/include/elf/internal.h
+++ b/include/elf/internal.h
@@ -1,5 +1,5 @@
/* ELF support for BFD.
- Copyright 1991, 1992, 1993, 1994, 1995, 1997, 1998, 2000
+ Copyright 1991, 1992, 1993, 1994, 1995, 1997, 1998, 2000, 2001
Free Software Foundation, Inc.
Written by Fred Fish @ Cygnus Support, from information published
@@ -42,20 +42,20 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define EI_NIDENT 16 /* Size of e_ident[] */
typedef struct elf_internal_ehdr {
- unsigned char e_ident[EI_NIDENT]; /* ELF "magic number" */
- bfd_vma e_entry; /* Entry point virtual address */
- bfd_size_type e_phoff; /* Program header table file offset */
- bfd_size_type e_shoff; /* Section header table file offset */
- unsigned long e_version; /* Identifies object file version */
- unsigned long e_flags; /* Processor-specific flags */
- unsigned short e_type; /* Identifies object file type */
- unsigned short e_machine; /* Specifies required architecture */
- unsigned short e_ehsize; /* ELF header size in bytes */
- unsigned short e_phentsize; /* Program header table entry size */
- unsigned short e_phnum; /* Program header table entry count */
- unsigned short e_shentsize; /* Section header table entry size */
- unsigned short e_shnum; /* Section header table entry count */
- unsigned short e_shstrndx; /* Section header string table index */
+ unsigned char e_ident[EI_NIDENT]; /* ELF "magic number" */
+ bfd_vma e_entry; /* Entry point virtual address */
+ bfd_size_type e_phoff; /* Program header table file offset */
+ bfd_size_type e_shoff; /* Section header table file offset */
+ unsigned long e_version; /* Identifies object file version */
+ unsigned long e_flags; /* Processor-specific flags */
+ unsigned short e_type; /* Identifies object file type */
+ unsigned short e_machine; /* Specifies required architecture */
+ unsigned int e_ehsize; /* ELF header size in bytes */
+ unsigned int e_phentsize; /* Program header table entry size */
+ unsigned int e_phnum; /* Program header table entry count */
+ unsigned int e_shentsize; /* Section header table entry size */
+ unsigned int e_shnum; /* Section header table entry count */
+ unsigned int e_shstrndx; /* Section header string table index */
} Elf_Internal_Ehdr;
#define elf32_internal_ehdr elf_internal_ehdr
@@ -98,7 +98,7 @@ typedef struct elf_internal_shdr {
/* The internal rep also has some cached info associated with it. */
asection * bfd_section; /* Associated BFD section. */
- PTR contents; /* Section contents. */
+ unsigned char *contents; /* Section contents. */
} Elf_Internal_Shdr;
#define elf32_internal_shdr elf_internal_shdr
@@ -114,7 +114,7 @@ struct elf_internal_sym {
unsigned long st_name; /* Symbol name, index in string tbl */
unsigned char st_info; /* Type and binding attributes */
unsigned char st_other; /* Visibilty, and target specific */
- unsigned short st_shndx; /* Associated section index */
+ unsigned int st_shndx; /* Associated section index */
};
typedef struct elf_internal_sym Elf_Internal_Sym;
@@ -153,7 +153,7 @@ typedef struct elf_internal_rel {
typedef struct elf_internal_rela {
bfd_vma r_offset; /* Location at which to apply the action */
bfd_vma r_info; /* Index and Type of relocation */
- bfd_signed_vma r_addend; /* Constant addend used to compute value */
+ bfd_vma r_addend; /* Constant addend used to compute value */
} Elf_Internal_Rela;
#define elf32_internal_rela elf_internal_rela
diff --git a/include/elf/mips.h b/include/elf/mips.h
index 6ad8d5b..3b6fe99 100644
--- a/include/elf/mips.h
+++ b/include/elf/mips.h
@@ -172,12 +172,10 @@ END_RELOC_NUMBERS (R_MIPS_maxext)
the rest are open. */
#define E_MIPS_MACH_3900 0x00810000
-
#define E_MIPS_MACH_4010 0x00820000
#define E_MIPS_MACH_4100 0x00830000
#define E_MIPS_MACH_4650 0x00850000
#define E_MIPS_MACH_4111 0x00880000
-#define E_MIPS_MACH_MIPS32_4K 0x00890000
#define E_MIPS_MACH_SB1 0x008a0000
/* Processor specific section indices. These sections do not actually
diff --git a/include/elf/mmix.h b/include/elf/mmix.h
new file mode 100644
index 0000000..e3be26b
--- /dev/null
+++ b/include/elf/mmix.h
@@ -0,0 +1,168 @@
+/* MMIX support for BFD.
+ Copyright (C) 2001, 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. */
+
+/* This file holds definitions specific to the MMIX ELF ABI. */
+#ifndef ELF_MMIX_H
+#define ELF_MMIX_H
+
+#include "elf/reloc-macros.h"
+
+/* Relocations. */
+START_RELOC_NUMBERS (elf_mmix_reloc_type)
+ RELOC_NUMBER (R_MMIX_NONE, 0)
+
+ /* Standard absolute relocations. */
+ RELOC_NUMBER (R_MMIX_8, 1)
+ RELOC_NUMBER (R_MMIX_16, 2)
+ RELOC_NUMBER (R_MMIX_24, 3)
+ RELOC_NUMBER (R_MMIX_32, 4)
+ RELOC_NUMBER (R_MMIX_64, 5)
+
+ /* Standard relative relocations. */
+ RELOC_NUMBER (R_MMIX_PC_8, 6)
+ RELOC_NUMBER (R_MMIX_PC_16, 7)
+ RELOC_NUMBER (R_MMIX_PC_24, 8)
+ RELOC_NUMBER (R_MMIX_PC_32, 9)
+ RELOC_NUMBER (R_MMIX_PC_64, 10)
+
+ /* GNU extensions for C++ vtables. */
+ RELOC_NUMBER (R_MMIX_GNU_VTINHERIT, 11)
+ RELOC_NUMBER (R_MMIX_GNU_VTENTRY, 12)
+
+ /* A GETA instruction. */
+ RELOC_NUMBER (R_MMIX_GETA, 13)
+ RELOC_NUMBER (R_MMIX_GETA_1, 14)
+ RELOC_NUMBER (R_MMIX_GETA_2, 15)
+ RELOC_NUMBER (R_MMIX_GETA_3, 16)
+
+ /* A conditional branch instruction. */
+ RELOC_NUMBER (R_MMIX_CBRANCH, 17)
+ RELOC_NUMBER (R_MMIX_CBRANCH_J, 18)
+ RELOC_NUMBER (R_MMIX_CBRANCH_1, 19)
+ RELOC_NUMBER (R_MMIX_CBRANCH_2, 20)
+ RELOC_NUMBER (R_MMIX_CBRANCH_3, 21)
+
+ /* A PUSHJ instruction. */
+ RELOC_NUMBER (R_MMIX_PUSHJ, 22)
+ RELOC_NUMBER (R_MMIX_PUSHJ_1, 23)
+ RELOC_NUMBER (R_MMIX_PUSHJ_2, 24)
+ RELOC_NUMBER (R_MMIX_PUSHJ_3, 25)
+
+ /* A JMP instruction. */
+ RELOC_NUMBER (R_MMIX_JMP, 26)
+ RELOC_NUMBER (R_MMIX_JMP_1, 27)
+ RELOC_NUMBER (R_MMIX_JMP_2, 28)
+ RELOC_NUMBER (R_MMIX_JMP_3, 29)
+
+ /* A relative address such as in a GETA or a branch. */
+ RELOC_NUMBER (R_MMIX_ADDR19, 30)
+
+ /* A relative address such as in a JMP (only). */
+ RELOC_NUMBER (R_MMIX_ADDR27, 31)
+
+ /* A general register or a number 0..255. */
+ RELOC_NUMBER (R_MMIX_REG_OR_BYTE, 32)
+
+ /* A general register. */
+ RELOC_NUMBER (R_MMIX_REG, 33)
+
+ /* A global register and an offset, the global register (allocated at
+ link time) contents plus the offset made equivalent to the relocation
+ expression at link time. The relocation must point at the Y field of
+ an instruction. */
+ RELOC_NUMBER (R_MMIX_BASE_PLUS_OFFSET, 34)
+
+ /* A LOCAL assertion. */
+ RELOC_NUMBER (R_MMIX_LOCAL, 35)
+END_RELOC_NUMBERS (R_MMIX_max)
+
+
+/* Section Attributes. */
+/* A section containing necessary information for relaxation. */
+#define SHF_MMIX_CANRELAX 0x80000000
+
+/* Symbol attributes. */
+/* A symbol with this section-index is a register. */
+#define SHN_REGISTER SHN_LOPROC
+
+/* This section holds contents for each initialized register, at VMA
+ regno*8. A symbol relative to this section will be transformed to an
+ absolute symbol with the value corresponding to the register number at
+ final link time. A symbol with a value outside the inclusive range
+ 32*8 .. 254*8 is an error. It is highly recommended to only use an
+ upper bound of 253*8 or lower as specified in the (currently
+ unspecified) ABI. */
+#define MMIX_REG_CONTENTS_SECTION_NAME ".MMIX.reg_contents"
+
+/* At link time, a section by this name is created, expected to be
+ included in MMIX_REG_CONTENTS_SECTION_NAME in the output. */
+#define MMIX_LD_ALLOCATED_REG_CONTENTS_SECTION_NAME \
+ ".MMIX.reg_contents.linker_allocated"
+
+/* This is a faked section holding symbols with SHN_REGISTER. Don't
+ confuse it with MMIX_REG_CONTENTS_SECTION_NAME; this one has no
+ contents, just values. It is an error for a value in this section to
+ be outside the range 32..255 and it must never become an actual section
+ in an object file. */
+#define MMIX_REG_SECTION_NAME "*REG*"
+
+/* Appended with a number N=0..65535, this is a representation of the
+ mmixal "BSPEC N" ... "ESPEC" directive pair; the contents go into an
+ ELF section by name ".MMIX.spec_data.N". */
+#define MMIX_OTHER_SPEC_SECTION_PREFIX ".MMIX.spec_data."
+
+/* A section SECNAME is noted to start at "__.MMIX.start.SECNAME" by the
+ presence of this symbol. Currently only implemented for ".text"
+ through the symbol "__.MMIX.start..text". */
+#define MMIX_LOC_SECTION_START_SYMBOL_PREFIX "__.MMIX.start."
+
+/* This symbol is always a function. */
+#define MMIX_START_SYMBOL_NAME "Main"
+
+
+/* We smuggle in a few MMO specifics here. We don't make a specific MMO
+ file, since we can't reasonably support MMO without ELF; we have to
+ include this file anyway. */
+
+#define MMO_TEXT_SECTION_NAME ".text"
+#define MMO_DATA_SECTION_NAME ".data"
+
+/* A definition for the flags we put in spec data in files. A copy of our
+ own of some flags to keep immune to BFD flag changes. See section.c of
+ 2001-07-18 for flag documentation. */
+#define MMO_SEC_ALLOC 0x001
+#define MMO_SEC_LOAD 0x002
+#define MMO_SEC_RELOC 0x004
+#define MMO_SEC_READONLY 0x010
+#define MMO_SEC_CODE 0x020
+#define MMO_SEC_DATA 0x040
+#define MMO_SEC_NEVER_LOAD 0x400
+#define MMO_SEC_IS_COMMON 0x8000
+#define MMO_SEC_DEBUGGING 0x10000
+
+#ifdef BFD_ARCH_SIZE
+extern boolean _bfd_mmix_prepare_linker_allocated_gregs
+ PARAMS ((bfd *, struct bfd_link_info *));
+extern boolean _bfd_mmix_finalize_linker_allocated_gregs
+ PARAMS ((bfd *, struct bfd_link_info *));
+extern boolean _bfd_mmix_check_all_relocs
+ PARAMS ((bfd *, struct bfd_link_info *));
+#endif
+
+#endif /* ELF_MMIX_H */
diff --git a/include/elf/or32.h b/include/elf/or32.h
new file mode 100644
index 0000000..14884f3
--- /dev/null
+++ b/include/elf/or32.h
@@ -0,0 +1,62 @@
+/* OR1K ELF support for BFD. Derived from ppc.h.
+ Copyright (C) 2002 Free Software Foundation, Inc.
+ Contributed by Ivan Guzvinec <ivang@opencores.org>
+
+ 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_OR1K_H
+#define _ELF_OR1K_H
+
+#include "elf/reloc-macros.h"
+
+/* Relocations. */
+START_RELOC_NUMBERS (elf_or32_reloc_type)
+ RELOC_NUMBER (R_OR32_NONE, 0)
+ RELOC_NUMBER (R_OR32_32, 1)
+ RELOC_NUMBER (R_OR32_16, 2)
+ RELOC_NUMBER (R_OR32_8, 3)
+ RELOC_NUMBER (R_OR32_CONST, 4)
+ RELOC_NUMBER (R_OR32_CONSTH, 5)
+ RELOC_NUMBER (R_OR32_JUMPTARG, 6)
+ RELOC_NUMBER (R_OR32_GNU_VTENTRY, 7)
+ RELOC_NUMBER (R_OR32_GNU_VTINHERIT, 8)
+END_RELOC_NUMBERS (R_OR32_max)
+
+/* Four bit OR32 machine type field. */
+#define EF_OR32_MACH 0x0000000f
+
+/* Various CPU types. */
+#define E_OR32_MACH_BASE 0x00000000
+#define E_OR32_MACH_UNUSED1 0x00000001
+#define E_OR32_MACH_UNUSED2 0x00000002
+#define E_OR32_MACH_UNUSED4 0x00000003
+
+/* Processor specific section headers, sh_type field */
+#define SHT_ORDERED SHT_HIPROC /* Link editor is to sort the \
+ entries in this section \
+ based on the address \
+ specified in the associated \
+ symbol table entry. */
+
+/* Processor specific section flags, sh_flags field */
+#define SHF_EXCLUDE 0x80000000 /* Link editor is to exclude \
+ this section from executable \
+ and shared objects that it \
+ builds when those objects \
+ are not to be furhter \
+ relocated. */
+#endif /* _ELF_OR1K_H */
diff --git a/include/elf/ppc.h b/include/elf/ppc.h
index 426961e..8e4af62 100644
--- a/include/elf/ppc.h
+++ b/include/elf/ppc.h
@@ -1,5 +1,5 @@
/* PPC ELF support for BFD.
- Copyright 1995, 1996, 1998, 2000 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1998, 2000, 2001 Free Software Foundation, Inc.
By Michael Meissner, Cygnus Support, <meissner@cygnus.com>, from information
in the System V Application Binary Interface, PowerPC Processor Supplement
@@ -68,6 +68,40 @@ START_RELOC_NUMBERS (elf_ppc_reloc_type)
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)
/* The remaining relocs are from the Embedded ELF ABI, and are not
in the SVR4 ELF ABI. */
@@ -98,6 +132,47 @@ START_RELOC_NUMBERS (elf_ppc_reloc_type)
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
/* Processor specific flags for the ELF header e_flags field. */
diff --git a/include/elf/sh.h b/include/elf/sh.h
index 700ca3e..1480f49 100644
--- a/include/elf/sh.h
+++ b/include/elf/sh.h
@@ -1,5 +1,5 @@
/* SH ELF support for BFD.
- Copyright 1998, 2000 Free Software Foundation, Inc.
+ Copyright 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -34,6 +34,9 @@
#define EF_SH3E 8
#define EF_SH4 9
+/* This one can only mix in objects from other EF_SH5 objects. */
+#define EF_SH5 10
+
#define EF_SH_MERGE_MACH(mach1, mach2) \
(((((mach1) == EF_SH3 || (mach1) == EF_SH_UNKNOWN) && (mach2) == EF_SH_DSP) \
|| ((mach1) == EF_SH_DSP \
@@ -47,6 +50,77 @@
? EF_SH4 \
: ((mach1) > (mach2) ? (mach1) : (mach2)))
+/* Flags for the st_other symbol field.
+ Keep away from the STV_ visibility flags (bit 0..1). */
+
+/* A reference to this symbol should by default add 1. */
+#define STO_SH5_ISA32 (1 << 2)
+
+/* Section contains only SHmedia code (no SHcompact code). */
+#define SHF_SH5_ISA32 0x40000000
+
+/* Section contains both SHmedia and SHcompact code, and possibly also
+ constants. */
+#define SHF_SH5_ISA32_MIXED 0x20000000
+
+/* If applied to a .cranges section, marks that the section is sorted by
+ increasing cr_addr values. */
+#define SHT_SH5_CR_SORTED 0x80000001
+
+/* Symbol should be handled as DataLabel (attached to global SHN_UNDEF
+ 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 boolean sh64_address_is_shmedia PARAMS ((asection *, bfd_vma));
+
+/* 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. */
@@ -79,7 +153,16 @@ START_RELOC_NUMBERS (elf_sh_reloc_type)
RELOC_NUMBER (R_SH_LOOP_START, 36)
RELOC_NUMBER (R_SH_LOOP_END, 37)
FAKE_RELOC (R_SH_FIRST_INVALID_RELOC_2, 38)
- FAKE_RELOC (R_SH_LAST_INVALID_RELOC_2, 159)
+ FAKE_RELOC (R_SH_LAST_INVALID_RELOC_2, 44)
+ RELOC_NUMBER (R_SH_DIR5U, 45)
+ RELOC_NUMBER (R_SH_DIR6U, 46)
+ RELOC_NUMBER (R_SH_DIR6S, 47)
+ RELOC_NUMBER (R_SH_DIR10S, 48)
+ RELOC_NUMBER (R_SH_DIR10SW, 49)
+ RELOC_NUMBER (R_SH_DIR10SL, 50)
+ RELOC_NUMBER (R_SH_DIR10SQ, 51)
+ FAKE_RELOC (R_SH_FIRST_INVALID_RELOC_3, 52)
+ FAKE_RELOC (R_SH_LAST_INVALID_RELOC_3, 159)
RELOC_NUMBER (R_SH_GOT32, 160)
RELOC_NUMBER (R_SH_PLT32, 161)
RELOC_NUMBER (R_SH_COPY, 162)
@@ -88,6 +171,51 @@ START_RELOC_NUMBERS (elf_sh_reloc_type)
RELOC_NUMBER (R_SH_RELATIVE, 165)
RELOC_NUMBER (R_SH_GOTOFF, 166)
RELOC_NUMBER (R_SH_GOTPC, 167)
+ RELOC_NUMBER (R_SH_GOTPLT32, 168)
+ RELOC_NUMBER (R_SH_GOT_LOW16, 169)
+ RELOC_NUMBER (R_SH_GOT_MEDLOW16, 170)
+ RELOC_NUMBER (R_SH_GOT_MEDHI16, 171)
+ RELOC_NUMBER (R_SH_GOT_HI16, 172)
+ RELOC_NUMBER (R_SH_GOTPLT_LOW16, 173)
+ RELOC_NUMBER (R_SH_GOTPLT_MEDLOW16, 174)
+ RELOC_NUMBER (R_SH_GOTPLT_MEDHI16, 175)
+ RELOC_NUMBER (R_SH_GOTPLT_HI16, 176)
+ RELOC_NUMBER (R_SH_PLT_LOW16, 177)
+ RELOC_NUMBER (R_SH_PLT_MEDLOW16, 178)
+ RELOC_NUMBER (R_SH_PLT_MEDHI16, 179)
+ RELOC_NUMBER (R_SH_PLT_HI16, 180)
+ RELOC_NUMBER (R_SH_GOTOFF_LOW16, 181)
+ RELOC_NUMBER (R_SH_GOTOFF_MEDLOW16, 182)
+ RELOC_NUMBER (R_SH_GOTOFF_MEDHI16, 183)
+ RELOC_NUMBER (R_SH_GOTOFF_HI16, 184)
+ RELOC_NUMBER (R_SH_GOTPC_LOW16, 185)
+ RELOC_NUMBER (R_SH_GOTPC_MEDLOW16, 186)
+ RELOC_NUMBER (R_SH_GOTPC_MEDHI16, 187)
+ RELOC_NUMBER (R_SH_GOTPC_HI16, 188)
+ RELOC_NUMBER (R_SH_GOT10BY4, 189)
+ RELOC_NUMBER (R_SH_GOTPLT10BY4, 190)
+ RELOC_NUMBER (R_SH_GOT10BY8, 191)
+ RELOC_NUMBER (R_SH_GOTPLT10BY8, 192)
+ RELOC_NUMBER (R_SH_COPY64, 193)
+ RELOC_NUMBER (R_SH_GLOB_DAT64, 194)
+ RELOC_NUMBER (R_SH_JMP_SLOT64, 195)
+ RELOC_NUMBER (R_SH_RELATIVE64, 196)
+ FAKE_RELOC (R_SH_FIRST_INVALID_RELOC_4, 197)
+ FAKE_RELOC (R_SH_LAST_INVALID_RELOC_4, 241)
+ RELOC_NUMBER (R_SH_SHMEDIA_CODE, 242)
+ RELOC_NUMBER (R_SH_PT_16, 243)
+ RELOC_NUMBER (R_SH_IMMS16, 244)
+ RELOC_NUMBER (R_SH_IMMU16, 245)
+ RELOC_NUMBER (R_SH_IMM_LOW16, 246)
+ RELOC_NUMBER (R_SH_IMM_LOW16_PCREL, 247)
+ RELOC_NUMBER (R_SH_IMM_MEDLOW16, 248)
+ RELOC_NUMBER (R_SH_IMM_MEDLOW16_PCREL, 249)
+ RELOC_NUMBER (R_SH_IMM_MEDHI16, 250)
+ RELOC_NUMBER (R_SH_IMM_MEDHI16_PCREL, 251)
+ RELOC_NUMBER (R_SH_IMM_HI16, 252)
+ RELOC_NUMBER (R_SH_IMM_HI16_PCREL, 253)
+ RELOC_NUMBER (R_SH_64, 254)
+ RELOC_NUMBER (R_SH_64_PCREL, 255)
END_RELOC_NUMBERS (R_SH_max)
#endif
diff --git a/include/elf/xstormy16.h b/include/elf/xstormy16.h
new file mode 100644
index 0000000..ee6c551
--- /dev/null
+++ b/include/elf/xstormy16.h
@@ -0,0 +1,53 @@
+/* XSTORMY16 ELF support for BFD.
+ Copyright (C) 2001 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_XSTORMY16_H
+#define _ELF_XSTORMY16_H
+
+#include "elf/reloc-macros.h"
+
+/* Relocations. */
+START_RELOC_NUMBERS (elf_xstormy16_reloc_type)
+ RELOC_NUMBER (R_XSTORMY16_NONE, 0)
+
+ RELOC_NUMBER (R_XSTORMY16_32, 1)
+ RELOC_NUMBER (R_XSTORMY16_16, 2)
+ RELOC_NUMBER (R_XSTORMY16_8, 3)
+ RELOC_NUMBER (R_XSTORMY16_PC32, 4)
+ RELOC_NUMBER (R_XSTORMY16_PC16, 5)
+ RELOC_NUMBER (R_XSTORMY16_PC8, 6)
+
+ RELOC_NUMBER (R_XSTORMY16_REL_12, 7)
+ RELOC_NUMBER (R_XSTORMY16_24, 8)
+ RELOC_NUMBER (R_XSTORMY16_FPTR16, 9)
+
+ RELOC_NUMBER (R_XSTORMY16_GNU_VTINHERIT, 128)
+ RELOC_NUMBER (R_XSTORMY16_GNU_VTENTRY, 129)
+END_RELOC_NUMBERS (R_XSTORMY16_max)
+
+/* Define the data & instruction memory discriminator. In a linked
+ executable, an symbol should be deemed to point to an instruction
+ if ((address & XSTORMY16_INSN_MASK) == XSTORMY16_INSN_VALUE), and similarly
+ for the data space. See also `ld/emulparams/elf32xstormy16.sh'. */
+#define XSTORMY16_DATA_MASK 0xffc00000
+#define XSTORMY16_DATA_VALUE 0x00000000
+#define XSTORMY16_INSN_MASK 0xffc00000
+#define XSTORMY16_INSN_VALUE 0x00400000
+
+#endif /* _ELF_XSTORMY16_H */
diff --git a/include/fibheap.h b/include/fibheap.h
new file mode 100644
index 0000000..d109e4a
--- /dev/null
+++ b/include/fibheap.h
@@ -0,0 +1,81 @@
+/* A Fibonacci heap datatype.
+ Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+ Contributed by Daniel Berlin (dan@cgsoftware.com).
+
+This file is part of GCC.
+
+GCC 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.
+
+GCC 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 GCC; see the file COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+/* Fibonacci heaps are somewhat complex, but, there's an article in
+ DDJ that explains them pretty well:
+
+ http://www.ddj.com/articles/1997/9701/9701o/9701o.htm?topic=algoritms
+
+ Introduction to algorithms by Corman and Rivest also goes over them.
+
+ The original paper that introduced them is "Fibonacci heaps and their
+ uses in improved network optimization algorithms" by Tarjan and
+ Fredman (JACM 34(3), July 1987).
+
+ Amortized and real worst case time for operations:
+
+ ExtractMin: O(lg n) amortized. O(n) worst case.
+ DecreaseKey: O(1) amortized. O(lg n) worst case.
+ Insert: O(2) amortized. O(1) actual.
+ Union: O(1) amortized. O(1) actual. */
+
+#ifndef _FIBHEAP_H_
+#define _FIBHEAP_H_
+
+#include <ansidecl.h>
+
+typedef long fibheapkey_t;
+
+typedef struct fibheap
+{
+ size_t nodes;
+ struct fibnode *min;
+ struct fibnode *root;
+} *fibheap_t;
+
+typedef struct fibnode
+{
+ struct fibnode *parent;
+ struct fibnode *child;
+ struct fibnode *left;
+ struct fibnode *right;
+ fibheapkey_t key;
+ void *data;
+ unsigned int degree : 31;
+ unsigned int mark : 1;
+} *fibnode_t;
+
+extern fibheap_t fibheap_new PARAMS ((void));
+extern fibnode_t fibheap_insert PARAMS ((fibheap_t, fibheapkey_t, void *));
+extern int fibheap_empty PARAMS ((fibheap_t));
+extern fibheapkey_t fibheap_min_key PARAMS ((fibheap_t));
+extern fibheapkey_t fibheap_replace_key PARAMS ((fibheap_t, fibnode_t,
+ fibheapkey_t));
+extern void *fibheap_replace_key_data PARAMS ((fibheap_t, fibnode_t,
+ fibheapkey_t, void *));
+extern void *fibheap_extract_min PARAMS ((fibheap_t));
+extern void *fibheap_min PARAMS ((fibheap_t));
+extern void *fibheap_replace_data PARAMS ((fibheap_t, fibnode_t, void *));
+extern void *fibheap_delete_node PARAMS ((fibheap_t, fibnode_t));
+extern void fibheap_delete PARAMS ((fibheap_t));
+extern fibheap_t fibheap_union PARAMS ((fibheap_t, fibheap_t));
+
+#endif /* _FIBHEAP_H_ */
diff --git a/include/filenames.h b/include/filenames.h
index ba933c8..ca9e273 100644
--- a/include/filenames.h
+++ b/include/filenames.h
@@ -5,7 +5,7 @@
use forward- and back-slash in path names interchangeably, and
some of them have case-insensitive file names.
- Copyright 2000 Free Software Foundation, Inc.
+ Copyright 2000, 2001 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef FILENAMES_H
#define FILENAMES_H
-#if defined(__MSDOS__) || defined(_WIN32) || defined(__OS2__)
+#if defined(__MSDOS__) || defined(_WIN32) || defined(__OS2__) || defined (__CYGWIN__)
#ifndef HAVE_DOS_BASED_FILE_SYSTEM
#define HAVE_DOS_BASED_FILE_SYSTEM 1
diff --git a/include/floatformat.h b/include/floatformat.h
index 4335401..0cd09be 100644
--- a/include/floatformat.h
+++ b/include/floatformat.h
@@ -95,7 +95,15 @@ extern const struct floatformat floatformat_i387_ext;
extern const struct floatformat floatformat_m68881_ext;
extern const struct floatformat floatformat_i960_ext;
extern const struct floatformat floatformat_m88110_ext;
-extern const struct floatformat floatformat_arm_ext;
+extern const struct floatformat floatformat_m88110_harris_ext;
+extern const struct floatformat floatformat_arm_ext; /* deprecated. */
+extern const struct floatformat floatformat_arm_ext_big;
+extern const struct floatformat floatformat_arm_ext_littlebyte_bigword;
+/* IA-64 Floating Point register spilt into memory. */
+extern const struct floatformat floatformat_ia64_spill_big;
+extern const struct floatformat floatformat_ia64_spill_little;
+extern const struct floatformat floatformat_ia64_quad_big;
+extern const struct floatformat floatformat_ia64_quad_little;
/* Convert from FMT to a double.
FROM is the address of the extended float.
diff --git a/include/hashtab.h b/include/hashtab.h
index a577c5e..8871710 100644
--- a/include/hashtab.h
+++ b/include/hashtab.h
@@ -145,6 +145,9 @@ extern htab_hash htab_hash_pointer;
/* An equality function for pointers. */
extern htab_eq htab_eq_pointer;
+/* A hash function for null-terminated strings. */
+extern hashval_t htab_hash_string PARAMS ((const PTR));
+
#ifdef __cplusplus
}
#endif /* __cplusplus */
diff --git a/include/libiberty.h b/include/libiberty.h
index effe5f6..3e0ca09 100644
--- a/include/libiberty.h
+++ b/include/libiberty.h
@@ -1,6 +1,6 @@
/* Function declarations for libiberty.
- Copyright 2001 Free Software Foundation, Inc.
+ Copyright 2001, 2002 Free Software Foundation, Inc.
Note - certain prototypes declared in this header file are for
functions whoes implementation copyright does not belong to the
@@ -51,7 +51,7 @@ extern "C" {
/* Build an argument vector from a string. Allocates memory using
malloc. Use freeargv to free the vector. */
-extern char **buildargv PARAMS ((char *)) ATTRIBUTE_MALLOC;
+extern char **buildargv PARAMS ((const char *)) ATTRIBUTE_MALLOC;
/* Free a vector returned by buildargv. */
@@ -83,13 +83,55 @@ extern char *basename ();
/* A well-defined basename () that is always compiled in. */
-extern char *lbasename PARAMS ((const char *));
+extern const char *lbasename PARAMS ((const char *));
-/* Concatenate an arbitrary number of strings, up to (char *) NULL.
- Allocates memory using xmalloc. */
+/* Concatenate an arbitrary number of strings. You must pass NULL as
+ the last argument of this function, to terminate the list of
+ strings. Allocates memory using xmalloc. */
extern char *concat PARAMS ((const char *, ...)) ATTRIBUTE_MALLOC;
+/* Concatenate an arbitrary number of strings. You must pass NULL as
+ the last argument of this function, to terminate the list of
+ strings. Allocates memory using xmalloc. The first argument is
+ not one of the strings to be concatenated, but if not NULL is a
+ pointer to be freed after the new string is created, similar to the
+ way xrealloc works. */
+
+extern char *reconcat PARAMS ((char *, const char *, ...)) ATTRIBUTE_MALLOC;
+
+/* Determine the length of concatenating an arbitrary number of
+ strings. You must pass NULL as the last argument of this function,
+ to terminate the list of strings. */
+
+extern unsigned long concat_length PARAMS ((const char *, ...));
+
+/* Concatenate an arbitrary number of strings into a SUPPLIED area of
+ memory. You must pass NULL as the last argument of this function,
+ to terminate the list of strings. The supplied memory is assumed
+ to be large enough. */
+
+extern char *concat_copy PARAMS ((char *, const char *, ...));
+
+/* Concatenate an arbitrary number of strings into a GLOBAL area of
+ memory. You must pass NULL as the last argument of this function,
+ to terminate the list of strings. The supplied memory is assumed
+ to be large enough. */
+
+extern char *concat_copy2 PARAMS ((const char *, ...));
+
+/* This is the global area used by concat_copy2. */
+
+extern char *libiberty_concat_ptr;
+
+/* Concatenate an arbitrary number of strings. You must pass NULL as
+ the last argument of this function, to terminate the list of
+ strings. Allocates memory using alloca. The arguments are
+ evaluated twice! */
+#define ACONCAT(ACONCAT_PARAMS) \
+ (libiberty_concat_ptr = alloca (concat_length ACONCAT_PARAMS + 1), \
+ concat_copy2 ACONCAT_PARAMS)
+
/* Check whether two file descriptors refer to the same file. */
extern int fdmatch PARAMS ((int fd1, int fd2));
@@ -198,7 +240,7 @@ extern PTR xmemdup PARAMS ((const PTR, size_t, size_t)) ATTRIBUTE_MALLOC;
#define _hex_array_size 256
#define _hex_bad 99
-extern char _hex_value[_hex_array_size];
+extern const char _hex_value[_hex_array_size];
extern void hex_init PARAMS ((void));
#define hex_p(c) (hex_value (c) != _hex_bad)
/* If you change this, note well: Some code relies on side effects in
@@ -241,17 +283,30 @@ extern int vasprintf PARAMS ((char **, const char *, va_list))
USE_C_ALLOCA yourself. The canonical autoconf macro C_ALLOCA is
also set/unset as it is often used to indicate whether code needs
to call alloca(0). */
-extern PTR C_alloca PARAMS((size_t));
+extern PTR C_alloca PARAMS ((size_t)) ATTRIBUTE_MALLOC;
#undef alloca
#if GCC_VERSION >= 2000 && !defined USE_C_ALLOCA
# define alloca(x) __builtin_alloca(x)
# undef C_ALLOCA
+# define ASTRDUP(X) \
+ (__extension__ ({ const char *const libiberty_optr = (X); \
+ const unsigned long libiberty_len = strlen (libiberty_optr) + 1; \
+ char *const libiberty_nptr = alloca (libiberty_len); \
+ (char *) memcpy (libiberty_nptr, libiberty_optr, libiberty_len); }))
#else
# define alloca(x) C_alloca(x)
# undef USE_C_ALLOCA
# define USE_C_ALLOCA 1
# undef C_ALLOCA
# define C_ALLOCA 1
+extern const char *libiberty_optr;
+extern char *libiberty_nptr;
+extern unsigned long libiberty_len;
+# define ASTRDUP(X) \
+ (libiberty_optr = (X), \
+ libiberty_len = strlen (libiberty_optr) + 1, \
+ libiberty_nptr = alloca (libiberty_len), \
+ (char *) memcpy (libiberty_nptr, libiberty_optr, libiberty_len))
#endif
#ifdef __cplusplus
diff --git a/include/nlm/ChangeLog b/include/nlm/ChangeLog
index d9ea3d0..979b162 100644
--- a/include/nlm/ChangeLog
+++ b/include/nlm/ChangeLog
@@ -1,3 +1,9 @@
+2001-10-02 Alan Modra <amodra@bigpond.net.au>
+
+ * common.h (NLM_CAT, NLM_CAT3): Don't define.
+ (NLM_CAT4): Update conditions under which this is defined. Document
+ why CONCAT4 can't be used.
+
Fri May 6 13:31:04 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
* external.h (nlmNAME(External_Custom_Header)): Add length,
diff --git a/include/nlm/common.h b/include/nlm/common.h
index 70ec186..208f4cf 100644
--- a/include/nlm/common.h
+++ b/include/nlm/common.h
@@ -1,5 +1,5 @@
/* NLM (NetWare Loadable Module) support for BFD.
- Copyright 1993 Free Software Foundation, Inc.
+ Copyright 1993, 2001 Free Software Foundation, Inc.
Written by Fred Fish @ Cygnus Support
@@ -23,31 +23,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* This file is part of NLM support for BFD, and contains the portions
that are common to both the internal and external representations. */
-/* Semi-portable string concatenation in cpp.
- The NLM_CAT4 hack is to avoid a problem with some strict ANSI C
- preprocessors. The problem is, "32_" or "64_" are not a valid
- preprocessing tokens, and we don't want extra underscores (e.g.,
- "nlm_32_"). The XNLM_CAT2 macro will cause the inner NLM_CAT macros
- to be evaluated first, producing still-valid pp-tokens. Then the
- final concatenation can be done. (Sigh.) */
-
-#ifdef SABER
-# define NLM_CAT(a,b) a##b
-# define NLM_CAT3(a,b,c) a##b##c
-# define NLM_CAT4(a,b,c,d) a##b##c##d
-#else
-# ifdef __STDC__
-# define NLM_CAT(a,b) a##b
-# define NLM_CAT3(a,b,c) a##b##c
-# define XNLM_CAT2(a,b) NLM_CAT(a,b)
-# define NLM_CAT4(a,b,c,d) XNLM_CAT2(NLM_CAT(a,b),NLM_CAT(c,d))
-# else
-# define NLM_CAT(a,b) a/**/b
-# define NLM_CAT3(a,b,c) a/**/b/**/c
-# define NLM_CAT4(a,b,c,d) a/**/b/**/c/**/d
-# endif
-#endif
-
/* If NLM_ARCH_SIZE is not defined, default to 32. NLM_ARCH_SIZE is
optionally defined by the application. */
@@ -55,6 +30,30 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
# define NLM_ARCH_SIZE 32
#endif
+/* Due to horrible details of ANSI macro expansion, we can't use CONCAT4
+ for NLM_NAME. CONCAT2 is used in BFD_JUMP_TABLE macros, and some of
+ them will expand to tokens that themselves are macros defined in terms
+ of NLM_NAME. If NLM_NAME were defined using CONCAT4 (which is itself
+ defined in bfd-in.h using CONCAT2), ANSI preprocessor rules say that
+ the CONCAT2 within NLM_NAME should not be expanded.
+ So use another name. */
+#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
+#ifdef SABER
+#define NLM_CAT4(a,b,c,d) a##b##c##d
+#else
+/* This hack is to avoid a problem with some strict ANSI C preprocessors.
+ The problem is, "32_" is not a valid preprocessing token, and we don't
+ want extra underscores (e.g., "nlm_32_"). The NLM_XCAT2 macro will
+ cause the inner CAT2 macros to be evaluated first, producing
+ still-valid pp-tokens. Then the final concatenation can be done. */
+#define NLM_CAT2(a,b) a##b
+#define NLM_XCAT2(a,b) NLM_CAT2(a,b)
+#define NLM_CAT4(a,b,c,d) NLM_XCAT2(NLM_CAT2(a,b),NLM_CAT2(c,d))
+#endif
+#else
+#define NLM_CAT4(a,b,c,d) a/**/b/**/c/**/d
+#endif
+
#if NLM_ARCH_SIZE == 32
# define NLM_TARGET_LONG_SIZE 4
# define NLM_TARGET_ADDRESS_SIZE 4
diff --git a/include/objalloc.h b/include/objalloc.h
index 0b451cd..c710647 100644
--- a/include/objalloc.h
+++ b/include/objalloc.h
@@ -1,5 +1,5 @@
/* objalloc.h -- routines to allocate memory for objects
- Copyright 1997 Free Software Foundation, Inc.
+ Copyright 1997, 2001 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Solutions.
This program is free software; you can redistribute it and/or modify it
@@ -56,12 +56,11 @@ struct objalloc_align { char x; double d; };
#ifndef offsetof
#include <stddef.h>
#endif
-#define OBJALLOC_ALIGN \
- ((ptrdiff_t) ((char *) &((struct objalloc_align *) 0)->d - (char *) 0))
-#else
-#define OBJALLOC_ALIGN \
- ((long) ((char *) &((struct objalloc_align *) 0)->d - (char *) 0))
#endif
+#ifndef offsetof
+#define offsetof(TYPE, MEMBER) ((unsigned long) &((TYPE *)0)->MEMBER)
+#endif
+#define OBJALLOC_ALIGN offsetof (struct objalloc_align, d)
/* Create an objalloc structure. Returns NULL if malloc fails. */
diff --git a/include/opcode/ChangeLog b/include/opcode/ChangeLog
index a027c8d..3c367d3 100644
--- a/include/opcode/ChangeLog
+++ b/include/opcode/ChangeLog
@@ -1,3 +1,147 @@
+2002-01-31 Ivan Guzvinec <ivang@opencores.org>
+
+ * or32.h: New file.
+
+2002-01-22 Graydon Hoare <graydon@redhat.com>
+
+ * cgen.h (CGEN_MAYBE_MULTI_IFLD): New structure.
+ (CGEN_OPERAND): Add CGEN_MAYBE_MULTI_IFLD field.
+
+2002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
+
+ * h8300.h: Comment typo fix.
+
+2002-01-03 matthew green <mrg@redhat.com>
+
+ * ppc.h (PPC_OPCODE_BOOKE): BookE is not Motorola specific.
+ (PPC_OPCODE_BOOKE64): Likewise.
+
+Mon Dec 31 16:45:41 2001 Jeffrey A Law (law@cygnus.com)
+
+ * hppa.h (call, ret): Move to end of table.
+ (addb, addib): PA2.0 variants should have been PA2.0W.
+ (ldw, ldh, ldb, stw, sth, stb, stwa): Reorder to keep disassembler
+ happy.
+ (fldw, fldd, fstw, fstd, bb): Likewise.
+ (short loads/stores): Tweak format specifier slightly to keep
+ disassembler happy.
+ (indexed loads/stores): Likewise.
+ (absolute loads/stores): Likewise.
+
+2001-12-04 Alexandre Oliva <aoliva@redhat.com>
+
+ * d10v.h (OPERAND_NOSP): New macro.
+
+2001-11-29 Alexandre Oliva <aoliva@redhat.com>
+
+ * d10v.h (OPERAND_SP): New macro.
+
+2001-11-15 Alan Modra <amodra@bigpond.net.au>
+
+ * ppc.h (struct powerpc_operand <insert, extract>): Add dialect param.
+
+2001-11-11 Timothy Wall <twall@alum.mit.edu>
+
+ * tic54x.h: Revise opcode layout; don't really need a separate
+ structure for parallel opcodes.
+
+2001-11-13 Zack Weinberg <zack@codesourcery.com>
+ Alan Modra <amodra@bigpond.net.au>
+
+ * i386.h (i386_optab): Add entries for "sldr", "smsw" and "str" to
+ accept WordReg.
+
+2001-11-04 Chris Demetriou <cgd@broadcom.com>
+
+ * mips.h (OPCODE_IS_MEMBER): Remove extra space.
+
+2001-10-30 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * mmix.h: New file.
+
+2001-10-18 Chris Demetriou <cgd@broadcom.com>
+
+ * mips.h (OPCODE_IS_MEMBER): Add a no-op term to the end
+ of the expression, to make source code merging easier.
+
+2001-10-17 Chris Demetriou <cgd@broadcom.com>
+
+ * mips.h: Sort coprocessor instruction argument characters
+ in comment, add a few more words of description for "H".
+
+2001-10-17 Chris Demetriou <cgd@broadcom.com>
+
+ * mips.h (INSN_SB1): New cpu-specific instruction bit.
+ (OPCODE_IS_MEMBER): Allow instructions matching INSN_SB1
+ if cpu is CPU_SB1.
+
+2001-10-17 matthew green <mrg@redhat.com>
+
+ * ppc.h (PPC_OPCODE_BOOKE64): Fix typo.
+
+2001-10-12 matthew green <mrg@redhat.com>
+
+ * ppc.h (PPC_OPCODE_BOOKE, PPC_OPCODE_BOOKE64, PPC_OPCODE_403): New
+ opcode flags for BookE 32-bit, BookE 64-bit and PowerPC 403
+ instructions, respectively.
+
+2001-09-27 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * v850.h: Remove spurious comment.
+
+2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * h8300.h: Fix compile time warning messages
+
+2001-09-04 Richard Henderson <rth@redhat.com>
+
+ * alpha.h (struct alpha_operand): Pack elements into bitfields.
+
+2001-08-31 Eric Christopher <echristo@redhat.com>
+
+ * mips.h: Remove CPU_MIPS32_4K.
+
+2001-08-27 Torbjorn Granlund <tege@swox.com>
+
+ * ppc.h (PPC_OPERAND_DS): Define.
+
+2001-08-25 Andreas Jaeger <aj@suse.de>
+
+ * d30v.h: Fix declaration of reg_name_cnt.
+
+ * d10v.h: Fix declaration of d10v_reg_name_cnt.
+
+ * arc.h: Add prototypes from opcodes/arc-opc.c.
+
+2001-08-16 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * mips.h (INSN_10000): Define.
+ (OPCODE_IS_MEMBER): Check for INSN_10000.
+
+2001-08-10 Alan Modra <amodra@one.net.au>
+
+ * ppc.h: Revert 2001-08-08.
+
+2001-08-10 Richard Sandiford <rsandifo@redhat.com>
+
+ * mips.h (INSN_GP32): Remove.
+ (OPCODE_IS_MEMBER): Remove gp32 parameter.
+ (M_MOVE): New macro identifier.
+
+2001-08-08 Alan Modra <amodra@one.net.au>
+
+ 1999-10-25 Torbjorn Granlund <tege@swox.com>
+ * ppc.h (struct powerpc_operand): New field `reloc'.
+
+2001-08-01 Aldy Hernandez <aldyh@redhat.com>
+
+ * mips.h (INSN_ISA_MASK): Nuke bits 12-15.
+
+2001-07-12 Jeff Johnston <jjohnstn@redhat.com>
+
+ * cgen.h (CGEN_INSN): Add regex support.
+ (build_insn_regex): Declare.
+
2001-07-11 Frank Ch. Eigler <fche@redhat.com>
* cgen.h (CGEN_MACH): Add insn_chunk_bitsize field.
@@ -18,7 +162,7 @@
2001-05-23 John Healy <jhealy@redhat.com>
* cgen.h: Increased CGEN_MAX_SYNTAX_ELEMENTS to 48.
-
+
2001-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
* mips.h (INSN_ISA_MASK): Define.
@@ -155,7 +299,7 @@
* i386.h (i386_optab): Replace "Imm" with "EncImm".
(i386_regtab): Add flags field.
-
+
2000-12-12 Nick Clifton <nickc@redhat.com>
* mips.h: Fix formatting.
@@ -180,7 +324,7 @@
(ISA_UNKNOWN): New constant to indicate unknown ISA.
(ISA_MIPS1, ISA_MIPS2, ISA_MIPS3, ISA_MIPS4, ISA_MIPS5,
ISA_MIPS32): New constants, defined to be the mask of INSN_*
- constants available at that ISA level.
+ constants available at that ISA level.
(CPU_UNKNOWN): New constant to indicate unknown CPU.
(CPU_4K, CPU_MIPS32_4K): Rename the former to the latter,
define it with a unique value.
@@ -188,7 +332,7 @@
constant meanings.
* mips.h (INSN_ISA64, ISA_MIPS5, ISA_MIPS64): New
- definitions.
+ definitions.
* mips.h (CPU_SB1): New constant.
@@ -202,21 +346,21 @@
* ia64.h (enum ia64_dependency_semantics): Add IA64_DVS_STOP.
2000-09-13 Anders Norlander <anorland@acc.umu.se>
-
+
* mips.h: Use defines instead of hard-coded processor numbers.
(CPU_R2000, CPU_R3000, CPU_R3900, CPU_R4000, CPU_R4010,
- CPU_VR4100, CPU_R4111, CPU_R4300, CPU_R4400, CPU_R4600, CPU_R4650,
+ CPU_VR4100, CPU_R4111, CPU_R4300, CPU_R4400, CPU_R4600, CPU_R4650,
CPU_R5000, CPU_R6000, CPU_R8000, CPU_R10000, CPU_MIPS32, CPU_4K,
CPU_4KC, CPU_4KM, CPU_4KP): Define..
(OPCODE_IS_MEMBER): Use new defines.
- (OP_MASK_SEL, OP_SH_SEL): Define.
+ (OP_MASK_SEL, OP_SH_SEL): Define.
(OP_MASK_CODE20, OP_SH_CODE20): Define.
- Add 'P' to used characters.
- Use 'H' for coprocessor select field.
+ Add 'P' to used characters.
+ Use 'H' for coprocessor select field.
Use 'm' for 20 bit breakpoint code.
- Document new arg characters and add to used characters.
- (INSN_MIPS32): New define for MIPS32 extensions.
- (OPCODE_IS_MEMBER): Recognize MIPS32 instructions.
+ Document new arg characters and add to used characters.
+ (INSN_MIPS32): New define for MIPS32 extensions.
+ (OPCODE_IS_MEMBER): Recognize MIPS32 instructions.
2000-09-05 Alan Modra <alan@linuxcare.com.au>
@@ -396,7 +540,7 @@ Fri Apr 21 13:20:53 2000 Richard Henderson <rth@cygnus.com>
* cgen.h (CGEN_INSN_MACH_HAS_P): New macro.
(CGEN_CPU_TABLE): flags: new field.
Add prototypes for new functions.
-
+
2000-02-24 Alan Modra <alan@spri.levels.unisa.edu.au>
* i386.h: Add some more UNIXWARE_COMPAT comments.
@@ -514,7 +658,7 @@ Sun Sep 19 10:40:59 1999 Jeffrey A Law (law@cygnus.com)
Sat Sep 18 11:41:16 1999 Jeffrey A Law (law@cygnus.com)
* hppa.h (pa_opcodes): Use 'fX' for first register operand
- in xmpyu.
+ in xmpyu.
* hppa.h (pa_opcodes): Fix mask for probe and probei.
@@ -600,7 +744,7 @@ Wed Jul 28 02:04:24 1999 Jerry Quinn <jquinn@nortelnetworks.com>
* hppa.h (pa_opcodes): Mark all PA2.0 opcodes with FLAG_STRICT.
- * hppa.h (pa_opcodes): Change xmpyu, fmpyfadd,
+ * hppa.h (pa_opcodes): Change xmpyu, fmpyfadd,
and fmpynfadd to use 'J' and 'K' instead of 'E' and 'X'.
1999-07-13 Alan Modra <alan@spri.levels.unisa.edu.au>
@@ -628,7 +772,7 @@ Fri Jun 25 04:22:04 1999 Jerry Quinn <jquinn@nortelnetworks.com>
Fri May 28 15:26:11 1999 Jeffrey A Law (law@cygnus.com)
* hppa.h (pa_opcodes): Move integer arithmetic instructions after
- integer logical instructions.
+ integer logical instructions.
1999-05-28 Linus Nordberg <linus.nordberg@canit.se>
@@ -645,7 +789,7 @@ Thu May 27 04:13:54 1999 Joel Sherrill (joel@OARcorp.com
Wed May 26 16:57:44 1999 Jeffrey A Law (law@cygnus.com)
- * hppa.h (pa_opcodes): Add second entry for "comb", "comib",
+ * hppa.h (pa_opcodes): Add second entry for "comb", "comib",
"addb", and "addib" to be used by the disassembler.
1999-05-12 Alan Modra <alan@apri.levels.unisa.edu.au>
@@ -756,7 +900,7 @@ Sat Feb 13 14:13:44 1999 Richard Henderson <rth@cygnus.com>
(CGEN_INSN_ATTR): New type.
Mon Feb 1 21:09:14 1999 Catherine Moore <clm@cygnus.com>
-
+
* i386.h (d_Suf, x_Suf, sld_Suf, sldx_Suf, bwld_Suf): Define.
(x_FP, d_FP, dls_FP, sldx_FP): Define.
Change *Suf definitions to include x and d suffixes.
@@ -797,16 +941,16 @@ Mon Feb 1 21:09:14 1999 Catherine Moore <clm@cygnus.com>
Wed Dec 9 10:38:48 1998 David Taylor <taylor@texas.cygnus.com>
The following is part of a change made by Edith Epstein
- <eepstein@sophia.cygnus.com> as part of a project to merge in
- changes by HP; HP did not create ChangeLog entries.
+ <eepstein@sophia.cygnus.com> as part of a project to merge in
+ changes by HP; HP did not create ChangeLog entries.
* hppa.h (completer_chars): list of chars to not put a space
- after.
+ after.
Sun Dec 6 13:21:34 1998 Ian Lance Taylor <ian@cygnus.com>
* i386.h (i386_optab): Permit w suffix on processor control and
- status word instructions.
+ status word instructions.
1998-11-30 Doug Evans <devans@casey.cygnus.com>
@@ -867,7 +1011,7 @@ Fri Oct 9 13:38:13 1998 Doug Evans <devans@seba.cygnus.com>
Mon Oct 5 00:21:07 1998 Jeffrey A Law (law@cygnus.com)
* hppa.h: Add "fid".
-
+
Sun Oct 4 21:00:00 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
From Robert Andrew Dale <rob@nb.net>
@@ -921,7 +1065,7 @@ Fri Jun 26 11:09:06 1998 Jeffrey A Law (law@cygnus.com)
* mn10300.h: Add "machine" field for instructions.
(MN103, AM30): Define machine types.
-
+
Fri Jun 19 16:09:09 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
* i386.h: Use FP, not sl_Suf, for fxsave and fxrstor.
@@ -1526,9 +1670,9 @@ Mon Nov 4 12:52:48 1996 Jeffrey A Law (law@cygnus.com)
Fri Nov 1 10:31:02 1996 Richard Henderson <rth@tamu.edu>
* alpha.h: Don't include "bfd.h"; private relocation types are now
- negative to minimize problems with shared libraries. Organize
- instruction subsets by AMASK extensions and PALcode
- implementation.
+ negative to minimize problems with shared libraries. Organize
+ instruction subsets by AMASK extensions and PALcode
+ implementation.
(struct alpha_operand): Move flags slot for better packing.
Tue Oct 29 12:19:10 1996 Jeffrey A Law (law@cygnus.com)
@@ -1581,9 +1725,9 @@ Fri Aug 23 10:39:08 1996 Jeffrey A Law (law@cygnus.com)
Thu Aug 22 16:51:25 1996 J.T. Conklin <jtc@rtl.cygnus.com>
* v850.h (v850_operands): Add insert and extract fields, pointers
- to functions used to handle unusual operand encoding.
+ to functions used to handle unusual operand encoding.
(V850_OPERAND_REG, V850_OPERAND_SRG, V850_OPERAND_CC,
- V850_OPERAND_SIGNED): Defined.
+ V850_OPERAND_SIGNED): Defined.
Wed Aug 21 17:45:10 1996 J.T. Conklin <jtc@rtl.cygnus.com>
@@ -1597,11 +1741,11 @@ Tue Aug 20 14:52:02 1996 J.T. Conklin <jtc@rtl.cygnus.com>
Fri Aug 16 14:44:15 1996 James G. Smith <jsmith@cygnus.co.uk>
* mips.h (OP_SH_LOCC, OP_SH_HICC, OP_MASK_CC, OP_SH_COP1NORM,
- OP_MASK_COP1NORM, OP_SH_COP1SPEC, OP_MASK_COP1SPEC,
- OP_MASK_COP1SCLR, OP_MASK_COP1CMP, OP_SH_COP1CMP, OP_SH_FORMAT,
- OP_MASK_FORMAT, OP_SH_TRUE, OP_MASK_TRUE, OP_SH_GE, OP_MASK_GE,
- OP_SH_UNSIGNED, OP_MASK_UNSIGNED, OP_SH_HINT, OP_MASK_HINT):
- Defined.
+ OP_MASK_COP1NORM, OP_SH_COP1SPEC, OP_MASK_COP1SPEC,
+ OP_MASK_COP1SCLR, OP_MASK_COP1CMP, OP_SH_COP1CMP, OP_SH_FORMAT,
+ OP_MASK_FORMAT, OP_SH_TRUE, OP_MASK_TRUE, OP_SH_GE, OP_MASK_GE,
+ OP_SH_UNSIGNED, OP_MASK_UNSIGNED, OP_SH_HINT, OP_MASK_HINT):
+ Defined.
Fri Aug 16 00:15:15 1996 Jeffrey A Law (law@cygnus.com)
@@ -1611,7 +1755,7 @@ Fri Aug 16 00:15:15 1996 Jeffrey A Law (law@cygnus.com)
Thu Aug 15 13:11:46 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* d10v.h: Add some additional defines to support the
- assembler in determining which operations can be done in parallel.
+ assembler in determining which operations can be done in parallel.
Tue Aug 6 11:13:22 1996 Jeffrey A Law (law@cygnus.com)
@@ -1627,7 +1771,7 @@ Fri Jul 26 11:47:10 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
Thu Jul 25 12:06:22 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* d10v.h: Changes for divs, parallel-only instructions, and
- signed numbers.
+ signed numbers.
Mon Jul 22 11:21:15 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
@@ -1649,7 +1793,7 @@ Thu Jul 11 12:09:15 1996 Jeffrey A Law (law@cygnus.com)
Wed Jul 3 14:30:12 1996 J.T. Conklin <jtc@rtl.cygnus.com>
- * m68k.h (mcf5200): New macro.
+ * m68k.h (mcf5200): New macro.
Document names of coldfire control registers.
Tue Jul 2 23:05:45 1996 Jeffrey A Law (law@cygnus.com)
@@ -1799,7 +1943,7 @@ Tue Oct 24 10:49:10 1995 Jeffrey A Law (law@cygnus.com)
Mon Oct 23 11:09:16 1995 James G. Smith <jsmith@pasanda.cygnus.co.uk>
* mips.h: Added INSN_4100 flag to mark NEC VR4100 specific
- instructions.
+ instructions.
Mon Oct 16 10:28:15 1995 Michael Meissner <meissner@tiktok.cygnus.com>
diff --git a/include/opcode/alpha.h b/include/opcode/alpha.h
index 6f31e9a..487b696 100644
--- a/include/opcode/alpha.h
+++ b/include/opcode/alpha.h
@@ -81,16 +81,16 @@ extern const unsigned alpha_num_opcodes;
struct alpha_operand
{
/* The number of bits in the operand. */
- int bits;
+ unsigned int bits : 5;
/* How far the operand is left shifted in the instruction. */
- int shift;
+ unsigned int shift : 5;
/* The default relocation type for this operand. */
- int default_reloc;
+ signed int default_reloc : 16;
/* One bit syntax flags. */
- unsigned flags;
+ unsigned int flags : 16;
/* Insertion function. This is used by the assembler. To insert an
operand value into an instruction, check this field.
diff --git a/include/opcode/arc.h b/include/opcode/arc.h
index 81e5bd8..b137840 100644
--- a/include/opcode/arc.h
+++ b/include/opcode/arc.h
@@ -313,3 +313,9 @@ const struct arc_operand_value *arc_opcode_lookup_suffix
PARAMS ((const struct arc_operand *type, int value));
int arc_opcode_supported PARAMS ((const struct arc_opcode *));
int arc_opval_supported PARAMS ((const struct arc_operand_value *));
+int arc_limm_fixup_adjust PARAMS ((arc_insn));
+int arc_insn_is_j PARAMS ((arc_insn));
+int arc_insn_not_jl PARAMS ((arc_insn));
+int arc_operand_type PARAMS ((int));
+struct arc_operand_value *get_ext_suffix PARAMS ((char *));
+int arc_get_noshortcut_flag PARAMS ((void));
diff --git a/include/opcode/avr.h b/include/opcode/avr.h
index 393ca22..bcc093d 100644
--- a/include/opcode/avr.h
+++ b/include/opcode/avr.h
@@ -25,17 +25,20 @@
supported, no 8K wrap on RJMP and RCALL) */
#define AVR_ISA_MUL 0x0040 /* device has new core (MUL, MOVW, ...) */
#define AVR_ISA_ELPM 0x0080 /* device has >64K program memory (ELPM) */
-#define AVR_ISA_ELPMX 0x0100 /* device has ELPM Rd,Z[+] (none yet) */
+#define AVR_ISA_ELPMX 0x0100 /* device has ELPM Rd,Z[+] */
#define AVR_ISA_SPM 0x0200 /* device can program itself */
+#define AVR_ISA_BRK 0x0400 /* device has BREAK (on-chip debug) */
#define AVR_ISA_EIND 0x0800 /* device has >128K program memory (none yet) */
#define AVR_ISA_TINY1 (AVR_ISA_1200 | AVR_ISA_LPM)
#define AVR_ISA_2xxx (AVR_ISA_TINY1 | AVR_ISA_SRAM)
-#define AVR_ISA_M83 (AVR_ISA_2xxx | AVR_ISA_MUL | AVR_ISA_LPMX | AVR_ISA_SPM)
+#define AVR_ISA_M8 (AVR_ISA_2xxx | AVR_ISA_MUL | AVR_ISA_LPMX | AVR_ISA_SPM)
#define AVR_ISA_M603 (AVR_ISA_2xxx | AVR_ISA_MEGA)
#define AVR_ISA_M103 (AVR_ISA_M603 | AVR_ISA_ELPM)
#define AVR_ISA_M161 (AVR_ISA_M603 | AVR_ISA_MUL | AVR_ISA_LPMX | AVR_ISA_SPM)
#define AVR_ISA_94K (AVR_ISA_M603 | AVR_ISA_MUL | AVR_ISA_LPMX)
+#define AVR_ISA_M323 (AVR_ISA_M161 | AVR_ISA_BRK)
+#define AVR_ISA_M128 (AVR_ISA_M323 | AVR_ISA_ELPM | AVR_ISA_ELPMX)
#define AVR_ISA_ALL 0xFFFF
@@ -86,7 +89,7 @@
Order is important - some binary opcodes have more than one name,
the disassembler will only see the first match.
- Remaining undefined opcodes (1700 total - some of them might work
+ Remaining undefined opcodes (1699 total - some of them might work
as normal instructions if not all of the bits are decoded):
0x0001...0x00ff (255) (known to be decoded as `nop' by the old core)
@@ -100,7 +103,7 @@
"1001010xxxxx1011" (32) 0x9[45][0-9a-f]b
"10010101001x1000" (2) 0x95[23]8
"1001010101xx1000" (4) 0x95[4-7]8
- "1001010110x11000" (2) 0x95[9b]8
+ "1001010110111000" (1) 0x95b8
"1001010111111000" (1) 0x95f8 (`espm' removed in databook update)
"11111xxxxxxx1xxx" (1024) 0xf[8-9a-f][0-9a-f][8-9a-f]
*/
@@ -139,6 +142,7 @@ AVR_INSN (nop, "", "0000000000000000", 1, AVR_ISA_1200, 0x0000)
AVR_INSN (ret, "", "1001010100001000", 1, AVR_ISA_1200, 0x9508)
AVR_INSN (reti, "", "1001010100011000", 1, AVR_ISA_1200, 0x9518)
AVR_INSN (sleep,"", "1001010110001000", 1, AVR_ISA_1200, 0x9588)
+AVR_INSN (break,"", "1001010110011000", 1, AVR_ISA_BRK, 0x9598)
AVR_INSN (wdr, "", "1001010110101000", 1, AVR_ISA_1200, 0x95a8)
AVR_INSN (spm, "", "1001010111101000", 1, AVR_ISA_SPM, 0x95e8)
diff --git a/include/opcode/cgen.h b/include/opcode/cgen.h
index bcde472..09c5cbf 100644
--- a/include/opcode/cgen.h
+++ b/include/opcode/cgen.h
@@ -26,7 +26,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
Perhaps the definition of bfd_vma can be moved outside of bfd.h.
Or perhaps one could duplicate its definition in another file.
Until such time, this file conditionally compiles definitions that require
- bfd_vma using BFD_VERSION. */
+ bfd_vma using BFD_VERSION_DATE. */
/* Enums must be defined before they can be used.
Allow them to be used in struct definitions, even though the enum must
@@ -276,7 +276,7 @@ typedef const char * (cgen_parse_fn)
PC is the pc value of the insn.
The result is an error message or NULL if success. */
-#ifdef BFD_VERSION
+#ifdef BFD_VERSION_DATE
typedef const char * (cgen_insert_fn)
PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *insn_,
CGEN_FIELDS *fields_, CGEN_INSN_BYTES_PTR insnp_,
@@ -297,7 +297,7 @@ typedef const char * (cgen_insert_fn) ();
PC is the pc value of the insn.
The result is the length of the insn in bits or zero if not recognized. */
-#ifdef BFD_VERSION
+#ifdef BFD_VERSION_DATE
typedef int (cgen_extract_fn)
PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *insn_,
CGEN_EXTRACT_INFO *ex_info_, CGEN_INSN_INT base_insn_,
@@ -316,7 +316,7 @@ typedef int (cgen_extract_fn) ();
PC is the pc value of the insn.
LEN is the length of the insn, in bits. */
-#ifdef BFD_VERSION
+#ifdef BFD_VERSION_DATE
typedef void (cgen_print_fn)
PARAMS ((CGEN_CPU_DESC, PTR info_, const CGEN_INSN *insn_,
CGEN_FIELDS *fields_, bfd_vma pc_, int len_));
@@ -381,7 +381,7 @@ enum cgen_parse_operand_result
CGEN_PARSE_OPERAND_RESULT_ERROR
};
-#ifdef BFD_VERSION /* Don't require bfd.h unnecessarily. */
+#ifdef BFD_VERSION_DATE /* Don't require bfd.h unnecessarily. */
typedef const char * (cgen_parse_operand_fn)
PARAMS ((CGEN_CPU_DESC,
enum cgen_parse_operand_type, const char **, int, int,
@@ -565,7 +565,7 @@ const CGEN_KEYWORD_ENTRY *cgen_keyword_search_next
extern const char *cgen_parse_keyword
PARAMS ((CGEN_CPU_DESC, const char **, CGEN_KEYWORD *, long *));
-#ifdef BFD_VERSION /* Don't require bfd.h unnecessarily. */
+#ifdef BFD_VERSION_DATE /* Don't require bfd.h unnecessarily. */
extern const char *cgen_parse_signed_integer
PARAMS ((CGEN_CPU_DESC, const char **, int, long *));
extern const char *cgen_parse_unsigned_integer
@@ -609,6 +609,23 @@ enum cgen_operand_type { CGEN_OPERAND_MAX };
/* "nil" indicator for the operand instance table */
#define CGEN_OPERAND_NIL CGEN_OPERAND_MAX
+/* A tree of these structs represents the multi-ifield
+ structure of an operand's hw-index value, if it exists. */
+
+struct cgen_ifld;
+
+typedef struct cgen_maybe_multi_ifield
+{
+ int count; /* 0: indexed by single cgen_ifld (possibly null: dead entry);
+ n: indexed by array of more cgen_maybe_multi_ifields. */
+ union
+ {
+ struct cgen_maybe_multi_ifield * multi;
+ struct cgen_ifld * leaf;
+ } val;
+}
+CGEN_MAYBE_MULTI_IFLD;
+
/* This struct defines each entry in the operand table. */
typedef struct
@@ -637,6 +654,11 @@ typedef struct
May be unused for a modifier. */
unsigned char length;
+ /* The (possibly-multi) ifield used as an index for this operand, if it
+ is indexed by a field at all. This substitutes / extends the start and
+ length fields above, but unsure at this time whether they are used
+ anywhere. */
+ CGEN_MAYBE_MULTI_IFLD index_fields;
#if 0 /* ??? Interesting idea but relocs tend to get too complicated,
and ABI dependent, for simple table lookups to work. */
/* Ideally this would be the internal (external?) reloc type. */
@@ -1231,7 +1253,7 @@ typedef struct cgen_cpu_desc
const char * (*parse_operand)
PARAMS ((CGEN_CPU_DESC, int opindex_, const char **,
CGEN_FIELDS *fields_));
-#ifdef BFD_VERSION
+#ifdef BFD_VERSION_DATE
const char * (*insert_operand)
PARAMS ((CGEN_CPU_DESC, int opindex_, CGEN_FIELDS *fields_,
CGEN_INSN_BYTES_PTR, bfd_vma pc_));
@@ -1264,7 +1286,7 @@ typedef struct cgen_cpu_desc
PARAMS ((CGEN_CPU_DESC, int opindex_, const CGEN_FIELDS *fields_));
void (*set_int_operand)
PARAMS ((CGEN_CPU_DESC, int opindex_, CGEN_FIELDS *fields_, int value_));
-#ifdef BFD_VERSION
+#ifdef BFD_VERSION_DATE
bfd_vma (*get_vma_operand)
PARAMS ((CGEN_CPU_DESC, int opindex_, const CGEN_FIELDS *fields_));
void (*set_vma_operand)
diff --git a/include/opcode/d10v.h b/include/opcode/d10v.h
index a1fe770..cc27850 100644
--- a/include/opcode/d10v.h
+++ b/include/opcode/d10v.h
@@ -1,5 +1,5 @@
/* d10v.h -- Header file for D10V opcode table
- Copyright 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
Written by Martin Hunt (hunt@cygnus.com), Cygnus Support
This file is part of GDB, GAS, and the GNU binutils.
@@ -181,6 +181,14 @@ extern const struct d10v_operand d10v_operands[];
/* needed for rac/rachi */
#define RESTRICTED_NUM3 (0x80000)
+/* Pre-decrement is only supported for SP. */
+#define OPERAND_SP (0x100000)
+
+/* Post-decrement is not supported for SP. Like OPERAND_EVEN, and
+ unlike OPERAND_SP, this flag doesn't prevent the instruction from
+ matching, it only fails validation later on. */
+#define OPERAND_NOSP (0x200000)
+
/* Structure to hold information about predefined registers. */
struct pd_reg
{
@@ -190,7 +198,7 @@ struct pd_reg
};
extern const struct pd_reg d10v_predefined_registers[];
-int d10v_reg_name_cnt();
+int d10v_reg_name_cnt PARAMS ((void));
/* an expressionS only has one register type, so we fake it */
/* by setting high bits to indicate type */
diff --git a/include/opcode/d30v.h b/include/opcode/d30v.h
index 6cbc257..c18874b 100644
--- a/include/opcode/d30v.h
+++ b/include/opcode/d30v.h
@@ -32,7 +32,7 @@ struct pd_reg
};
extern const struct pd_reg pre_defined_registers[];
-int reg_name_cnt();
+int reg_name_cnt PARAMS ((void));
/* the number of control registers */
#define MAX_CONTROL_REG 64
diff --git a/include/opcode/h8300.h b/include/opcode/h8300.h
index 7ea8798..9cd40a6 100644
--- a/include/opcode/h8300.h
+++ b/include/opcode/h8300.h
@@ -1,5 +1,5 @@
/* Opcode table for the H8/300
- Copyright 1991, 1992, 1993, 1994, 1996, 1997, 1998, 2000
+ Copyright 1991, 1992, 1993, 1994, 1996, 1997, 1998, 2000, 2002
Free Software Foundation, Inc.
Written by Steve Chamberlain <sac@cygnus.com>.
@@ -21,7 +21,7 @@
02111-1307, USA. */
/* Instructions are stored as a sequence of nibbles.
- If the nibble has value 15 or less then the representation is complete.
+ If the nibble has value 15 or less than the representation is complete.
Otherwise, we record what it contains with several flags. */
typedef int op_type;
@@ -594,7 +594,7 @@ struct h8_opcode h8_opcodes[] =
NEW_SOP(O(O_STMAC,SL),1,2,"stmac"),{{MACREG,RD32,E}},{{0x0,0x2,MACREG,RD32,E}} EOP,
NEW_SOP(O(O_LDM,SL),0,6,"ldm.l"),{{RSINC, RS32, E}},{{ 0x0,0x1,IGNORE,0x0,0x6,0xD,0x7,IGNORE,E}}EOP,
NEW_SOP(O(O_STM,SL),0,6,"stm.l"),{{RS32, RDDEC, E}},{{0x0,0x1,IGNORE,0x0,0x6,0xD,0xF,IGNORE,E}}EOP,
- { 0 }
+ {0, 0, 0, NULL, {{0,0,0}}, {{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}}, 0, 0, 0, 0}
};
#else
extern struct h8_opcode h8_opcodes[];
diff --git a/include/opcode/hppa.h b/include/opcode/hppa.h
index f409ac9..e907091 100644
--- a/include/opcode/hppa.h
+++ b/include/opcode/hppa.h
@@ -170,10 +170,16 @@ Also these:
Completer operands all have 'c' as the prefix:
cx indexed load completer.
+ cX indexed load completer. Like cx, but emits a space after
+ in disassembler.
cm short load and store completer.
+ cM short load and store completer. Like cm, but emits a space
+ after in disassembler.
cq long load and store completer (like cm, but inserted into a
different location in the target instruction).
cs store bytes short completer.
+ cA store bytes short completer. Like cs, but emits a space
+ after in disassembler.
ce long load/store completer for LDW/STW with a different encoding than the
others
cc load cache control hint
@@ -285,10 +291,6 @@ static const struct pa_opcode pa_opcodes[] =
{ "ldi", 0x34000000, 0xffe00000, "l,x", pa20w, 0},/* ldo val(r0),r */
{ "ldi", 0x34000000, 0xffe0c000, "j,x", pa10, 0},/* ldo val(r0),r */
-{ "call", 0xe800f000, 0xfc1ffffd, "n(b)", pa20, FLAG_STRICT},
-{ "call", 0xe800a000, 0xffe0e000, "nW", pa10, FLAG_STRICT},
-{ "ret", 0xe840d000, 0xfffffffd, "n", pa20, FLAG_STRICT},
-
{ "cmpib", 0xec000000, 0xfc000000, "?Qn5,b,w", pa20, FLAG_STRICT},
{ "cmpib", 0x84000000, 0xf4000000, "?nn5,b,w", pa10, FLAG_STRICT},
{ "comib", 0x84000000, 0xfc000000, "?nn5,b,w", pa10, 0}, /* comib{tf}*/
@@ -301,12 +303,12 @@ static const struct pa_opcode pa_opcodes[] =
/* This entry is for the disassembler only. It will never be used by
assembler. */
{ "comb", 0x88000000, 0xfc000000, "?nnx,b,w", pa10, 0}, /* comb{tf} */
-{ "addb", 0xa0000000, 0xf4000000, "?Wnx,b,w", pa20, FLAG_STRICT},
+{ "addb", 0xa0000000, 0xf4000000, "?Wnx,b,w", pa20w, FLAG_STRICT},
{ "addb", 0xa0000000, 0xfc000000, "?@nx,b,w", pa10, 0}, /* addb{tf} */
/* This entry is for the disassembler only. It will never be used by
assembler. */
{ "addb", 0xa8000000, 0xfc000000, "?@nx,b,w", pa10, 0},
-{ "addib", 0xa4000000, 0xf4000000, "?Wn5,b,w", pa20, FLAG_STRICT},
+{ "addib", 0xa4000000, 0xf4000000, "?Wn5,b,w", pa20w, FLAG_STRICT},
{ "addib", 0xa4000000, 0xfc000000, "?@n5,b,w", pa10, 0}, /* addib{tf}*/
/* This entry is for the disassembler only. It will never be used by
assembler. */
@@ -327,10 +329,10 @@ static const struct pa_opcode pa_opcodes[] =
{ "ldd", 0x50000000, 0xfc000002, "cq#(b),x", pa20, FLAG_STRICT},
{ "ldw", 0x0c000080, 0xfc0013c0, "cxccx(s,b),t", pa10, FLAG_STRICT},
{ "ldw", 0x0c000080, 0xfc0013c0, "cxccx(b),t", pa10, FLAG_STRICT},
-{ "ldw", 0x0c0010a0, 0xfc1f33e0, "cocc@(s,b),t", pa20, FLAG_STRICT},
-{ "ldw", 0x0c0010a0, 0xfc1f33e0, "cocc@(b),t", pa20, FLAG_STRICT},
{ "ldw", 0x0c001080, 0xfc0013c0, "cmcc5(s,b),t", pa10, FLAG_STRICT},
{ "ldw", 0x0c001080, 0xfc0013c0, "cmcc5(b),t", pa10, FLAG_STRICT},
+{ "ldw", 0x0c0010a0, 0xfc1f33e0, "cocc@(s,b),t", pa20, FLAG_STRICT},
+{ "ldw", 0x0c0010a0, 0xfc1f33e0, "cocc@(b),t", pa20, FLAG_STRICT},
{ "ldw", 0x4c000000, 0xfc000000, "ce<(b),x", pa20w, FLAG_STRICT},
{ "ldw", 0x4c000000, 0xfc000000, "ceJ(s,b),x", pa10, FLAG_STRICT},
{ "ldw", 0x4c000000, 0xfc000000, "ceJ(b),x", pa10, FLAG_STRICT},
@@ -342,19 +344,19 @@ static const struct pa_opcode pa_opcodes[] =
{ "ldw", 0x48000000, 0xfc000000, "j(b),x", pa10, 0},
{ "ldh", 0x0c000040, 0xfc0013c0, "cxccx(s,b),t", pa10, FLAG_STRICT},
{ "ldh", 0x0c000040, 0xfc0013c0, "cxccx(b),t", pa10, FLAG_STRICT},
-{ "ldh", 0x0c001060, 0xfc1f33e0, "cocc@(s,b),t", pa20, FLAG_STRICT},
-{ "ldh", 0x0c001060, 0xfc1f33e0, "cocc@(b),t", pa20, FLAG_STRICT},
{ "ldh", 0x0c001040, 0xfc0013c0, "cmcc5(s,b),t", pa10, FLAG_STRICT},
{ "ldh", 0x0c001040, 0xfc0013c0, "cmcc5(b),t", pa10, FLAG_STRICT},
+{ "ldh", 0x0c001060, 0xfc1f33e0, "cocc@(s,b),t", pa20, FLAG_STRICT},
+{ "ldh", 0x0c001060, 0xfc1f33e0, "cocc@(b),t", pa20, FLAG_STRICT},
{ "ldh", 0x44000000, 0xfc000000, "l(b),x", pa20w, FLAG_STRICT},
{ "ldh", 0x44000000, 0xfc000000, "j(s,b),x", pa10, 0},
{ "ldh", 0x44000000, 0xfc000000, "j(b),x", pa10, 0},
{ "ldb", 0x0c000000, 0xfc0013c0, "cxccx(s,b),t", pa10, FLAG_STRICT},
{ "ldb", 0x0c000000, 0xfc0013c0, "cxccx(b),t", pa10, FLAG_STRICT},
-{ "ldb", 0x0c001020, 0xfc1f33e0, "cocc@(s,b),t", pa20, FLAG_STRICT},
-{ "ldb", 0x0c001020, 0xfc1f33e0, "cocc@(b),t", pa20, FLAG_STRICT},
{ "ldb", 0x0c001000, 0xfc0013c0, "cmcc5(s,b),t", pa10, FLAG_STRICT},
{ "ldb", 0x0c001000, 0xfc0013c0, "cmcc5(b),t", pa10, FLAG_STRICT},
+{ "ldb", 0x0c001020, 0xfc1f33e0, "cocc@(s,b),t", pa20, FLAG_STRICT},
+{ "ldb", 0x0c001020, 0xfc1f33e0, "cocc@(b),t", pa20, FLAG_STRICT},
{ "ldb", 0x40000000, 0xfc000000, "l(b),x", pa20w, FLAG_STRICT},
{ "ldb", 0x40000000, 0xfc000000, "j(s,b),x", pa10, 0},
{ "ldb", 0x40000000, 0xfc000000, "j(b),x", pa10, 0},
@@ -364,10 +366,10 @@ static const struct pa_opcode pa_opcodes[] =
{ "std", 0x0c0012c0, 0xfc0013c0, "cmcCx,V(b)", pa20, FLAG_STRICT},
{ "std", 0x70000000, 0xfc000002, "cqx,&(b)", pa20w, FLAG_STRICT},
{ "std", 0x70000000, 0xfc000002, "cqx,#(b)", pa20, FLAG_STRICT},
-{ "stw", 0x0c0012a0, 0xfc0013ff, "cocCx,@(s,b)", pa20, FLAG_STRICT},
-{ "stw", 0x0c0012a0, 0xfc0013ff, "cocCx,@(b)", pa20, FLAG_STRICT},
{ "stw", 0x0c001280, 0xfc0013c0, "cmcCx,V(s,b)", pa10, FLAG_STRICT},
{ "stw", 0x0c001280, 0xfc0013c0, "cmcCx,V(b)", pa10, FLAG_STRICT},
+{ "stw", 0x0c0012a0, 0xfc0013ff, "cocCx,@(s,b)", pa20, FLAG_STRICT},
+{ "stw", 0x0c0012a0, 0xfc0013ff, "cocCx,@(b)", pa20, FLAG_STRICT},
{ "stw", 0x6c000000, 0xfc000000, "cex,<(b)", pa20w, FLAG_STRICT},
{ "stw", 0x6c000000, 0xfc000000, "cex,J(s,b)", pa10, FLAG_STRICT},
{ "stw", 0x6c000000, 0xfc000000, "cex,J(b)", pa10, FLAG_STRICT},
@@ -377,17 +379,17 @@ static const struct pa_opcode pa_opcodes[] =
{ "stw", 0x68000000, 0xfc000000, "x,l(b)", pa20w, FLAG_STRICT},
{ "stw", 0x68000000, 0xfc000000, "x,j(s,b)", pa10, 0},
{ "stw", 0x68000000, 0xfc000000, "x,j(b)", pa10, 0},
-{ "sth", 0x0c001260, 0xfc0033ff, "cocCx,@(s,b)", pa20, FLAG_STRICT},
-{ "sth", 0x0c001260, 0xfc0033ff, "cocCx,@(b)", pa20, FLAG_STRICT},
{ "sth", 0x0c001240, 0xfc0013c0, "cmcCx,V(s,b)", pa10, FLAG_STRICT},
{ "sth", 0x0c001240, 0xfc0013c0, "cmcCx,V(b)", pa10, FLAG_STRICT},
+{ "sth", 0x0c001260, 0xfc0033ff, "cocCx,@(s,b)", pa20, FLAG_STRICT},
+{ "sth", 0x0c001260, 0xfc0033ff, "cocCx,@(b)", pa20, FLAG_STRICT},
{ "sth", 0x64000000, 0xfc000000, "x,l(b)", pa20w, FLAG_STRICT},
{ "sth", 0x64000000, 0xfc000000, "x,j(s,b)", pa10, 0},
{ "sth", 0x64000000, 0xfc000000, "x,j(b)", pa10, 0},
-{ "stb", 0x0c001220, 0xfc0033ff, "cocCx,@(s,b)", pa20, FLAG_STRICT},
-{ "stb", 0x0c001220, 0xfc0033ff, "cocCx,@(b)", pa20, FLAG_STRICT},
{ "stb", 0x0c001200, 0xfc0013c0, "cmcCx,V(s,b)", pa10, FLAG_STRICT},
{ "stb", 0x0c001200, 0xfc0013c0, "cmcCx,V(b)", pa10, FLAG_STRICT},
+{ "stb", 0x0c001220, 0xfc0033ff, "cocCx,@(s,b)", pa20, FLAG_STRICT},
+{ "stb", 0x0c001220, 0xfc0033ff, "cocCx,@(b)", pa20, FLAG_STRICT},
{ "stb", 0x60000000, 0xfc000000, "x,l(b)", pa20w, FLAG_STRICT},
{ "stb", 0x60000000, 0xfc000000, "x,j(s,b)", pa10, 0},
{ "stb", 0x60000000, 0xfc000000, "x,j(b)", pa10, 0},
@@ -395,20 +397,20 @@ static const struct pa_opcode pa_opcodes[] =
{ "ldwm", 0x4c000000, 0xfc000000, "j(b),x", pa10, 0},
{ "stwm", 0x6c000000, 0xfc000000, "x,j(s,b)", pa10, 0},
{ "stwm", 0x6c000000, 0xfc000000, "x,j(b)", pa10, 0},
-{ "ldwx", 0x0c000080, 0xfc001fc0, "cxx(s,b),t", pa10, 0},
-{ "ldwx", 0x0c000080, 0xfc001fc0, "cxx(b),t", pa10, 0},
-{ "ldhx", 0x0c000040, 0xfc001fc0, "cxx(s,b),t", pa10, 0},
-{ "ldhx", 0x0c000040, 0xfc001fc0, "cxx(b),t", pa10, 0},
-{ "ldbx", 0x0c000000, 0xfc001fc0, "cxx(s,b),t", pa10, 0},
-{ "ldbx", 0x0c000000, 0xfc001fc0, "cxx(b),t", pa10, 0},
+{ "ldwx", 0x0c000080, 0xfc001fc0, "cXx(s,b),t", pa10, 0},
+{ "ldwx", 0x0c000080, 0xfc001fc0, "cXx(b),t", pa10, 0},
+{ "ldhx", 0x0c000040, 0xfc001fc0, "cXx(s,b),t", pa10, 0},
+{ "ldhx", 0x0c000040, 0xfc001fc0, "cXx(b),t", pa10, 0},
+{ "ldbx", 0x0c000000, 0xfc001fc0, "cXx(s,b),t", pa10, 0},
+{ "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},
{ "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},
{ "ldcw", 0x0c0011c0, 0xfc0013c0, "cmcd5(b),t", pa10, FLAG_STRICT},
-{ "stwa", 0x0c0013a0, 0xfc00d3ff, "cocCx,@(b)", pa20, FLAG_STRICT},
{ "stwa", 0x0c001380, 0xfc00d3c0, "cmcCx,V(b)", pa10, FLAG_STRICT},
+{ "stwa", 0x0c0013a0, 0xfc00d3ff, "cocCx,@(b)", pa20, FLAG_STRICT},
{ "stby", 0x0c001300, 0xfc0013c0, "cscCx,V(s,b)", pa10, FLAG_STRICT},
{ "stby", 0x0c001300, 0xfc0013c0, "cscCx,V(b)", pa10, FLAG_STRICT},
{ "ldda", 0x0c000100, 0xfc00d3c0, "cxccx(b),t", pa20, FLAG_STRICT},
@@ -421,29 +423,29 @@ static const struct pa_opcode pa_opcodes[] =
{ "stda", 0x0c0013e0, 0xfc0033ff, "cocCx,@(b)", pa20, FLAG_STRICT},
{ "stda", 0x0c0013c0, 0xfc0013c0, "cmcCx,V(s,b)", pa20, FLAG_STRICT},
{ "stda", 0x0c0013c0, 0xfc0013c0, "cmcCx,V(b)", pa20, FLAG_STRICT},
-{ "ldwax", 0x0c000180, 0xfc00dfc0, "cxx(b),t", pa10, 0},
-{ "ldcwx", 0x0c0001c0, 0xfc001fc0, "cxx(s,b),t", pa10, 0},
-{ "ldcwx", 0x0c0001c0, 0xfc001fc0, "cxx(b),t", pa10, 0},
-{ "ldws", 0x0c001080, 0xfc001fc0, "cm5(s,b),t", pa10, 0},
-{ "ldws", 0x0c001080, 0xfc001fc0, "cm5(b),t", pa10, 0},
-{ "ldhs", 0x0c001040, 0xfc001fc0, "cm5(s,b),t", pa10, 0},
-{ "ldhs", 0x0c001040, 0xfc001fc0, "cm5(b),t", pa10, 0},
-{ "ldbs", 0x0c001000, 0xfc001fc0, "cm5(s,b),t", pa10, 0},
-{ "ldbs", 0x0c001000, 0xfc001fc0, "cm5(b),t", pa10, 0},
-{ "ldwas", 0x0c001180, 0xfc00dfc0, "cm5(b),t", pa10, 0},
-{ "ldcws", 0x0c0011c0, 0xfc001fc0, "cm5(s,b),t", pa10, 0},
-{ "ldcws", 0x0c0011c0, 0xfc001fc0, "cm5(b),t", pa10, 0},
-{ "stws", 0x0c001280, 0xfc001fc0, "cmx,V(s,b)", pa10, 0},
-{ "stws", 0x0c001280, 0xfc001fc0, "cmx,V(b)", pa10, 0},
-{ "sths", 0x0c001240, 0xfc001fc0, "cmx,V(s,b)", pa10, 0},
-{ "sths", 0x0c001240, 0xfc001fc0, "cmx,V(b)", pa10, 0},
-{ "stbs", 0x0c001200, 0xfc001fc0, "cmx,V(s,b)", pa10, 0},
-{ "stbs", 0x0c001200, 0xfc001fc0, "cmx,V(b)", pa10, 0},
-{ "stwas", 0x0c001380, 0xfc00dfc0, "cmx,V(b)", pa10, 0},
+{ "ldwax", 0x0c000180, 0xfc00dfc0, "cXx(b),t", pa10, 0},
+{ "ldcwx", 0x0c0001c0, 0xfc001fc0, "cXx(s,b),t", pa10, 0},
+{ "ldcwx", 0x0c0001c0, 0xfc001fc0, "cXx(b),t", pa10, 0},
+{ "ldws", 0x0c001080, 0xfc001fc0, "cM5(s,b),t", pa10, 0},
+{ "ldws", 0x0c001080, 0xfc001fc0, "cM5(b),t", pa10, 0},
+{ "ldhs", 0x0c001040, 0xfc001fc0, "cM5(s,b),t", pa10, 0},
+{ "ldhs", 0x0c001040, 0xfc001fc0, "cM5(b),t", pa10, 0},
+{ "ldbs", 0x0c001000, 0xfc001fc0, "cM5(s,b),t", pa10, 0},
+{ "ldbs", 0x0c001000, 0xfc001fc0, "cM5(b),t", pa10, 0},
+{ "ldwas", 0x0c001180, 0xfc00dfc0, "cM5(b),t", pa10, 0},
+{ "ldcws", 0x0c0011c0, 0xfc001fc0, "cM5(s,b),t", pa10, 0},
+{ "ldcws", 0x0c0011c0, 0xfc001fc0, "cM5(b),t", pa10, 0},
+{ "stws", 0x0c001280, 0xfc001fc0, "cMx,V(s,b)", pa10, 0},
+{ "stws", 0x0c001280, 0xfc001fc0, "cMx,V(b)", pa10, 0},
+{ "sths", 0x0c001240, 0xfc001fc0, "cMx,V(s,b)", pa10, 0},
+{ "sths", 0x0c001240, 0xfc001fc0, "cMx,V(b)", pa10, 0},
+{ "stbs", 0x0c001200, 0xfc001fc0, "cMx,V(s,b)", pa10, 0},
+{ "stbs", 0x0c001200, 0xfc001fc0, "cMx,V(b)", pa10, 0},
+{ "stwas", 0x0c001380, 0xfc00dfc0, "cMx,V(b)", pa10, 0},
{ "stdby", 0x0c001340, 0xfc0013c0, "cscCx,V(s,b)", pa20, FLAG_STRICT},
{ "stdby", 0x0c001340, 0xfc0013c0, "cscCx,V(b)", pa20, FLAG_STRICT},
-{ "stbys", 0x0c001300, 0xfc001fc0, "csx,V(s,b)", pa10, 0},
-{ "stbys", 0x0c001300, 0xfc001fc0, "csx,V(b)", pa10, 0},
+{ "stbys", 0x0c001300, 0xfc001fc0, "cAx,V(s,b)", pa10, 0},
+{ "stbys", 0x0c001300, 0xfc001fc0, "cAx,V(b)", pa10, 0},
/* Immediate instructions. */
{ "ldo", 0x34000000, 0xfc000000, "l(b),x", pa20w, 0},
@@ -482,10 +484,10 @@ static const struct pa_opcode pa_opcodes[] =
{ "addbf", 0xa8000000, 0xfc000000, "?dnx,b,w", pa10, 0},
{ "addibt", 0xa4000000, 0xfc000000, "?dn5,b,w", pa10, 0},
{ "addibf", 0xac000000, 0xfc000000, "?dn5,b,w", pa10, 0},
-{ "bb", 0xc0006000, 0xffe06000, "?Bnx,!,w", pa20, FLAG_STRICT},
-{ "bb", 0xc4004000, 0xfc004000, "?Bnx,B,w", pa20, FLAG_STRICT},
{ "bb", 0xc0004000, 0xffe06000, "?bnx,!,w", pa10, FLAG_STRICT},
{ "bb", 0xc4004000, 0xfc004000, "?bnx,Q,w", pa10, 0},
+{ "bb", 0xc0006000, 0xffe06000, "?Bnx,!,w", pa20, FLAG_STRICT},
+{ "bb", 0xc4004000, 0xfc004000, "?Bnx,B,w", pa20, FLAG_STRICT},
{ "bvb", 0xc0004000, 0xffe04000, "?bnx,w", pa10, 0},
{ "clrbts", 0xe8004005, 0xffffffff, "", pa20, FLAG_STRICT},
{ "popbts", 0xe8004005, 0xfffff007, "$", pa20, FLAG_STRICT},
@@ -701,46 +703,46 @@ static const struct pa_opcode pa_opcodes[] =
/* Floating Point Coprocessor Instructions. */
-{ "fldw", 0x24001020, 0xfc1f33a0, "cocc@(s,b),fT", pa20, FLAG_STRICT},
-{ "fldw", 0x24001020, 0xfc1f33a0, "cocc@(b),fT", pa20, FLAG_STRICT},
{ "fldw", 0x24000000, 0xfc001380, "cxccx(s,b),fT", pa10, FLAG_STRICT},
{ "fldw", 0x24000000, 0xfc001380, "cxccx(b),fT", pa10, FLAG_STRICT},
{ "fldw", 0x24001000, 0xfc001380, "cmcc5(s,b),fT", pa10, FLAG_STRICT},
{ "fldw", 0x24001000, 0xfc001380, "cmcc5(b),fT", pa10, FLAG_STRICT},
+{ "fldw", 0x24001020, 0xfc1f33a0, "cocc@(s,b),fT", pa20, FLAG_STRICT},
+{ "fldw", 0x24001020, 0xfc1f33a0, "cocc@(b),fT", pa20, FLAG_STRICT},
{ "fldw", 0x5c000000, 0xfc000004, "y(b),fe", pa20w, FLAG_STRICT},
{ "fldw", 0x58000000, 0xfc000000, "cJy(b),fe", pa20w, FLAG_STRICT},
{ "fldw", 0x5c000000, 0xfc000004, "d(b),fe", pa20, FLAG_STRICT},
{ "fldw", 0x58000000, 0xfc000000, "cJd(b),fe", pa20, FLAG_STRICT},
-{ "fldd", 0x2c001020, 0xfc1f33e0, "cocc@(s,b),ft", pa20, FLAG_STRICT},
-{ "fldd", 0x2c001020, 0xfc1f33e0, "cocc@(b),ft", pa20, FLAG_STRICT},
{ "fldd", 0x2c000000, 0xfc0013c0, "cxccx(s,b),ft", pa10, FLAG_STRICT},
{ "fldd", 0x2c000000, 0xfc0013c0, "cxccx(b),ft", pa10, FLAG_STRICT},
{ "fldd", 0x2c001000, 0xfc0013c0, "cmcc5(s,b),ft", pa10, FLAG_STRICT},
{ "fldd", 0x2c001000, 0xfc0013c0, "cmcc5(b),ft", pa10, FLAG_STRICT},
+{ "fldd", 0x2c001020, 0xfc1f33e0, "cocc@(s,b),ft", pa20, FLAG_STRICT},
+{ "fldd", 0x2c001020, 0xfc1f33e0, "cocc@(b),ft", pa20, FLAG_STRICT},
{ "fldd", 0x50000002, 0xfc000002, "cq&(b),fx", pa20w, FLAG_STRICT},
{ "fldd", 0x50000002, 0xfc000002, "cq#(b),fx", pa20, FLAG_STRICT},
-{ "fstw", 0x24001220, 0xfc1f33a0, "cocCfT,@(s,b)", pa10, FLAG_STRICT},
-{ "fstw", 0x24001220, 0xfc1f33a0, "cocCfT,@(b)", pa10, FLAG_STRICT},
{ "fstw", 0x24000200, 0xfc001380, "cxcCfT,x(s,b)", pa10, FLAG_STRICT},
{ "fstw", 0x24000200, 0xfc001380, "cxcCfT,x(b)", pa10, FLAG_STRICT},
{ "fstw", 0x24001200, 0xfc001380, "cmcCfT,5(s,b)", pa10, FLAG_STRICT},
{ "fstw", 0x24001200, 0xfc001380, "cmcCfT,5(b)", pa10, FLAG_STRICT},
+{ "fstw", 0x24001220, 0xfc1f33a0, "cocCfT,@(s,b)", pa10, FLAG_STRICT},
+{ "fstw", 0x24001220, 0xfc1f33a0, "cocCfT,@(b)", pa10, FLAG_STRICT},
{ "fstw", 0x7c000000, 0xfc000004, "fE,y(b)", pa20w, FLAG_STRICT},
{ "fstw", 0x78000000, 0xfc000000, "cJfe,y(b)", pa20w, FLAG_STRICT},
{ "fstw", 0x7c000000, 0xfc000004, "fe,d(b)", pa20, FLAG_STRICT},
{ "fstw", 0x78000000, 0xfc000000, "cJfe,d(b)", pa20, FLAG_STRICT},
-{ "fstd", 0x2c001220, 0xfc1f33e0, "cocCft,@(s,b)", pa10, FLAG_STRICT},
-{ "fstd", 0x2c001220, 0xfc1f33e0, "cocCft,@(b)", pa10, FLAG_STRICT},
{ "fstd", 0x2c000200, 0xfc0013c0, "cxcCft,x(s,b)", pa10, FLAG_STRICT},
{ "fstd", 0x2c000200, 0xfc0013c0, "cxcCft,x(b)", pa10, FLAG_STRICT},
{ "fstd", 0x2c001200, 0xfc0013c0, "cmcCft,5(s,b)", pa10, FLAG_STRICT},
{ "fstd", 0x2c001200, 0xfc0013c0, "cmcCft,5(b)", pa10, FLAG_STRICT},
+{ "fstd", 0x2c001220, 0xfc1f33e0, "cocCft,@(s,b)", pa10, FLAG_STRICT},
+{ "fstd", 0x2c001220, 0xfc1f33e0, "cocCft,@(b)", pa10, FLAG_STRICT},
{ "fstd", 0x70000002, 0xfc000002, "cqfx,&(b)", pa20w, FLAG_STRICT},
{ "fstd", 0x70000002, 0xfc000002, "cqfx,#(b)", pa20, FLAG_STRICT},
-{ "fldwx", 0x24000000, 0xfc001f80, "cxx(s,b),fT", pa10, 0},
-{ "fldwx", 0x24000000, 0xfc001f80, "cxx(b),fT", pa10, 0},
-{ "flddx", 0x2c000000, 0xfc001fc0, "cxx(s,b),ft", pa10, 0},
-{ "flddx", 0x2c000000, 0xfc001fc0, "cxx(b),ft", pa10, 0},
+{ "fldwx", 0x24000000, 0xfc001f80, "cXx(s,b),fT", pa10, 0},
+{ "fldwx", 0x24000000, 0xfc001f80, "cXx(b),fT", pa10, 0},
+{ "flddx", 0x2c000000, 0xfc001fc0, "cXx(s,b),ft", pa10, 0},
+{ "flddx", 0x2c000000, 0xfc001fc0, "cXx(b),ft", pa10, 0},
{ "fstwx", 0x24000200, 0xfc001f80, "cxfT,x(s,b)", pa10, 0},
{ "fstwx", 0x24000200, 0xfc001f80, "cxfT,x(b)", pa10, 0},
{ "fstdx", 0x2c000200, 0xfc001fc0, "cxft,x(s,b)", pa10, 0},
@@ -815,38 +817,44 @@ static const struct pa_opcode pa_opcodes[] =
{ "spop2", 0x10000400, 0xfc000600, "v,1Nb", pa10, 0},
{ "spop3", 0x10000600, 0xfc000600, "v,0Nx,b", pa10, 0},
{ "copr", 0x30000000, 0xfc000000, "u,2N", pa10, 0},
-{ "cldwx", 0x24000000, 0xfc001e00, "ucxx(s,b),t", pa10, 0},
-{ "cldwx", 0x24000000, 0xfc001e00, "ucxx(b),t", pa10, 0},
-{ "clddx", 0x2c000000, 0xfc001e00, "ucxx(s,b),t", pa10, 0},
-{ "clddx", 0x2c000000, 0xfc001e00, "ucxx(b),t", pa10, 0},
-{ "cstwx", 0x24000200, 0xfc001e00, "ucxt,x(s,b)", pa10, 0},
-{ "cstwx", 0x24000200, 0xfc001e00, "ucxt,x(b)", pa10, 0},
-{ "cstdx", 0x2c000200, 0xfc001e00, "ucxt,x(s,b)", pa10, 0},
-{ "cstdx", 0x2c000200, 0xfc001e00, "ucxt,x(b)", pa10, 0},
-{ "cldws", 0x24001000, 0xfc001e00, "ucm5(s,b),t", pa10, 0},
-{ "cldws", 0x24001000, 0xfc001e00, "ucm5(b),t", pa10, 0},
-{ "cldds", 0x2c001000, 0xfc001e00, "ucm5(s,b),t", pa10, 0},
-{ "cldds", 0x2c001000, 0xfc001e00, "ucm5(b),t", pa10, 0},
-{ "cstws", 0x24001200, 0xfc001e00, "ucmt,5(s,b)", pa10, 0},
-{ "cstws", 0x24001200, 0xfc001e00, "ucmt,5(b)", pa10, 0},
-{ "cstds", 0x2c001200, 0xfc001e00, "ucmt,5(s,b)", pa10, 0},
-{ "cstds", 0x2c001200, 0xfc001e00, "ucmt,5(b)", pa10, 0},
-{ "cldw", 0x24000000, 0xfc001e00, "ucxx(s,b),t", pa10, FLAG_STRICT},
-{ "cldw", 0x24000000, 0xfc001e00, "ucxx(b),t", pa10, FLAG_STRICT},
-{ "cldw", 0x24001000, 0xfc001e00, "ucm5(s,b),t", pa10, FLAG_STRICT},
-{ "cldw", 0x24001000, 0xfc001e00, "ucm5(b),t", pa10, FLAG_STRICT},
-{ "cldd", 0x2c000000, 0xfc001e00, "ucxx(s,b),t", pa10, FLAG_STRICT},
-{ "cldd", 0x2c000000, 0xfc001e00, "ucxx(b),t", pa10, FLAG_STRICT},
-{ "cldd", 0x2c001000, 0xfc001e00, "ucm5(s,b),t", pa10, FLAG_STRICT},
-{ "cldd", 0x2c001000, 0xfc001e00, "ucm5(b),t", pa20, FLAG_STRICT},
-{ "cstw", 0x24000200, 0xfc001e00, "ucxt,x(s,b)", pa10, FLAG_STRICT},
-{ "cstw", 0x24000200, 0xfc001e00, "ucxt,x(b)", pa10, FLAG_STRICT},
-{ "cstw", 0x24001200, 0xfc001e00, "ucmt,5(s,b)", pa10, FLAG_STRICT},
-{ "cstw", 0x24001200, 0xfc001e00, "ucmt,5(b)", pa10, FLAG_STRICT},
-{ "cstd", 0x2c000200, 0xfc001e00, "ucxt,x(s,b)", pa10, FLAG_STRICT},
-{ "cstd", 0x2c000200, 0xfc001e00, "ucxt,x(b)", pa10, FLAG_STRICT},
-{ "cstd", 0x2c001200, 0xfc001e00, "ucmt,5(s,b)", pa10, FLAG_STRICT},
-{ "cstd", 0x2c001200, 0xfc001e00, "ucmt,5(b)", pa10, FLAG_STRICT},
+{ "cldwx", 0x24000000, 0xfc001e00, "ucXx(s,b),t", pa10, 0},
+{ "cldwx", 0x24000000, 0xfc001e00, "ucXx(b),t", pa10, 0},
+{ "clddx", 0x2c000000, 0xfc001e00, "ucXx(s,b),t", pa10, 0},
+{ "clddx", 0x2c000000, 0xfc001e00, "ucXx(b),t", pa10, 0},
+{ "cstwx", 0x24000200, 0xfc001e00, "ucXt,x(s,b)", pa10, 0},
+{ "cstwx", 0x24000200, 0xfc001e00, "ucXt,x(b)", pa10, 0},
+{ "cstdx", 0x2c000200, 0xfc001e00, "ucXt,x(s,b)", pa10, 0},
+{ "cstdx", 0x2c000200, 0xfc001e00, "ucXt,x(b)", pa10, 0},
+{ "cldws", 0x24001000, 0xfc001e00, "ucM5(s,b),t", pa10, 0},
+{ "cldws", 0x24001000, 0xfc001e00, "ucM5(b),t", pa10, 0},
+{ "cldds", 0x2c001000, 0xfc001e00, "ucM5(s,b),t", pa10, 0},
+{ "cldds", 0x2c001000, 0xfc001e00, "ucM5(b),t", pa10, 0},
+{ "cstws", 0x24001200, 0xfc001e00, "ucMt,5(s,b)", pa10, 0},
+{ "cstws", 0x24001200, 0xfc001e00, "ucMt,5(b)", pa10, 0},
+{ "cstds", 0x2c001200, 0xfc001e00, "ucMt,5(s,b)", pa10, 0},
+{ "cstds", 0x2c001200, 0xfc001e00, "ucMt,5(b)", pa10, 0},
+{ "cldw", 0x24000000, 0xfc001e00, "ucXx(s,b),t", pa10, FLAG_STRICT},
+{ "cldw", 0x24000000, 0xfc001e00, "ucXx(b),t", pa10, FLAG_STRICT},
+{ "cldw", 0x24001000, 0xfc001e00, "ucM5(s,b),t", pa10, FLAG_STRICT},
+{ "cldw", 0x24001000, 0xfc001e00, "ucM5(b),t", pa10, FLAG_STRICT},
+{ "cldd", 0x2c000000, 0xfc001e00, "ucXx(s,b),t", pa10, FLAG_STRICT},
+{ "cldd", 0x2c000000, 0xfc001e00, "ucXx(b),t", pa10, FLAG_STRICT},
+{ "cldd", 0x2c001000, 0xfc001e00, "ucM5(s,b),t", pa10, FLAG_STRICT},
+{ "cldd", 0x2c001000, 0xfc001e00, "ucM5(b),t", pa20, FLAG_STRICT},
+{ "cstw", 0x24000200, 0xfc001e00, "ucXt,x(s,b)", pa10, FLAG_STRICT},
+{ "cstw", 0x24000200, 0xfc001e00, "ucXt,x(b)", pa10, FLAG_STRICT},
+{ "cstw", 0x24001200, 0xfc001e00, "ucMt,5(s,b)", pa10, FLAG_STRICT},
+{ "cstw", 0x24001200, 0xfc001e00, "ucMt,5(b)", pa10, FLAG_STRICT},
+{ "cstd", 0x2c000200, 0xfc001e00, "ucXt,x(s,b)", pa10, FLAG_STRICT},
+{ "cstd", 0x2c000200, 0xfc001e00, "ucXt,x(b)", pa10, FLAG_STRICT},
+{ "cstd", 0x2c001200, 0xfc001e00, "ucMt,5(s,b)", pa10, FLAG_STRICT},
+{ "cstd", 0x2c001200, 0xfc001e00, "ucMt,5(b)", pa10, FLAG_STRICT},
+
+/* More pseudo instructions which must follow the main table. */
+{ "call", 0xe800f000, 0xfc1ffffd, "n(b)", pa20, FLAG_STRICT},
+{ "call", 0xe800a000, 0xffe0e000, "nW", pa10, FLAG_STRICT},
+{ "ret", 0xe840d000, 0xfffffffd, "n", pa20, FLAG_STRICT},
+
};
#define NUMOPCODES ((sizeof pa_opcodes)/(sizeof pa_opcodes[0]))
diff --git a/include/opcode/i386.h b/include/opcode/i386.h
index 38de44a..571990e 100644
--- a/include/opcode/i386.h
+++ b/include/opcode/i386.h
@@ -553,9 +553,12 @@ static const template i386_optab[] = {
{"sgdt", 1, 0x0f01, 0, Cpu286, wlq_Suf|Modrm, { WordMem, 0, 0} },
{"sidt", 1, 0x0f01, 1, Cpu286, wlq_Suf|Modrm, { WordMem, 0, 0} },
-{"sldt", 1, 0x0f00, 0, Cpu286, wlq_Suf|Modrm, { WordReg|WordMem, 0, 0} },
-{"smsw", 1, 0x0f01, 4, Cpu286, wlq_Suf|Modrm, { WordReg|WordMem, 0, 0} },
-{"str", 1, 0x0f00, 1, Cpu286, w_Suf|Modrm|IgnoreSize,{ Reg16|ShortMem, 0, 0} },
+{"sldt", 1, 0x0f00, 0, Cpu286, wlq_Suf|Modrm, { WordReg|InvMem, 0, 0} },
+{"sldt", 1, 0x0f00, 0, Cpu286, w_Suf|Modrm|IgnoreSize,{ ShortMem, 0, 0} },
+{"smsw", 1, 0x0f01, 4, Cpu286, wlq_Suf|Modrm, { WordReg|InvMem, 0, 0} },
+{"smsw", 1, 0x0f01, 4, Cpu286, w_Suf|Modrm|IgnoreSize,{ ShortMem, 0, 0} },
+{"str", 1, 0x0f00, 1, Cpu286, wlq_Suf|Modrm, { WordReg|InvMem, 0, 0} },
+{"str", 1, 0x0f00, 1, Cpu286, w_Suf|Modrm|IgnoreSize,{ ShortMem, 0, 0} },
{"verr", 1, 0x0f00, 4, Cpu286, w_Suf|Modrm|IgnoreSize,{ Reg16|ShortMem, 0, 0} },
{"verw", 1, 0x0f00, 5, Cpu286, w_Suf|Modrm|IgnoreSize,{ Reg16|ShortMem, 0, 0} },
diff --git a/include/opcode/mips.h b/include/opcode/mips.h
index 7fd4703..1469e10 100644
--- a/include/opcode/mips.h
+++ b/include/opcode/mips.h
@@ -209,8 +209,8 @@ struct mips_opcode
Coprocessor instructions:
"E" 5 bit target register (OP_*_RT)
"G" 5 bit destination register (OP_*_RD)
+ "H" 3 bit sel field for (d)mtc* and (d)mfc* (OP_*_SEL)
"P" 5 bit performance-monitor register (OP_*_PERFREG)
- "H" 3 bit sel field (OP_*_SEL)
Macro instructions:
"A" General 32 bit expression
@@ -307,7 +307,7 @@ struct mips_opcode
ORs of these bits, indicatingthat they support the instructions
defined at the given level. */
-#define INSN_ISA_MASK 0x0000ffff
+#define INSN_ISA_MASK 0x00000fff
#define INSN_ISA1 0x00000010
#define INSN_ISA2 0x00000020
#define INSN_ISA3 0x00000040
@@ -326,8 +326,10 @@ struct mips_opcode
#define INSN_4100 0x00040000
/* Toshiba R3900 instruction. */
#define INSN_3900 0x00080000
-/* 32-bit code running on a ISA3+ CPU. */
-#define INSN_GP32 0x00100000
+/* MIPS R10000 instruction. */
+#define INSN_10000 0x00100000
+/* Broadcom SB-1 instruction. */
+#define INSN_SB1 0x00200000
/* MIPS ISA defines, use instead of hardcoding ISA level. */
@@ -361,7 +363,6 @@ struct mips_opcode
#define CPU_R12000 12000
#define CPU_MIPS16 16
#define CPU_MIPS32 32
-#define CPU_MIPS32_4K 3204113 /* 32, 04, octal 'K'. */
#define CPU_MIPS5 5
#define CPU_MIPS64 64
#define CPU_SB1 12310201 /* octal 'SB', 01. */
@@ -369,20 +370,19 @@ struct mips_opcode
/* Test for membership in an ISA including chip specific ISAs.
INSN is pointer to an element of the opcode table; ISA is the
specified ISA to test against; and CPU is the CPU specific ISA
- to test, or zero if no CPU specific ISA test is desired.
- The gp32 arg is set when you need to force 32-bit register usage on
- a machine with 64-bit registers; see the documentation under -mgp32
- in the MIPS gas docs. */
-
-#define OPCODE_IS_MEMBER(insn, isa, cpu, gp32) \
- ((((insn)->membership & isa) != 0 \
- && ((insn)->membership & INSN_GP32 ? gp32 : 1) \
- ) \
+ to test, or zero if no CPU specific ISA test is desired. */
+
+#define OPCODE_IS_MEMBER(insn, isa, cpu) \
+ (((insn)->membership & isa) != 0 \
|| (cpu == CPU_R4650 && ((insn)->membership & INSN_4650) != 0) \
|| (cpu == CPU_R4010 && ((insn)->membership & INSN_4010) != 0) \
|| ((cpu == CPU_VR4100 || cpu == CPU_R4111) \
&& ((insn)->membership & INSN_4100) != 0) \
- || (cpu == CPU_R3900 && ((insn)->membership & INSN_3900) != 0))
+ || (cpu == CPU_R3900 && ((insn)->membership & INSN_3900) != 0) \
+ || ((cpu == CPU_R10000 || cpu == CPU_R12000) \
+ && ((insn)->membership & INSN_10000) != 0) \
+ || (cpu == CPU_SB1 && ((insn)->membership & INSN_SB1) != 0) \
+ || 0) /* Please keep this term for easier source merging. */
/* This is a list of macro expanded instructions.
@@ -508,6 +508,7 @@ enum
M_LWR_A,
M_LWR_AB,
M_LWU_AB,
+ M_MOVE,
M_MUL,
M_MUL_I,
M_MULO,
diff --git a/include/opcode/mmix.h b/include/opcode/mmix.h
new file mode 100644
index 0000000..825eb0e
--- /dev/null
+++ b/include/opcode/mmix.h
@@ -0,0 +1,185 @@
+/* mmix.h -- Header file for MMIX opcode table
+ Copyright (C) 2001 Free Software Foundation, Inc.
+ Written by Hans-Peter Nilsson (hp@bitrange.com)
+
+This file is part of GDB, GAS, and the GNU binutils.
+
+GDB, GAS, and the GNU binutils are free software; you can redistribute
+them and/or modify them 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.
+
+GDB, GAS, and the GNU binutils are distributed in the hope that they
+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 file; see the file COPYING. If not, write to the Free
+Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+/* We could have just a char*[] table indexed by the register number, but
+ that would not allow for synonyms. The table is terminated with an
+ entry with a NULL name. */
+struct mmix_spec_reg
+{
+ const char *name;
+ unsigned int number;
+};
+
+/* General indication of the type of instruction. */
+enum mmix_insn_type
+ {
+ mmix_type_pseudo,
+ mmix_type_normal,
+ mmix_type_branch,
+ mmix_type_condbranch,
+ mmix_type_memaccess_octa,
+ mmix_type_memaccess_tetra,
+ mmix_type_memaccess_wyde,
+ mmix_type_memaccess_byte,
+ mmix_type_memaccess_block,
+ mmix_type_jsr
+ };
+
+/* Type of operands an instruction takes. Use when parsing assembly code
+ and disassembling. */
+enum mmix_operands_type
+ {
+ mmix_operands_none = 0,
+
+ /* All operands are registers: "$X,$Y,$Z". */
+ mmix_operands_regs,
+
+ /* "$X,YZ", like SETH. */
+ mmix_operands_reg_yz,
+
+ /* The regular "$X,$Y,$Z|Z".
+ The Z is optional; if only "$X,$Y" is given, then "$X,$Y,0" is
+ assumed. */
+ mmix_operands_regs_z_opt,
+
+ /* The regular "$X,$Y,$Z|Z". */
+ mmix_operands_regs_z,
+
+ /* "Address"; only JMP. Zero operands allowed unless GNU syntax. */
+ mmix_operands_jmp,
+
+ /* "$X|X,$Y,$Z|Z": PUSHGO; like "3", but X can be expressed as an
+ integer. */
+ mmix_operands_pushgo,
+
+ /* Two registers or a register and a byte, like FLOT, possibly with
+ rounding: "$X,$Z|Z" or "$X,ROUND_MODE,$Z|Z". */
+ mmix_operands_roundregs_z,
+
+ /* "X,YZ", POP. Unless GNU syntax, zero or one operand is allowed. */
+ mmix_operands_pop,
+
+ /* Two registers, possibly with rounding: "$X,$Z" or
+ "$X,ROUND_MODE,$Z". */
+ mmix_operands_roundregs,
+
+ /* "XYZ", like SYNC. */
+ mmix_operands_sync,
+
+ /* "X,$Y,$Z|Z", like SYNCD. */
+ mmix_operands_x_regs_z,
+
+ /* "$X,Y,$Z|Z", like NEG and NEGU. The Y field is optional, default 0. */
+ mmix_operands_neg,
+
+ /* "$X,Address, like GETA or branches. */
+ mmix_operands_regaddr,
+
+ /* "$X|X,Address, like PUSHJ. */
+ mmix_operands_pushj,
+
+ /* "$X,spec_reg"; GET. */
+ mmix_operands_get,
+
+ /* "spec_reg,$Z|Z"; PUT. */
+ mmix_operands_put,
+
+ /* Two registers, "$X,$Y". */
+ mmix_operands_set,
+
+ /* "$X,0"; SAVE. */
+ mmix_operands_save,
+
+ /* "0,$Z"; UNSAVE. */
+ mmix_operands_unsave,
+
+ /* "X,Y,Z"; like SWYM or TRAP. Zero (or 1 if GNU syntax) to three
+ operands, interpreted as 0; XYZ; X, YZ and X, Y, Z. */
+ mmix_operands_xyz_opt,
+
+ /* Just "Z", like RESUME. Unless GNU syntax, the operand can be omitted
+ and will then be assumed zero. */
+ mmix_operands_resume,
+
+ /* These are specials to handle that pseudo-directives are specified
+ like ordinary insns when being mmixal-compatible. They signify the
+ specific pseudo-directive rather than the operands type. */
+
+ /* LOC. */
+ mmix_operands_loc,
+
+ /* PREFIX. */
+ mmix_operands_prefix,
+
+ /* BYTE. */
+ mmix_operands_byte,
+
+ /* WYDE. */
+ mmix_operands_wyde,
+
+ /* TETRA. */
+ mmix_operands_tetra,
+
+ /* OCTA. */
+ mmix_operands_octa,
+
+ /* LOCAL. */
+ mmix_operands_local,
+
+ /* BSPEC. */
+ mmix_operands_bspec,
+
+ /* ESPEC. */
+ mmix_operands_espec,
+ };
+
+struct mmix_opcode
+ {
+ const char *name;
+ unsigned long match;
+ unsigned long lose;
+ enum mmix_operands_type operands;
+
+ /* This is used by the disassembly function. */
+ enum mmix_insn_type type;
+ };
+
+/* Declare the actual tables. */
+extern const struct mmix_opcode mmix_opcodes[];
+
+/* This one is terminated with an entry with a NULL name. */
+extern const struct mmix_spec_reg mmix_spec_regs[];
+
+/* Some insn values we use when padding and synthesizing address loads. */
+#define IMM_OFFSET_BIT 1
+#define COND_INV_BIT 0x8
+#define PRED_INV_BIT 0x10
+
+#define PUSHGO_INSN_BYTE 0xbe
+#define GO_INSN_BYTE 0x9e
+#define SETL_INSN_BYTE 0xe3
+#define INCML_INSN_BYTE 0xe6
+#define INCMH_INSN_BYTE 0xe5
+#define INCH_INSN_BYTE 0xe4
+#define SWYM_INSN_BYTE 0xfd
+
+/* We can have 256 - 32 (local registers) - 1 ($255 is not allocatable)
+ global registers. */
+#define MAX_GREGS 223
diff --git a/include/opcode/or32.h b/include/opcode/or32.h
new file mode 100644
index 0000000..05c5326
--- /dev/null
+++ b/include/opcode/or32.h
@@ -0,0 +1,188 @@
+/* Table of opcodes for the OpenRISC 1000 ISA.
+ Copyright 2002 Free Software Foundation, Inc.
+ Contributed by Damjan Lampret (lampret@opencores.org).
+
+ This file is part of or1k_gen_isa, or1ksim, GDB and GAS.
+
+ 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. */
+
+/* We treat all letters the same in encode/decode routines so
+ we need to assign some characteristics to them like signess etc. */
+
+#ifndef OR32_H_ISA
+#define OR32_H_ISA
+
+#define NUM_UNSIGNED (0)
+#define NUM_SIGNED (1)
+
+#ifndef PARAMS
+#define PARAMS(x) x
+#endif
+
+#ifndef CONST
+#define CONST const
+#endif
+
+#define MAX_GPRS 32
+#define PAGE_SIZE 4096
+#undef __HALF_WORD_INSN__
+
+#define OPERAND_DELIM (',')
+
+#define OR32_IF_DELAY (1)
+#define OR32_W_FLAG (2)
+#define OR32_R_FLAG (4)
+
+struct or32_letter
+{
+ char letter;
+ int sign;
+ /* int reloc; relocation per letter ?? */
+};
+
+/* Main instruction specification array. */
+struct or32_opcode
+{
+ /* Name of the instruction. */
+ char *name;
+
+ /* A string of characters which describe the operands.
+ Valid characters are:
+ ,() Itself. Characters appears in the assembly code.
+ rA Register operand.
+ rB Register operand.
+ rD Register operand.
+ I An immediate operand, range -32768 to 32767.
+ J An immediate operand, range . (unused)
+ K An immediate operand, range 0 to 65535.
+ L An immediate operand, range 0 to 63.
+ M An immediate operand, range . (unused)
+ N An immediate operand, range -33554432 to 33554431.
+ O An immediate operand, range . (unused). */
+ char *args;
+
+ /* Opcode and operand encoding. */
+ char *encoding;
+ void (*exec) PARAMS ((void));
+ unsigned int flags;
+};
+
+#define OPTYPE_LAST (0x80000000)
+#define OPTYPE_OP (0x40000000)
+#define OPTYPE_REG (0x20000000)
+#define OPTYPE_SIG (0x10000000)
+#define OPTYPE_DIS (0x08000000)
+#define OPTYPE_DST (0x04000000)
+#define OPTYPE_SBIT (0x00001F00)
+#define OPTYPE_SHR (0x0000001F)
+#define OPTYPE_SBIT_SHR (8)
+
+/* MM: Data how to decode operands. */
+extern struct insn_op_struct
+{
+ unsigned long type;
+ unsigned long data;
+} **op_start;
+
+#ifdef HAS_EXECUTION
+extern void l_invalid PARAMS ((void));
+extern void l_sfne PARAMS ((void));
+extern void l_bf PARAMS ((void));
+extern void l_add PARAMS ((void));
+extern void l_sw PARAMS ((void));
+extern void l_sb PARAMS ((void));
+extern void l_sh PARAMS ((void));
+extern void l_lwz PARAMS ((void));
+extern void l_lbs PARAMS ((void));
+extern void l_lbz PARAMS ((void));
+extern void l_lhs PARAMS ((void));
+extern void l_lhz PARAMS ((void));
+extern void l_movhi PARAMS ((void));
+extern void l_and PARAMS ((void));
+extern void l_or PARAMS ((void));
+extern void l_xor PARAMS ((void));
+extern void l_sub PARAMS ((void));
+extern void l_mul PARAMS ((void));
+extern void l_div PARAMS ((void));
+extern void l_divu PARAMS ((void));
+extern void l_sll PARAMS ((void));
+extern void l_sra PARAMS ((void));
+extern void l_srl PARAMS ((void));
+extern void l_j PARAMS ((void));
+extern void l_jal PARAMS ((void));
+extern void l_jalr PARAMS ((void));
+extern void l_jr PARAMS ((void));
+extern void l_rfe PARAMS ((void));
+extern void l_nop PARAMS ((void));
+extern void l_bnf PARAMS ((void));
+extern void l_sfeq PARAMS ((void));
+extern void l_sfgts PARAMS ((void));
+extern void l_sfges PARAMS ((void));
+extern void l_sflts PARAMS ((void));
+extern void l_sfles PARAMS ((void));
+extern void l_sfgtu PARAMS ((void));
+extern void l_sfgeu PARAMS ((void));
+extern void l_sfltu PARAMS ((void));
+extern void l_sfleu PARAMS ((void));
+extern void l_mtspr PARAMS ((void));
+extern void l_mfspr PARAMS ((void));
+extern void l_sys PARAMS ((void));
+extern void l_trap PARAMS ((void)); /* CZ 21/06/01. */
+extern void l_macrc PARAMS ((void));
+extern void l_mac PARAMS ((void));
+extern void l_msb PARAMS ((void));
+extern void l_invalid PARAMS ((void));
+extern void l_cust1 PARAMS ((void));
+extern void l_cust2 PARAMS ((void));
+extern void l_cust3 PARAMS ((void));
+extern void l_cust4 PARAMS ((void));
+#endif
+extern void l_none PARAMS ((void));
+
+extern const struct or32_letter or32_letters[];
+
+extern const struct or32_opcode or32_opcodes[];
+
+extern const unsigned int or32_num_opcodes;
+
+/* Calculates instruction length in bytes. Always 4 for OR32. */
+extern int insn_len PARAMS ((int));
+
+/* Is individual insn's operand signed or unsigned? */
+extern int letter_signed PARAMS ((char));
+
+/* Number of letters in the individual lettered operand. */
+extern int letter_range PARAMS ((char));
+
+/* MM: Returns index of given instruction name. */
+extern int insn_index PARAMS ((char *));
+
+/* MM: Returns instruction name from index. */
+extern const char *insn_name PARAMS ((int));
+
+/* MM: Constructs new FSM, based on or32_opcodes. */
+extern void build_automata PARAMS ((void));
+
+/* MM: Destructs FSM. */
+extern void destruct_automata PARAMS ((void));
+
+/* MM: Decodes instruction using FSM. Call build_automata first. */
+extern int insn_decode PARAMS ((unsigned int));
+
+/* Disassemble one instruction from insn to disassemble.
+ Return the size of the instruction. */
+int disassemble_insn PARAMS ((unsigned long));
+
+#endif
diff --git a/include/opcode/ppc.h b/include/opcode/ppc.h
index d23e1c6..dc3983e 100644
--- a/include/opcode/ppc.h
+++ b/include/opcode/ppc.h
@@ -1,5 +1,5 @@
/* ppc.h -- Header file for PowerPC opcode table
- Copyright 1994, 1995, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1999, 2000, 2001 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support
This file is part of GDB, GAS, and the GNU binutils.
@@ -89,7 +89,16 @@ extern const int powerpc_num_opcodes;
#define PPC_OPCODE_64_BRIDGE (0400)
/* Opcode is supported by Altivec Vector Unit */
-#define PPC_OPCODE_ALTIVEC (01000)
+#define PPC_OPCODE_ALTIVEC (01000)
+
+/* Opcode is supported by PowerPC 403 processor. */
+#define PPC_OPCODE_403 (02000)
+
+/* Opcode is supported by PowerPC BookE processor. */
+#define PPC_OPCODE_BOOKE (04000)
+
+/* Opcode is only supported by 64-bit PowerPC BookE processor. */
+#define PPC_OPCODE_BOOKE64 (010000)
/* A macro to extract the major opcode from an instruction. */
#define PPC_OP(i) (((i) >> 26) & 0x3f)
@@ -121,6 +130,7 @@ struct powerpc_operand
operand value is legal, *ERRMSG will be unchanged (most operands
can accept any value). */
unsigned long (*insert) PARAMS ((unsigned long instruction, long op,
+ int dialect,
const char **errmsg));
/* Extraction function. This is used by the disassembler. To
@@ -140,7 +150,8 @@ struct powerpc_operand
non-zero if this operand type can not actually be extracted from
this operand (i.e., the instruction does not match). If the
operand is valid, *INVALID will not be changed. */
- long (*extract) PARAMS ((unsigned long instruction, int *invalid));
+ long (*extract) PARAMS ((unsigned long instruction, int dialect,
+ int *invalid));
/* One bit syntax flags. */
unsigned long flags;
@@ -229,6 +240,8 @@ extern const struct powerpc_operand powerpc_operands[];
prints these with a leading 'v'. */
#define PPC_OPERAND_VR (010000)
+/* This operand is for the DS field in a DS form instruction. */
+#define PPC_OPERAND_DS (020000)
/* The POWER and PowerPC assemblers use a few macros. We keep them
with the operands table for simplicity. The macro table is an
diff --git a/include/opcode/tic54x.h b/include/opcode/tic54x.h
index 09ee8c9..ae65722 100644
--- a/include/opcode/tic54x.h
+++ b/include/opcode/tic54x.h
@@ -19,8 +19,8 @@ along with this file; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
-#ifndef _TIC54X_H_
-#define _TIC54X_H_
+#ifndef _opcode_tic54x_h_
+#define _opcode_tic54x_h_
typedef struct _symbol
{
@@ -86,7 +86,6 @@ typedef struct _template
{
/* The opcode mnemonic */
const char *name;
-
unsigned int words; /* insn size in words */
int minops, maxops; /* min/max operand count */
/* The significant bits in the opcode. Other bits are zero.
@@ -141,27 +140,24 @@ typedef struct _template
#define FL_NR 0x100 /* no repeat allowed */
#define FL_SMR 0x200 /* Smem read (for flagging write-only *+ARx */
- unsigned short opcode2, mask2; /* some insns have an extended opcode */
+#define FL_PAR 0x400 /* Parallel instruction. */
-} template;
+ unsigned short opcode2, mask2; /* some insns have an extended opcode */
-typedef struct _partemplate {
- char *name;
- char *parname;
- unsigned int words; /* length in words */
- int minops, maxops; /* min/max operand count for 2nd part of insn */
- unsigned short opcode;
- unsigned short mask;
- enum optype operand_types[MAX_OPERANDS];
+ const char* parname;
enum optype paroperand_types[MAX_OPERANDS];
-} partemplate;
+
+} template;
extern const template tic54x_unknown_opcode;
extern const template tic54x_optab[];
-extern const partemplate tic54x_paroptab[];
+extern const template tic54x_paroptab[];
extern const symbol mmregs[], regs[];
extern const symbol condition_codes[], cc2_codes[], status_bits[];
extern const symbol cc3_codes[];
extern const char *misc_symbols[];
+struct disassemble_info;
+extern const template* tic54x_get_insn (struct disassemble_info *,
+ bfd_vma, unsigned short, int *);
-#endif /* TIC54X_H */
+#endif /* _opcode_tic54x_h_ */
diff --git a/include/opcode/v850.h b/include/opcode/v850.h
index 737faf8..2183bc8 100644
--- a/include/opcode/v850.h
+++ b/include/opcode/v850.h
@@ -1,5 +1,5 @@
/* v850.h -- Header file for NEC V850 opcode table
- Copyright 1996, 1997 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 2001 Free Software Foundation, Inc.
Written by J.T. Conklin, Cygnus Support
This file is part of GDB, GAS, and the GNU binutils.
@@ -153,7 +153,6 @@ extern const struct v850_operand v850_operands[];
/* The register specified must not be r0 */
#define V850_NOT_R0 0x80
-/* CYGNUS LOCAL v850e */
/* push/pop type instruction, V850E specific. */
#define V850E_PUSH_POP 0x100
diff --git a/include/partition.h b/include/partition.h
index 091655a..851422a 100644
--- a/include/partition.h
+++ b/include/partition.h
@@ -2,20 +2,20 @@
Copyright (C) 2000, 2001 Free Software Foundation, Inc.
Contributed by CodeSourcery, LLC.
- This file is part of GNU CC.
+ This file is part of GCC.
- GNU CC is free software; you can redistribute it and/or modify
+ GCC 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.
- GNU CC is distributed in the hope that it will be useful,
+ GCC 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 GNU CC; see the file COPYING. If not, write to
+ along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
diff --git a/include/safe-ctype.h b/include/safe-ctype.h
index ccacda5..b2ad849 100644
--- a/include/safe-ctype.h
+++ b/include/safe-ctype.h
@@ -63,7 +63,9 @@ enum {
_sch_isalnum = _sch_isalpha|_sch_isdigit, /* A-Za-z0-9 */
_sch_isidnum = _sch_isidst|_sch_isdigit, /* A-Za-z0-9_ */
_sch_isgraph = _sch_isalnum|_sch_ispunct, /* isprint and not space */
- _sch_iscppsp = _sch_isvsp|_sch_isnvsp /* isspace + \0 */
+ _sch_iscppsp = _sch_isvsp|_sch_isnvsp, /* isspace + \0 */
+ _sch_isbasic = _sch_isprint|_sch_iscppsp /* basic charset of ISO C
+ (plus ` and @) */
};
/* Character classification. */
@@ -86,6 +88,7 @@ extern const unsigned short _sch_istable[256];
#define ISIDNUM(c) _sch_test(c, _sch_isidnum)
#define ISIDST(c) _sch_test(c, _sch_isidst)
+#define IS_ISOBASIC(c) _sch_test(c, _sch_isbasic)
#define IS_VSPACE(c) _sch_test(c, _sch_isvsp)
#define IS_NVSPACE(c) _sch_test(c, _sch_isnvsp)
#define IS_SPACE_OR_NUL(c) _sch_test(c, _sch_iscppsp)
diff --git a/include/sort.h b/include/sort.h
index c8e1d55..b974059 100644
--- a/include/sort.h
+++ b/include/sort.h
@@ -2,20 +2,20 @@
Copyright (C) 2000 Free Software Foundation, Inc.
Contributed by Mark Mitchell <mark@codesourcery.com>.
-This file is part of GNU CC.
+This file is part of GCC.
-GNU CC is free software; you can redistribute it and/or modify it
+GCC 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.
-GNU CC is distributed in the hope that it will be useful, but
+GCC 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 GNU CC; see the file COPYING. If not, write to
+along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
diff --git a/include/splay-tree.h b/include/splay-tree.h
index 37e9a35..6903969 100644
--- a/include/splay-tree.h
+++ b/include/splay-tree.h
@@ -2,20 +2,20 @@
Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
Contributed by Mark Mitchell (mark@markmitchell.com).
-This file is part of GNU CC.
+This file is part of GCC.
-GNU CC is free software; you can redistribute it and/or modify it
+GCC 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.
-GNU CC is distributed in the hope that it will be useful, but
+GCC 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 GNU CC; see the file COPYING. If not, write to
+along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
diff --git a/include/xregex.h b/include/xregex.h
index 694fd16..645195b 100644
--- a/include/xregex.h
+++ b/include/xregex.h
@@ -19,6 +19,10 @@
# define re_syntax_options xre_syntax_options
# define re_max_failures xre_max_failures
+# define _REGEX_RE_COMP
+# define re_comp xre_comp
+# define re_exec xre_exec
+
#include "xregex2.h"
#endif /* xregex.h */