aboutsummaryrefslogtreecommitdiff
path: root/contrib/binutils/include
diff options
context:
space:
mode:
authorDavid E. O'Brien <obrien@FreeBSD.org>2002-01-27 12:00:11 +0000
committerDavid E. O'Brien <obrien@FreeBSD.org>2002-01-27 12:00:11 +0000
commitdbbf32dd39b128be2abe8393933bc942be4c0925 (patch)
tree5c493199a70976c54e1b9c6a7804a3de85b43e84 /contrib/binutils/include
parent855ee8c509184df8c31758b8f2ca9e9d31440489 (diff)
downloadsrc-dbbf32dd39b128be2abe8393933bc942be4c0925.tar.gz
src-dbbf32dd39b128be2abe8393933bc942be4c0925.zip
Enlist the FreeBSD-CURRENT users as testers of what is to become Binutils
version 2.12.0. These bits are taken from the FSF anoncvs repo on 27-January-2002 03:41 PST.
Notes
Notes: svn path=/vendor/binutils/dist/; revision=89857
Diffstat (limited to 'contrib/binutils/include')
-rw-r--r--contrib/binutils/include/ChangeLog274
-rw-r--r--contrib/binutils/include/ansidecl.h312
-rw-r--r--contrib/binutils/include/aout/ChangeLog24
-rw-r--r--contrib/binutils/include/aout/aout64.h75
-rw-r--r--contrib/binutils/include/aout/sun4.h20
-rw-r--r--contrib/binutils/include/bfdlink.h35
-rw-r--r--contrib/binutils/include/coff/ChangeLog110
-rw-r--r--contrib/binutils/include/coff/alpha.h16
-rw-r--r--contrib/binutils/include/coff/arm.h223
-rw-r--r--contrib/binutils/include/coff/external.h254
-rw-r--r--contrib/binutils/include/coff/i386.h195
-rw-r--r--contrib/binutils/include/coff/ia64.h162
-rw-r--r--contrib/binutils/include/coff/internal.h82
-rw-r--r--contrib/binutils/include/coff/powerpc.h175
-rw-r--r--contrib/binutils/include/coff/rs6000.h72
-rw-r--r--contrib/binutils/include/coff/rs6k64.h70
-rw-r--r--contrib/binutils/include/coff/sh.h209
-rw-r--r--contrib/binutils/include/coff/sparc.h85
-rw-r--r--contrib/binutils/include/coff/ti.h219
-rw-r--r--contrib/binutils/include/demangle.h45
-rw-r--r--contrib/binutils/include/dis-asm.h39
-rw-r--r--contrib/binutils/include/dyn-string.h8
-rw-r--r--contrib/binutils/include/elf/ChangeLog151
-rw-r--r--contrib/binutils/include/elf/alpha.h26
-rw-r--r--contrib/binutils/include/elf/arm.h51
-rw-r--r--contrib/binutils/include/elf/common.h46
-rw-r--r--contrib/binutils/include/elf/cris.h54
-rw-r--r--contrib/binutils/include/elf/dwarf2.h55
-rw-r--r--contrib/binutils/include/elf/external.h4
-rw-r--r--contrib/binutils/include/elf/h8.h96
-rw-r--r--contrib/binutils/include/elf/ia64.h22
-rw-r--r--contrib/binutils/include/elf/internal.h36
-rw-r--r--contrib/binutils/include/elf/mips.h2
-rw-r--r--contrib/binutils/include/elf/mmix.h151
-rw-r--r--contrib/binutils/include/elf/openrisc.h39
-rw-r--r--contrib/binutils/include/elf/ppc.h77
-rw-r--r--contrib/binutils/include/elf/s390.h73
-rw-r--r--contrib/binutils/include/elf/x86-64.h2
-rw-r--r--contrib/binutils/include/elf/xstormy16.h53
-rw-r--r--contrib/binutils/include/fibheap.h81
-rw-r--r--contrib/binutils/include/filenames.h4
-rw-r--r--contrib/binutils/include/floatformat.h10
-rw-r--r--contrib/binutils/include/hashtab.h3
-rw-r--r--contrib/binutils/include/libiberty.h84
-rw-r--r--contrib/binutils/include/objalloc.h11
-rw-r--r--contrib/binutils/include/opcode/ChangeLog275
-rw-r--r--contrib/binutils/include/opcode/alpha.h8
-rw-r--r--contrib/binutils/include/opcode/arc.h6
-rw-r--r--contrib/binutils/include/opcode/cgen.h57
-rw-r--r--contrib/binutils/include/opcode/i386.h9
-rw-r--r--contrib/binutils/include/opcode/ppc.h19
-rw-r--r--contrib/binutils/include/partition.h8
-rw-r--r--contrib/binutils/include/safe-ctype.h7
-rw-r--r--contrib/binutils/include/sort.h8
-rw-r--r--contrib/binutils/include/splay-tree.h12
-rw-r--r--contrib/binutils/include/ternary.h51
-rw-r--r--contrib/binutils/include/xregex.h28
-rw-r--r--contrib/binutils/include/xregex2.h565
58 files changed, 3311 insertions, 1577 deletions
diff --git a/contrib/binutils/include/ChangeLog b/contrib/binutils/include/ChangeLog
index ad96520e28f6..0ec6eb82c61b 100644
--- a/contrib/binutils/include/ChangeLog
+++ b/contrib/binutils/include/ChangeLog
@@ -1,17 +1,277 @@
-2001-07-19 David O'Brien <obrien@FreeBSD.org>
+2002-01-15 Richard Earnshaw <rearnsha@arm.com>
- * libiberty.h: Add lbasename.
+ * coff/arm.h (F_VFP_FLOAT): Define.
+ * elf/arm.h (F_VFP_FLOAT, EF_ARM_VFP_FLOAT): Define.
+
+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>
+
+ * elf/common.h (PT_GNU_EH_FRAME): Define.
+ * 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>
+
+ * include/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>
+
+ * libiberty.h (reconcat): New function.
+
+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-09-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * 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>
-2001-06-07 Alan Modra <amodra@bigpond.net.au>
+ * 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.
- * Many files: Update copyright notices.
+2001-08-18 Zack Weinberg <zackw@panix.com>
-2001-05-28 Philip Blundell <philb@gnu.org>
+ * 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-06-13 Andrew Cagney <ac131313@redhat.com>
+
+ * libiberty.h (lbasename): Change function declaration to return a
+ const char pointer.
+
+2001-08-10 Richard Sandiford <rsandifo@redhat.com>
+
+ * opcode/mips.h (INSN_GP32): Remove.
+ (OPCODE_IS_MEMBER): Remove gp32 parameter.
+ (M_MOVE): New macro identifier.
+
+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-08-01 Aldy Hernandez <aldyh@redhat.com>
+
+ * opcode/mips.h (INSN_ISA_MASK): Nuke bits 12-15.
+
+2001-07-18 Andreas Jaeger <aj@suse.de>
+
+ * xregex2.h: Place under LGPL version 2.1.
+
+2001-07-12 Jeff Johnston <jjohnstn@redhat.com>
+
+ * opcode/cgen.h (CGEN_INSN): Add regex support.
+ (build_insn_regex): Declare.
+
+2001-07-10 Jeff Johnston <jjohnstn@redhat.com>
+
+ * xregex.h: New file to support libiberty regex.
+ * xregex2.h: Ditto.
+
+2001-06-15 Hans-Peter Nilsson <hp@axis.com>
+
+ * bfdlink.h (struct bfd_link_info): New member export_dynamic.
+
+2001-05-16 Matt Kraai <kraai@alumni.carnegiemellon.edu>
+
+ * partition.h: Fix misspelling of `implementation'.
+
+2001-05-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * ansidecl.h (NULL_PTR): Delete.
+
+2001-05-11 Jakub Jelinek <jakub@redhat.com>
- From 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.
+ * ternary.h: Use PARAMS for all prototypes. Use PTR, not void *.
+ Make arguments constant where possible.
+
+2001-05-07 Mark Mitchell <mark@codesourcery.com>
+
+ * splay-tree.h (splay_tree_max): New function.
+ (splay_tree_min): Likewise.
+
+2001-04-27 Johan Rydberg <jrydberg@opencores.org>
+
+ * dis-asm.h (print_insn_openrisc): Add prototype.
+
+2001-04-15 Daniel Berlin <dan@cgsoftware.com>
+
+ * ternary.h: New file - Ternary search tree header.
+
+2001-04-13 Jakub Jelinek <jakub@redhat.com>
+
+ * bfdlink.h (bfd_link_discard): Add discard_sec_merge.
+
+2001-04-03 Zack Weinberg <zackw@stanford.edu>
+
+ * ansidecl.h: All logic from gcc/gansidecl.h moved here.
+
+2001-03-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * libiberty.h (alloca): Handle setting C_ALLOCA.
+
+2001-03-20 Jim Blandy <jimb@redhat.com>
+
+ * demangle.h (enum gnu_v3_constructor_kinds,
+ is_gnu_v3_mangled_ctor, enum gnu_v3_destructor_kinds,
+ is_gnu_v3_mangled_dtor): New declarations.
+
+2001-03-14 Nick Clifton <nickc@redhat.com>
+
+ * ansidecl.h: Fix copyright dates.
+ * demangle.h: Fix copyright dates.
+ * floatformat.h: Fix copyright dates.
+ * fnmatch.h: Fix copyright dates.
+ * getopt.h: Fix copyright dates.
+ * libiberty.h: Add FSF copyright notice.
+ * md5.h: Fix copyright dates.
+ * obstack.h: Fix copyright dates.
+ * splay-tree.h: Fix copyright dates.
+
+2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
+ John David Anglin <dave@hiauly1.hia.nrc.ca>
+
+ * libiberty.h: Add lbasename.
+
+2001-03-06 Zack Weinberg <zackw@stanford.edu>
+
+ * libiberty.h: Prototype C_alloca; define alloca to either
+ __builtin_alloca or C_alloca as appropriate.
+
+2001-03-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
+
+ * safe-ctype.h (_sch_test): Cast enum bit to unsigned short int for pcc
+ compatibility.
+
+2001-02-18 lars brinkhoff <lars@nocrew.org>
+
+ * dis-asm.h: Add PDP-11 target.
+
+2001-02-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
+
+ * dis-asm.h: Add linux target for S/390.
+
2001-01-11 Peter Targett <peter.targett@arccores.com>
* dis-asm.h (arc_get_disassembler): Correct declaration.
@@ -1806,7 +2066,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/contrib/binutils/include/ansidecl.h b/contrib/binutils/include/ansidecl.h
index 545a62103a95..9a7c5777ff2e 100644
--- a/contrib/binutils/include/ansidecl.h
+++ b/contrib/binutils/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,165 +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. */
@@ -230,4 +281,15 @@ So instead we use the macro below and test it against specific values. */
#define __extension__
#endif
+/* 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)
+# ifndef HAVE_LONG_DOUBLE
+# define HAVE_LONG_DOUBLE 1
+# endif
+#endif /* GCC >= 2.7 */
+
#endif /* ansidecl.h */
diff --git a/contrib/binutils/include/aout/ChangeLog b/contrib/binutils/include/aout/ChangeLog
index e75a12fa7204..d215c592f78b 100644
--- a/contrib/binutils/include/aout/ChangeLog
+++ b/contrib/binutils/include/aout/ChangeLog
@@ -1,6 +1,10 @@
-2001-06-07 Alan Modra <amodra@bigpond.net.au>
+2001-09-18 Alan Modra <amodra@bigpond.net.au>
- * Many files: Update copyright notices.
+ * 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>
@@ -41,6 +45,10 @@ Wed Jul 12 00:15:13 1995 Ken Raeburn <raeburn@kr-pc.cygnus.com>
* sun4.h (PAGE_SIZE): Undefine before defining.
+Sun Sep 04 17:58:10 1994 Richard Earnshaw (rwe@pegasus.esprit.ec.org)
+
+ * aout64.h: Only define QMAGIC if it isn't already defined.
+
Thu Jun 16 14:22:55 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
* aout64.h (BMAGIC): Define.
@@ -175,20 +183,20 @@ Thu Jun 11 01:12:07 1992 John Gilmore (gnu at cygnus.com)
Thu Jan 30 18:12:44 1992 John Gilmore (gnu at cygnus.com)
- * aout/aout64.h: N_TXTSIZE needs some more parentheses.
+ * aout64.h: N_TXTSIZE needs some more parentheses.
I don't trust C precedence.
Wed Dec 18 14:32:01 1991 Per Bothner (bothner at cygnus.com)
- * aout/aout64.h: Move common sunos-specific test
+ * aout64.h: Move common sunos-specific test
to recognize shared libraries into new macro N_SHARED_LIB.
- Use it to simplify&reformat N_TXTADDR, N_TXTOFF, N_TXTSIZE.
+ Use it to simplify & reformat N_TXTADDR, N_TXTOFF, N_TXTSIZE.
Sat Nov 30 20:34:52 1991 Steve Chamberlain (sac at rtl.cygnus.com)
- * ChangeLog, aout64.h, ar.h, encap.h, host.h, hp.h, ranlib.h,
- reloc.h, stab.def, stab_gnu.h, sun4.h: All moved from the
- devo/include directory
+ * aout64.h, ar.h, encap.h, host.h, hp.h, ranlib.h, reloc.h,
+ stab.def, stab_gnu.h, sun4.h: All moved from the devo/include
+ directory.
Local Variables:
diff --git a/contrib/binutils/include/aout/aout64.h b/contrib/binutils/include/aout/aout64.h
index a8a8cd1b3b04..bc96d2a77673 100644
--- a/contrib/binutils/include/aout/aout64.h
+++ b/contrib/binutils/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/contrib/binutils/include/aout/sun4.h b/contrib/binutils/include/aout/sun4.h
index f42a0dd45988..623afc13131f 100644
--- a/contrib/binutils/include/aout/sun4.h
+++ b/contrib/binutils/include/aout/sun4.h
@@ -1,8 +1,24 @@
-/* SPARC-specific values for a.out files */
+/* SPARC-specific values for a.out files
+
+ Copyright 2001 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
+ 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. */
/* Some systems, e.g., AIX, may have defined this in header files already
included. */
-#undef TARGET_PAGE_SIZE
+#undef TARGET_PAGE_SIZE
#define TARGET_PAGE_SIZE 0x2000 /* 8K. aka NBPG in <sys/param.h> */
/* Note that some SPARCs have 4K pages, some 8K, some others. */
diff --git a/contrib/binutils/include/bfdlink.h b/contrib/binutils/include/bfdlink.h
index 29eeb6617981..c02a1e820466 100644
--- a/contrib/binutils/include/bfdlink.h
+++ b/contrib/binutils/include/bfdlink.h
@@ -35,10 +35,21 @@ enum bfd_link_strip
if strip_all is used. */
enum bfd_link_discard
{
+ discard_sec_merge, /* Discard local temporary symbols in SEC_MERGE
+ sections. */
discard_none, /* Don't discard any locals. */
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. */
@@ -144,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
@@ -189,6 +202,9 @@ struct bfd_link_info
boolean shared;
/* true if BFD should pre-bind symbols in a shared object. */
boolean symbolic;
+ /* true if BFD should export all symbols in the dynamic symbol table
+ of an executable, rather than only those used. */
+ boolean export_dynamic;
/* true if shared objects should be linked directly, not shared. */
boolean static_link;
/* true if the output file should be in a traditional format. This
@@ -269,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/contrib/binutils/include/coff/ChangeLog b/contrib/binutils/include/coff/ChangeLog
index efde1bf90402..b8882bc39f20 100644
--- a/contrib/binutils/include/coff/ChangeLog
+++ b/contrib/binutils/include/coff/ChangeLog
@@ -1,17 +1,109 @@
-2001-06-11 Alan Modra <amodra@bigpond.net.au>
+2001-12-24 Tom Rix <trix@redhat.com>
- Merge from mainline.
- 2001-02-09 David Mosberger <davidm@hpl.hp.com>
- * pe.h (PEPAOUTSZ): Rename from PEP64AOUTSZ.
- Rename from PEPAOUTHDR.
+ * 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.
+
+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-06-07 Alan Modra <amodra@bigpond.net.au>
+2001-09-18 Alan Modra <amodra@bigpond.net.au>
- * Many files: Update copyright notices.
+ * 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.
+ * rs6k64.h : move xcoff64 external structures from xcofflink.
+ * internal.h : promote 32 bit structure elements to 64 bit
+ for xcoff64 support
+ * xcoff.h : New file.
+
+2001-03-23 Nick Clifton <nickc@redhat.com>
+
+ * a29k.h: Fix compile time warning.
+ * external.h: Fix compile time warning.
+ * m88k.h: Fix compile time warning.
+
+2001-03-13 Nick Clifton <nickc@redhat.com>
+
+ * external.h: New file. Common structure definitions found in
+ other COFF header files.
+
+ * a29k.h: Use external.h.
+ * apollo.h: Use external.h.
+ * arm.h: Use external.h.
+ * h8300.h: Use external.h.
+ * h8500.h: Use external.h.
+ * i386.h: Use external.h.
+ * i860.h: Use external.h.
+ * ia64.h: Use external.h.
+ * m68k.h: Use external.h.
+ * m88k.h: Use external.h.
+ * mcore.h: Use external.h.
+ * mips.h: Use external.h.
+ * mipspe.h: Use external.h.
+ * powerpc.h: Use external.h.
+ * rs6000.h: Use external.h.
+ * rs6k64.h: Use external.h.
+ * sh.h: Use external.h.
+ * sparc.h: Use external.h.
+ * tic30.h: Use external.h.
+ * tic80.h: Use external.h.
+ * w65.h: Use external.h.
+ * we32k.h: Use external.h.
+ * z8k.h: Use external.h.
+
+2001-02-09 David Mosberger <davidm@hpl.hp.com>
+
+ * pe.h (PEPAOUTSZ): Rename from PEP64AOUTSZ.
+ Rename from PEPAOUTHDR.
-2001-02-17 Philip Blundell <philb@gnu.org>
+2001-01-23 H.J. Lu <hjl@gnu.org>
- From 2001-01-23 H.J. Lu <hjl@gnu.org>
* pe.h (struct external_PEI_DOS_hdr): New.
(struct external_PEI_IMAGE_hdr): New.
diff --git a/contrib/binutils/include/coff/alpha.h b/contrib/binutils/include/coff/alpha.h
index 6cd915d41ca6..e5210a569970 100644
--- a/contrib/binutils/include/coff/alpha.h
+++ b/contrib/binutils/include/coff/alpha.h
@@ -19,7 +19,8 @@
/********************** FILE HEADER **********************/
-struct external_filehdr {
+struct external_filehdr
+{
unsigned char f_magic[2]; /* magic number */
unsigned char f_nscns[2]; /* number of sections */
unsigned char f_timdat[4]; /* time & date stamp */
@@ -44,7 +45,6 @@ struct external_filehdr {
/********************** AOUT "OPTIONAL HEADER" **********************/
-
typedef struct external_aouthdr
{
unsigned char magic[2]; /* type of file */
@@ -70,7 +70,8 @@ typedef struct external_aouthdr
/********************** SECTION HEADER **********************/
-struct external_scnhdr {
+struct external_scnhdr
+{
unsigned char s_name[8]; /* section name */
unsigned char s_paddr[8]; /* physical address, aliased s_nlib */
unsigned char s_vaddr[8]; /* virtual address */
@@ -88,7 +89,8 @@ struct external_scnhdr {
/********************** RELOCATION DIRECTIVES **********************/
-struct external_reloc {
+struct external_reloc
+{
unsigned char r_vaddr[8];
unsigned char r_symndx[4];
unsigned char r_bits[4];
@@ -166,7 +168,8 @@ struct external_reloc {
/* File header as a set of bytes */
-struct hdr_ext {
+struct hdr_ext
+{
unsigned char h_magic[2];
unsigned char h_vstamp[2];
unsigned char h_ilineMax[4];
@@ -196,7 +199,8 @@ struct hdr_ext {
/* File descriptor external record */
-struct fdr_ext {
+struct fdr_ext
+{
unsigned char f_adr[8];
unsigned char f_cbLineOffset[8];
unsigned char f_cbLine[8];
diff --git a/contrib/binutils/include/coff/arm.h b/contrib/binutils/include/coff/arm.h
index a0d8883aaf91..bcfdcbe4784d 100644
--- a/contrib/binutils/include/coff/arm.h
+++ b/contrib/binutils/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.
@@ -19,33 +19,23 @@
#define COFFARM 1
-/********************** FILE HEADER **********************/
-
-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 L_LNNO_SIZE 2
+#define INCLUDE_COMDAT_FIELDS_IN_AUXENT
+#include "coff/external.h"
/* Bits for f_flags:
- * F_RELFLG relocation info stripped from file
- * F_EXEC file is executable (no unresolved external references)
- * F_LNNO line numbers stripped from file
- * F_LSYMS local symbols stripped from file
- * F_INTERWORK file supports switching between ARM and Thumb instruction sets
- * F_INTERWORK_SET the F_INTERWORK bit is valid
- * F_APCS_FLOAT code passes float arguments in float registers
- * F_PIC code is reentrant/position-independent
- * F_AR32WR file has byte ordering of an AR32WR machine (e.g. vax)
- * F_APCS_26 file uses 26 bit ARM Procedure Calling Standard
- * F_APCS_SET the F_APCS_26, F_APCS_FLOAT and F_PIC bits have been initialised
- * F_SOFT_FLOAT code does not use floating point instructions
- */
+ F_RELFLG relocation info stripped from file
+ F_EXEC file is executable (no unresolved external references)
+ F_LNNO line numbers stripped from file
+ F_LSYMS local symbols stripped from file
+ F_INTERWORK file supports switching between ARM and Thumb instruction sets
+ F_INTERWORK_SET the F_INTERWORK bit is valid
+ F_APCS_FLOAT code passes float arguments in float registers
+ F_PIC code is reentrant/position-independent
+ F_AR32WR file has byte ordering of an AR32WR machine (e.g. vax)
+ F_APCS_26 file uses 26 bit ARM Procedure Calling Standard
+ F_APCS_SET the F_APCS_26, F_APCS_FLOAT and F_PIC bits have been initialised
+ F_SOFT_FLOAT code does not use floating point instructions. */
#define F_RELFLG (0x0001)
#define F_EXEC (0x0002)
@@ -60,6 +50,7 @@ struct external_filehdr
#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 */
@@ -77,13 +68,12 @@ struct external_filehdr
#define F_ARM_5 (0x4c00)
/*
- * ARMMAGIC ought to encoded the procesor type,
- * but it is too late to change it now, instead
- * the flags field of the internal_f structure
- * is used as shown above.
- *
- * XXX - NC 5/6/97
- */
+ ARMMAGIC ought to encoded the procesor type,
+ but it is too late to change it now, instead
+ the flags field of the internal_f structure
+ is used as shown above.
+
+ XXX - NC 5/6/97. */
#define ARMMAGIC 0xa00 /* I just made this up */
@@ -95,36 +85,11 @@ struct external_filehdr
#undef ARMBADMAG
#define ARMBADMAG(x) (((x).f_magic != ARMMAGIC) && ((x).f_magic != ARMPEMAGIC) && ((x).f_magic != THUMBPEMAGIC))
-#define FILHDR struct external_filehdr
-#define FILHSZ 20
-
-
-/********************** AOUT "OPTIONAL HEADER" **********************/
-
-
-typedef struct
-{
- 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
-
#define OMAGIC 0404 /* object files, eg as output */
#define ZMAGIC 0413 /* demand load format, eg normal ld output */
#define STMAGIC 0401 /* target shlib */
#define SHMAGIC 0443 /* host shlib */
-
/* define some NT default values */
/* #define NT_IMAGE_BASE 0x400000 moved to internal.h */
#define NT_SECTION_ALIGNMENT 0x1000
@@ -132,151 +97,9 @@ AOUTHDR;
#define NT_DEF_RESERVE 0x100000
#define NT_DEF_COMMIT 0x1000
-/********************** SECTION HEADER **********************/
-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 _COMMENT ".comment"
-#define _LIB ".lib"
-
/* We use the .rdata section to hold read only data. */
#define _LIT ".rdata"
-/********************** LINE NUMBERS **********************/
-
-/* 1 line number entry for every "breakpointable" source line in a section.
- * Line numbers are grouped on a per function basis; first entry in a function
- * grouping will have l_lnno = 0 and in place of physical address will be the
- * symbol table index of the function name.
- */
-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
-
-
-/********************** SYMBOLS **********************/
-
-#define E_SYMNMLEN 8 /* # characters in a symbol name */
-#define E_FILNMLEN 14 /* # characters in a file name */
-#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
-
-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 N_BTMASK (0xf)
-#define N_TMASK (0x30)
-#define N_BTSHFT (4)
-#define N_TSHIFT (2)
-
-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 */
- char x_checksum[4]; /* section COMDAT checksum */
- char x_associated[2]; /* COMDAT associated section index */
- char x_comdat[1]; /* COMDAT selection number */
- } 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 SYMENT struct external_syment
-#define SYMESZ 18
-#define AUXENT union external_auxent
-#define AUXESZ 18
-
-#define _ETEXT "etext"
-
/********************** RELOCATION DIRECTIVES **********************/
#ifdef ARM_WINCE
struct external_reloc
diff --git a/contrib/binutils/include/coff/external.h b/contrib/binutils/include/coff/external.h
new file mode 100644
index 000000000000..19636dab7d76
--- /dev/null
+++ b/contrib/binutils/include/coff/external.h
@@ -0,0 +1,254 @@
+/* external.h -- External COFF structures
+
+ Copyright 2001 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
+ 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 COFF_EXTERNAL_H
+#define COFF_EXTERNAL_H
+
+#ifndef DO_NOT_DEFINE_FILHDR
+/********************** FILE HEADER **********************/
+
+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
+#endif
+
+#ifndef DO_NOT_DEFINE_AOUTHDR
+/********************** AOUT "OPTIONAL 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 AOUTHDRSZ 28
+#define AOUTSZ 28
+#endif
+
+#ifndef DO_NOT_DEFINE_SCNHDR
+/********************** SECTION HEADER **********************/
+
+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 _COMMENT ".comment"
+#define _LIB ".lib"
+#endif /* not DO_NOT_DEFINE_SCNHDR */
+
+#ifndef DO_NOT_DEFINE_LINENO
+
+/********************** LINE NUMBERS **********************/
+
+#ifndef L_LNNO_SIZE
+#error L_LNNO_SIZE needs to be defined
+#endif
+
+/* 1 line number entry for every "breakpointable" source line in a section.
+ Line numbers are grouped on a per function basis; first entry in a function
+ grouping will have l_lnno = 0 and in place of physical address will be the
+ symbol table index of the function name. */
+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[L_LNNO_SIZE]; /* line number */
+};
+
+#define LINENO struct external_lineno
+#define LINESZ (4 + L_LNNO_SIZE)
+
+#if L_LNNO_SIZE == 4
+#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) 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 */
+
+#ifndef DO_NOT_DEFINE_SYMENT
+/********************** SYMBOLS **********************/
+
+#define E_SYMNMLEN 8 /* # characters in a symbol name */
+#ifndef E_FILNMLEN
+#define E_FILNMLEN 14
+#endif
+#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
+
+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
+
+#ifndef N_BTMASK
+#define N_BTMASK 0xf
+#endif
+
+#ifndef N_TMASK
+#define N_TMASK 0x30
+#endif
+
+#ifndef N_BTSHFT
+#define N_BTSHFT 4
+#endif
+
+#ifndef N_TSHIFT
+#define N_TSHIFT 2
+#endif
+
+#endif /* not DO_NOT_DEFINE_SYMENT */
+
+#ifndef DO_NOT_DEFINE_AUXENT
+
+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 */
+#ifdef INCLUDE_COMDAT_FIELDS_IN_AUXENT
+ char x_checksum[4]; /* section COMDAT checksum */
+ char x_associated[2]; /* COMDAT associated section index */
+ char x_comdat[1]; /* COMDAT selection number */
+#endif
+ } 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
+
+#define _ETEXT "etext"
+
+#endif /* not DO_NOT_DEFINE_AUXENT */
+
+#endif /* COFF_EXTERNAL_H */
diff --git a/contrib/binutils/include/coff/i386.h b/contrib/binutils/include/coff/i386.h
index 407245f3e9d3..484a3b1e9be8 100644
--- a/contrib/binutils/include/coff/i386.h
+++ b/contrib/binutils/include/coff/i386.h
@@ -16,34 +16,22 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-/********************** FILE HEADER **********************/
-
-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 L_LNNO_SIZE 2
+#define INCLUDE_COMDAT_FIELDS_IN_AUXENT
+#include "coff/external.h"
/* Bits for f_flags:
- * F_RELFLG relocation info stripped from file
- * F_EXEC file is executable (no unresolved external references)
- * F_LNNO line numbers stripped from file
- * F_LSYMS local symbols stripped from file
- * F_AR32WR file has byte ordering of an AR32WR machine (e.g. vax)
- */
+ F_RELFLG relocation info stripped from file
+ F_EXEC file is executable (no unresolved external references)
+ F_LNNO line numbers stripped from file
+ F_LSYMS local symbols stripped from file
+ F_AR32WR file has byte ordering of an AR32WR machine (e.g. vax). */
#define F_RELFLG (0x0001)
#define F_EXEC (0x0002)
#define F_LNNO (0x0004)
#define F_LSYMS (0x0008)
-
-
#define I386MAGIC 0x14c
#define I386PTXMAGIC 0x154
#define I386AIXMAGIC 0x175
@@ -52,43 +40,16 @@ struct external_filehdr {
#define LYNXCOFFMAGIC 0415
-#define I386BADMAG(x) (((x).f_magic != I386MAGIC) \
+#define I386BADMAG(x) ( ((x).f_magic != I386MAGIC) \
&& (x).f_magic != I386AIXMAGIC \
&& (x).f_magic != I386PTXMAGIC \
&& (x).f_magic != LYNXCOFFMAGIC)
-#define FILHDR struct external_filehdr
-#define FILHSZ 20
-
-
-/********************** AOUT "OPTIONAL HEADER" **********************/
-
-
-typedef struct
-{
- 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
-
#define OMAGIC 0404 /* object files, eg as output */
#define ZMAGIC 0413 /* demand load format, eg normal ld output */
#define STMAGIC 0401 /* target shlib */
#define SHMAGIC 0443 /* host shlib */
-
/* define some NT default values */
/* #define NT_IMAGE_BASE 0x400000 moved to internal.h */
#define NT_SECTION_ALIGNMENT 0x1000
@@ -96,149 +57,15 @@ AOUTHDR;
#define NT_DEF_RESERVE 0x100000
#define NT_DEF_COMMIT 0x1000
-/********************** SECTION HEADER **********************/
-
-
-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 _COMMENT ".comment"
-#define _LIB ".lib"
-
-/********************** LINE NUMBERS **********************/
-
-/* 1 line number entry for every "breakpointable" source line in a section.
- * Line numbers are grouped on a per function basis; first entry in a function
- * grouping will have l_lnno = 0 and in place of physical address will be the
- * symbol table index of the function name.
- */
-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
-
-
-/********************** SYMBOLS **********************/
-
-#define E_SYMNMLEN 8 /* # characters in a symbol name */
-#define E_FILNMLEN 14 /* # characters in a file name */
-#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
-
-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 N_BTMASK (0xf)
-#define N_TMASK (0x30)
-#define N_BTSHFT (4)
-#define N_TSHIFT (2)
-
-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 */
- char x_checksum[4]; /* section COMDAT checksum */
- char x_associated[2]; /* COMDAT associated section index */
- char x_comdat[1]; /* COMDAT selection number */
- } 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 SYMENT struct external_syment
-#define SYMESZ 18
-#define AUXENT union external_auxent
-#define AUXESZ 18
-
-
-# define _ETEXT "etext"
-
-
/********************** RELOCATION DIRECTIVES **********************/
-
-
-struct external_reloc {
+struct external_reloc
+{
char r_vaddr[4];
char r_symndx[4];
char r_type[2];
};
-
#define RELOC struct external_reloc
#define RELSZ 10
diff --git a/contrib/binutils/include/coff/ia64.h b/contrib/binutils/include/coff/ia64.h
index 496a8779b4fe..f7ff0ee22f09 100644
--- a/contrib/binutils/include/coff/ia64.h
+++ b/contrib/binutils/include/coff/ia64.h
@@ -16,18 +16,10 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-/********************** FILE HEADER **********************/
-
-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 DO_NOT_DEFINE_AOUTHDR
+#define L_LNNO_SIZE 2
+#define INCLUDE_COMDAT_FIELDS_IN_AUXENT
+#include "coff/external.h"
#define IA64MAGIC 0x200
@@ -46,14 +38,7 @@ struct external_filehdr {
#define F_LNNO (0x0004)
#define F_LSYMS (0x0008)
-
-#define FILHDR struct external_filehdr
-#define FILHSZ 20
-
-
/********************** AOUT "OPTIONAL HEADER" **********************/
-
-
typedef struct
{
char magic[2]; /* type of file */
@@ -82,7 +67,6 @@ AOUTHDR;
#define STMAGIC 0401 /* target shlib */
#define SHMAGIC 0443 /* host shlib */
-
/* define some NT default values */
/* #define NT_IMAGE_BASE 0x400000 moved to internal.h */
#define NT_SECTION_ALIGNMENT 0x1000
@@ -90,149 +74,15 @@ AOUTHDR;
#define NT_DEF_RESERVE 0x100000
#define NT_DEF_COMMIT 0x1000
-/********************** SECTION HEADER **********************/
-
-
-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 _COMMENT ".comment"
-#define _LIB ".lib"
-
-/********************** LINE NUMBERS **********************/
-
-/* 1 line number entry for every "breakpointable" source line in a section.
- * Line numbers are grouped on a per function basis; first entry in a function
- * grouping will have l_lnno = 0 and in place of physical address will be the
- * symbol table index of the function name.
- */
-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
-
-
-/********************** SYMBOLS **********************/
-
-#define E_SYMNMLEN 8 /* # characters in a symbol name */
-#define E_FILNMLEN 14 /* # characters in a file name */
-#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
-
-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 N_BTMASK (0xf)
-#define N_TMASK (0x30)
-#define N_BTSHFT (4)
-#define N_TSHIFT (2)
-
-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 */
- char x_checksum[4]; /* section COMDAT checksum */
- char x_associated[2]; /* COMDAT associated section index */
- char x_comdat[1]; /* COMDAT selection number */
- } 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 SYMENT struct external_syment
-#define SYMESZ 18
-#define AUXENT union external_auxent
-#define AUXESZ 18
-
-
-# define _ETEXT "etext"
-
-
/********************** RELOCATION DIRECTIVES **********************/
-
-
-struct external_reloc {
+struct external_reloc
+{
char r_vaddr[4];
char r_symndx[4];
char r_type[2];
};
-
#define RELOC struct external_reloc
#define RELSZ 10
diff --git a/contrib/binutils/include/coff/internal.h b/contrib/binutils/include/coff/internal.h
index 38ca30958430..4babbd4de5f9 100644
--- a/contrib/binutils/include/coff/internal.h
+++ b/contrib/binutils/include/coff/internal.h
@@ -61,7 +61,7 @@ struct internal_filehdr
{
struct internal_extra_pe_filehdr pe;
- /* standard coff internal info */
+ /* Standard coff internal info. */
unsigned short f_magic; /* magic number */
unsigned short f_nscns; /* number of sections */
long f_timdat; /* time & date stamp */
@@ -74,17 +74,16 @@ struct internal_filehdr
/* Bits for f_flags:
- * F_RELFLG relocation info stripped from file
- * F_EXEC file is executable (no unresolved external references)
- * F_LNNO line numbers stripped from file
- * F_LSYMS local symbols stripped from file
- * F_AR16WR file is 16-bit little-endian
- * F_AR32WR file is 32-bit little-endian
- * F_AR32W file is 32-bit big-endian
- * F_DYNLOAD rs/6000 aix: dynamically loadable w/imports & exports
- * F_SHROBJ rs/6000 aix: file is a shared object
- * F_DLL PE format DLL
- */
+ F_RELFLG relocation info stripped from file
+ F_EXEC file is executable (no unresolved external references)
+ F_LNNO line numbers stripped from file
+ F_LSYMS local symbols stripped from file
+ F_AR16WR file is 16-bit little-endian
+ F_AR32WR file is 32-bit little-endian
+ F_AR32W file is 32-bit big-endian
+ F_DYNLOAD rs/6000 aix: dynamically loadable w/imports & exports
+ F_SHROBJ rs/6000 aix: file is a shared object
+ F_DLL PE format DLL. */
#define F_RELFLG (0x0001)
#define F_EXEC (0x0002)
@@ -97,7 +96,7 @@ struct internal_filehdr
#define F_SHROBJ (0x2000)
#define F_DLL (0x2000)
-/* extra structure which is used in the optional header */
+/* Extra structure which is used in the optional header. */
typedef struct _IMAGE_DATA_DIRECTORY
{
bfd_vma VirtualAddress;
@@ -174,7 +173,7 @@ struct internal_aouthdr
unsigned long tagentries; /* number of tag entries to follow */
/* RS/6000 stuff */
- unsigned long o_toc; /* address of TOC */
+ bfd_vma o_toc; /* address of TOC */
short o_snentry; /* section number for entry point */
short o_sntext; /* section number for text */
short o_sndata; /* section number for data */
@@ -185,8 +184,8 @@ struct internal_aouthdr
short o_algndata; /* max alignment for data */
short o_modtype; /* Module type field, 1R,RE,RO */
short o_cputype; /* Encoded CPU type */
- unsigned long o_maxstack; /* max stack size allowed. */
- unsigned long o_maxdata; /* max data size allowed. */
+ bfd_vma o_maxstack; /* max stack size allowed. */
+ bfd_vma o_maxdata; /* max data size allowed. */
/* ECOFF stuff */
bfd_vma bss_start; /* Base of bss section. */
@@ -200,9 +199,7 @@ struct internal_aouthdr
long o_sri; /* Static Resource Information */
long vid[2]; /* Version id */
-
struct internal_extra_pe_aouthdr pe;
-
};
/********************** STORAGE CLASSES **********************/
@@ -322,9 +319,7 @@ struct internal_scnhdr
unsigned char s_page; /* TI COFF load page */
};
-/*
- * s_flags "type"
- */
+/* s_flags "type". */
#define STYP_REG (0x0000) /* "regular": allocated, relocated, loaded */
#define STYP_DSECT (0x0001) /* "dummy": relocated only*/
#define STYP_NOLOAD (0x0002) /* "noload": allocated, relocated, not loaded */
@@ -343,29 +338,27 @@ struct internal_scnhdr
#define STYP_OVER (0x0400) /* overlay: relocated not allocated or loaded */
#define STYP_LIB (0x0800) /* for .lib: same as INFO */
#define STYP_MERGE (0x2000) /* merge section -- combines with text, data or bss sections only */
-#define STYP_REVERSE_PAD (0x4000) /* section will be padded with no-op instructions wherever padding is necessary and there is a
-
- word of contiguous bytes
- beginning on a word boundary. */
+#define STYP_REVERSE_PAD (0x4000) /* section will be padded with no-op instructions
+ wherever padding is necessary and there is a
+ word of contiguous bytes beginning on a word
+ boundary. */
#define STYP_LIT 0x8020 /* Literal data (like STYP_TEXT) */
-
/********************** LINE NUMBERS **********************/
/* 1 line number entry for every "breakpointable" source line in a section.
- * Line numbers are grouped on a per function basis; first entry in a function
- * grouping will have l_lnno = 0 and in place of physical address will be the
- * symbol table index of the function name.
- */
+ Line numbers are grouped on a per function basis; first entry in a function
+ grouping will have l_lnno = 0 and in place of physical address will be the
+ symbol table index of the function name. */
struct internal_lineno
{
union
{
- long l_symndx; /* function name symbol index, iff l_lnno == 0*/
- long l_paddr; /* (physical) address of line number */
+ bfd_signed_vma l_symndx; /* function name symbol index, iff l_lnno == 0*/
+ bfd_signed_vma l_paddr; /* (physical) address of line number */
} l_addr;
unsigned long l_lnno; /* line number */
};
@@ -388,7 +381,7 @@ struct internal_syment
} _n_n;
char *_n_nptr[2]; /* allows for overlaying */
} _n;
- long n_value; /* value of symbol */
+ bfd_vma n_value; /* value of symbol */
short n_scnum; /* section number */
unsigned short n_flags; /* copy of flags from filhdr */
unsigned short n_type; /* type and derived type */
@@ -400,9 +393,8 @@ struct internal_syment
#define n_zeroes _n._n_n._n_zeroes
#define n_offset _n._n_n._n_offset
-
/* Relocatable symbols have number of the section in which they are defined,
- or one of the following: */
+ or one of the following: */
#define N_UNDEF ((short)0) /* undefined symbol */
#define N_ABS ((short)-1) /* value of symbol is absolute */
@@ -410,9 +402,8 @@ struct internal_syment
#define N_TV ((short)-3) /* indicates symbol needs preload transfer vector */
#define P_TV ((short)-4) /* indicates symbol needs postload transfer vector*/
-/*
- * Type of a symbol, in low N bits of the word
- */
+/* Type of a symbol, in low N bits of the word. */
+
#define T_NULL 0
#define T_VOID 1 /* function argument (only used by compiler) */
#define T_CHAR 2 /* character */
@@ -431,9 +422,8 @@ struct internal_syment
#define T_ULONG 15 /* unsigned long */
#define T_LNGDBL 16 /* long double */
-/*
- * derived types, in n_type
-*/
+/* Derived types, in n_type. */
+
#define DT_NON (0) /* no derived type */
#define DT_PTR (1) /* pointer */
#define DT_FCN (2) /* function */
@@ -478,7 +468,7 @@ union internal_auxent
{
struct
{ /* if ISFCN, tag, or .bb */
- long x_lnnoptr; /* ptr to fcn line # */
+ bfd_signed_vma x_lnnoptr; /* ptr to fcn line # */
union
{ /* entry ndx past block end */
long l;
@@ -529,7 +519,7 @@ union internal_auxent
{
union
{ /* csect length or enclosing csect */
- long l;
+ bfd_signed_vma l;
struct coff_ptr_struct *p;
} x_scnlen;
long x_parmhash; /* parm type hash index */
@@ -649,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
/* ??? */
@@ -661,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
@@ -689,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/contrib/binutils/include/coff/powerpc.h b/contrib/binutils/include/coff/powerpc.h
index 5af9b72ec693..1d4d6fb0572c 100644
--- a/contrib/binutils/include/coff/powerpc.h
+++ b/contrib/binutils/include/coff/powerpc.h
@@ -18,29 +18,16 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Initial release: Kim Knuttila (krk@cygnus.com) */
-
-/********************** FILE HEADER **********************/
-
-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
+#define L_LNNO_SIZE 2
+#define INCLUDE_COMDAT_FIELDS_IN_AUXENT
+#include "coff/external.h"
/* Bits for f_flags:
- * F_RELFLG relocation info stripped from file
- * F_EXEC file is executable (no unresolved external references)
- * F_LNNO line numbers stripped from file
- * F_LSYMS local symbols stripped from file
- * F_AR32WR file has byte ordering of an AR32WR machine (e.g. vax)
- */
+ F_RELFLG relocation info stripped from file
+ F_EXEC file is executable (no unresolved external references)
+ F_LNNO line numbers stripped from file
+ F_LSYMS local symbols stripped from file
+ F_AR32WR file has byte ordering of an AR32WR machine (e.g. vax). */
#define F_RELFLG (0x0001)
#define F_EXEC (0x0002)
@@ -57,152 +44,10 @@ struct external_filehdr {
#define PPCBADMAG(x) ((x).f_magic != PPCMAGIC)
-/********************** AOUT "OPTIONAL HEADER" **********************/
-
-typedef struct
-{
- 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
-
-/********************** SECTION HEADER **********************/
-
-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 _COMMENT ".comment"
-#define _LIB ".lib"
-
-/********************** LINE NUMBERS **********************/
-
-/* 1 line number entry for every "breakpointable" source line in a section.
- * Line numbers are grouped on a per function basis; first entry in a function
- * grouping will have l_lnno = 0 and in place of physical address will be the
- * symbol table index of the function name.
- */
-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
-
-/********************** SYMBOLS **********************/
-
-#define E_SYMNMLEN 8 /* # characters in a symbol name */
-
-/* Allow the file name length to be overridden in the including file */
-#ifndef E_FILNMLEN
-#define E_FILNMLEN 14
-#endif
-
-#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
-
-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
-
-#define N_BTMASK (0xf)
-#define N_TMASK (0x30)
-#define N_BTSHFT (4)
-#define N_TSHIFT (2)
-
-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 */
- char x_checksum[4]; /* section COMDAT checksum */
- char x_associated[2]; /* COMDAT associated section index */
- char x_comdat[1]; /* COMDAT selection number */
- } x_scn;
-};
-
-#define AUXENT union external_auxent
-#define AUXESZ 18
-
-#define _ETEXT "etext"
-
/********************** RELOCATION DIRECTIVES **********************/
-struct external_reloc {
+struct external_reloc
+{
char r_vaddr[4];
char r_symndx[4];
char r_type[2];
diff --git a/contrib/binutils/include/coff/rs6000.h b/contrib/binutils/include/coff/rs6000.h
index 0def1d95d15a..0c34861142a3 100644
--- a/contrib/binutils/include/coff/rs6000.h
+++ b/contrib/binutils/include/coff/rs6000.h
@@ -66,11 +66,6 @@ AOUTHDR;
#define SMALL_AOUTSZ (28)
#define AOUTHDRSZ 72
-#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 */
-
-
/********************** SECTION HEADER **********************/
@@ -87,28 +82,9 @@ struct external_scnhdr {
char s_flags[4]; /* flags */
};
-/*
- * names of "special" sections
- */
-#define _TEXT ".text"
-#define _DATA ".data"
-#define _BSS ".bss"
-#define _PAD ".pad"
-#define _LOADER ".loader"
-
#define SCNHDR struct external_scnhdr
#define SCNHSZ 40
-/* XCOFF uses a special .loader section with type STYP_LOADER. */
-#define STYP_LOADER 0x1000
-
-/* XCOFF uses a special .debug section with type STYP_DEBUG. */
-#define STYP_DEBUG 0x2000
-
-/* XCOFF handles line number or relocation overflow by creating
- another section header with STYP_OVRFLO set. */
-#define STYP_OVRFLO 0x8000
-
/********************** LINE NUMBERS **********************/
/* 1 line number entry for every "breakpointable" source line in a section.
@@ -241,3 +217,51 @@ struct external_reloc {
#define DEFAULT_TEXT_SECTION_ALIGNMENT 4
/* For new sections we havn't heard of before */
#define DEFAULT_SECTION_ALIGNMENT 4
+
+/* The ldhdr structure. This appears at the start of the .loader
+ section. */
+
+struct external_ldhdr
+{
+ bfd_byte l_version[4];
+ bfd_byte l_nsyms[4];
+ bfd_byte l_nreloc[4];
+ bfd_byte l_istlen[4];
+ bfd_byte l_nimpid[4];
+ bfd_byte l_impoff[4];
+ bfd_byte l_stlen[4];
+ bfd_byte l_stoff[4];
+};
+
+#define LDHDRSZ (8 * 4)
+
+struct external_ldsym
+{
+ union
+ {
+ bfd_byte _l_name[SYMNMLEN];
+ struct
+ {
+ bfd_byte _l_zeroes[4];
+ bfd_byte _l_offset[4];
+ } _l_l;
+ } _l;
+ bfd_byte l_value[4];
+ bfd_byte l_scnum[2];
+ bfd_byte l_smtype[1];
+ bfd_byte l_smclas[1];
+ bfd_byte l_ifile[4];
+ bfd_byte l_parm[4];
+};
+
+#define LDSYMSZ (8 + 3 * 4 + 2 + 2)
+
+struct external_ldrel
+{
+ bfd_byte l_vaddr[4];
+ bfd_byte l_symndx[4];
+ bfd_byte l_rtype[2];
+ bfd_byte l_rsecnm[2];
+};
+
+#define LDRELSZ (2 * 4 + 2 * 2)
diff --git a/contrib/binutils/include/coff/rs6k64.h b/contrib/binutils/include/coff/rs6k64.h
index ed1098e6d301..c9dd29f5c1f1 100644
--- a/contrib/binutils/include/coff/rs6k64.h
+++ b/contrib/binutils/include/coff/rs6k64.h
@@ -72,11 +72,6 @@ AOUTHDR;
#define SMALL_AOUTSZ (0)
#define AOUTHDRSZ 72
-#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 */
-
-
/********************** SECTION HEADER **********************/
@@ -94,29 +89,11 @@ struct external_scnhdr {
char s_pad[4]; /* padding */
};
-/*
- * names of "special" sections
- */
-#define _TEXT ".text"
-#define _DATA ".data"
-#define _BSS ".bss"
-#define _PAD ".pad"
-#define _LOADER ".loader"
#define SCNHDR struct external_scnhdr
#define SCNHSZ 72
-/* XCOFF uses a special .loader section with type STYP_LOADER. */
-#define STYP_LOADER 0x1000
-
-/* XCOFF uses a special .debug section with type STYP_DEBUG. */
-#define STYP_DEBUG 0x2000
-
-/* XCOFF handles line number or relocation overflow by creating
- another section header with STYP_OVRFLO set. */
-#define STYP_OVRFLO 0x8000
-
/********************** LINE NUMBERS **********************/
/* 1 line number entry for every "breakpointable" source line in a section.
@@ -126,7 +103,7 @@ struct external_scnhdr {
*/
struct external_lineno {
union {
- char l_symndx[8];/* function name symbol index, iff l_lnno == 0*/
+ char l_symndx[4];/* function name symbol index, iff l_lnno == 0*/
char l_paddr[8]; /* (physical) address of line number */
} l_addr;
char l_lnno[4]; /* line number */
@@ -146,9 +123,7 @@ struct external_lineno {
struct external_syment
{
- union {
- char e_value[8];
- } e;
+ char e_value[8];
char e_offset[4];
char e_scnum[2];
char e_type[2];
@@ -249,3 +224,44 @@ struct external_reloc {
#define DEFAULT_TEXT_SECTION_ALIGNMENT 4
/* For new sections we havn't heard of before */
#define DEFAULT_SECTION_ALIGNMENT 4
+
+/* The ldhdr structure. This appears at the start of the .loader
+ section. */
+
+struct external_ldhdr
+{
+ bfd_byte l_version[4];
+ bfd_byte l_nsyms[4];
+ bfd_byte l_nreloc[4];
+ bfd_byte l_istlen[4];
+ bfd_byte l_nimpid[4];
+ bfd_byte l_stlen[4];
+ bfd_byte l_impoff[8];
+ bfd_byte l_stoff[8];
+ bfd_byte l_symoff[8];
+ bfd_byte l_rldoff[8];
+};
+#define LDHDRSZ (56)
+
+struct external_ldsym
+{
+ bfd_byte l_value[8];
+ bfd_byte l_offset[4];
+ bfd_byte l_scnum[2];
+ bfd_byte l_smtype[1];
+ bfd_byte l_smclas[1];
+ bfd_byte l_ifile[4];
+ bfd_byte l_parm[4];
+};
+
+#define LDSYMSZ (24)
+
+struct external_ldrel
+{
+ bfd_byte l_vaddr[8];
+ bfd_byte l_rtype[2];
+ bfd_byte l_rsecnm[2];
+ bfd_byte l_symndx[4];
+};
+
+#define LDRELSZ (16)
diff --git a/contrib/binutils/include/coff/sh.h b/contrib/binutils/include/coff/sh.h
index 7ae32fc14990..c77316e40029 100644
--- a/contrib/binutils/include/coff/sh.h
+++ b/contrib/binutils/include/coff/sh.h
@@ -16,56 +16,23 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-/********************** FILE HEADER **********************/
-
-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 */
-};
-
-
+#ifdef COFF_WITH_PE
+#define L_LNNO_SIZE 2
+#else
+#define L_LNNO_SIZE 4
+#endif
+#define INCLUDE_COMDAT_FIELDS_IN_AUXENT
+#include "coff/external.h"
#define SH_ARCH_MAGIC_BIG 0x0500
#define SH_ARCH_MAGIC_LITTLE 0x0550 /* Little endian SH */
#define SH_ARCH_MAGIC_WINCE 0x01a2 /* Windows CE - little endian */
#define SH_PE_MAGIC 0x010b
-
#define SHBADMAG(x) \
- (((x).f_magic!=SH_ARCH_MAGIC_BIG) && \
- ((x).f_magic!=SH_ARCH_MAGIC_WINCE) && \
- ((x).f_magic!=SH_ARCH_MAGIC_LITTLE))
-
-#define FILHDR struct external_filehdr
-#define FILHSZ 20
-
-
-/********************** AOUT "OPTIONAL HEADER" **********************/
-
-
-typedef struct
-{
- 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 AOUTHDRSZ 28
-#define AOUTSZ 28
-
-
+ (((x).f_magic != SH_ARCH_MAGIC_BIG) && \
+ ((x).f_magic != SH_ARCH_MAGIC_WINCE) && \
+ ((x).f_magic != SH_ARCH_MAGIC_LITTLE))
/* Define some NT default values. */
/* #define NT_IMAGE_BASE 0x400000 moved to internal.h */
@@ -74,161 +41,15 @@ AOUTHDR;
#define NT_DEF_RESERVE 0x100000
#define NT_DEF_COMMIT 0x1000
-/********************** SECTION HEADER **********************/
-
-
-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 */
-};
-
-/*
- * names of "special" sections
- */
-#define _TEXT ".text"
-#define _DATA ".data"
-#define _BSS ".bss"
-
-
-#define SCNHDR struct external_scnhdr
-#define SCNHSZ 40
-
-
-/********************** LINE NUMBERS **********************/
-
-/* 1 line number entry for every "breakpointable" source line in a section.
- * Line numbers are grouped on a per function basis; first entry in a function
- * grouping will have l_lnno = 0 and in place of physical address will be the
- * symbol table index of the function name.
- */
-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;
-#ifdef COFF_WITH_PE
- char l_lnno[2]; /* line number */
-#else
- char l_lnno[4]; /* line number */
-#endif
-};
-
-#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 LINENO struct external_lineno
-#ifdef COFF_WITH_PE
-#define LINESZ 6
-#undef GET_LINENO_LNNO
-#define GET_LINENO_LNNO(abfd, ext) bfd_h_get_16(abfd, (bfd_byte *) (ext->l_lnno));
-#undef PUT_LINENO_LNNO
-#define PUT_LINENO_LNNO(abfd,val, ext) bfd_h_put_16(abfd,val, (bfd_byte *) (ext->l_lnno));
-#else
-#define LINESZ 8
-#endif
-
-
-/********************** SYMBOLS **********************/
-
-#define E_SYMNMLEN 8 /* # characters in a symbol name */
-#define E_FILNMLEN 14 /* # characters in a file name */
-#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
-
-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 N_BTMASK (017)
-#define N_TMASK (060)
-#define N_BTSHFT (4)
-#define N_TSHIFT (2)
-
-
-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 */
- char x_checksum[4]; /* section COMDAT checksum */
- char x_associated[2]; /* COMDAT associated section index */
- char x_comdat[1]; /* COMDAT selection number */
- } 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 SYMENT struct external_syment
-#define SYMESZ 18
-#define AUXENT union external_auxent
-#define AUXESZ 18
-
-
-
/********************** RELOCATION DIRECTIVES **********************/
/* The external reloc has an offset field, because some of the reloc
types on the h8 don't have room in the instruction for the entire
- offset - eg the strange jump and high page addressing modes */
+ offset - eg the strange jump and high page addressing modes. */
#ifndef COFF_WITH_PE
-struct external_reloc {
+struct external_reloc
+{
char r_vaddr[4];
char r_symndx[4];
char r_offset[4];
@@ -236,14 +57,14 @@ struct external_reloc {
char r_stuff[2];
};
#else
-struct external_reloc {
+struct external_reloc
+{
char r_vaddr[4];
char r_symndx[4];
char r_type[2];
};
#endif
-
#define RELOC struct external_reloc
#ifdef COFF_WITH_PE
#define RELSZ 10
diff --git a/contrib/binutils/include/coff/sparc.h b/contrib/binutils/include/coff/sparc.h
index c7102bae6a74..ac524d6c2038 100644
--- a/contrib/binutils/include/coff/sparc.h
+++ b/contrib/binutils/include/coff/sparc.h
@@ -22,18 +22,10 @@
(presumed) equivalent size. This is necessary so that this file can
be used with different systems while still yielding the same results. */
-/********************** FILE HEADER **********************/
-
-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 L_LNNO_SIZE 2
+#define DO_NOT_DEFINE_SYMENT
+#define DO_NOT_DEFINE_AUXENT
+#include "coff/external.h"
#define F_RELFLG (0x0001) /* relocation info stripped */
#define F_EXEC (0x0002) /* file is executable */
@@ -46,80 +38,16 @@ struct external_filehdr
#define LYNXCOFFMAGIC (0415)
-#define FILHDR struct external_filehdr
-#define FILHSZ 20
-
-/********************** AOUT "OPTIONAL HEADER" **********************/
-
-typedef struct
-{
- 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
-
#define OMAGIC 0404 /* object files, eg as output */
#define ZMAGIC 0413 /* demand load format, eg normal ld output */
#define STMAGIC 0401 /* target shlib */
#define SHMAGIC 0443 /* host shlib */
-/********************** SECTION HEADER **********************/
-
-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. */
+/* More names of "special" sections. */
-#define _TEXT ".text"
-#define _DATA ".data"
-#define _BSS ".bss"
#define _TV ".tv"
#define _INIT ".init"
#define _FINI ".fini"
-#define _COMMENT ".comment"
-#define _LIB ".lib"
-
-/********************** LINE NUMBERS **********************/
-
-/* 1 line number entry for every "breakpointable" source line in a section.
- Line numbers are grouped on a per function basis; first entry in a function
- grouping will have l_lnno = 0 and in place of physical address will be the
- symbol table index of the function name. */
-
-struct external_lineno
-{
- union {
- char l_symndx[4]; /* fn 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)
/********************** SYMBOLS **********************/
@@ -213,7 +141,8 @@ union external_auxent
/********************** RELOCATION DIRECTIVES **********************/
-struct external_reloc {
+struct external_reloc
+{
char r_vaddr[4];
char r_symndx[4];
char r_type[2];
diff --git a/contrib/binutils/include/coff/ti.h b/contrib/binutils/include/coff/ti.h
index 8fa35e3756b4..d98fc89bd1f3 100644
--- a/contrib/binutils/include/coff/ti.h
+++ b/contrib/binutils/include/coff/ti.h
@@ -17,22 +17,24 @@
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 COFF_TI_H
#define COFF_TI_H
+/* Note "coff/external.h is not used because TI adds extra fields to the structures. */
+
/********************** FILE HEADER **********************/
-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 */
- char f_target_id[2]; /* magic no. (TI COFF-specific) */
-};
+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 */
+ char f_target_id[2]; /* magic no. (TI COFF-specific) */
+ };
/* COFF0 has magic number in f_magic, and omits f_target_id from the file
header; for later versions, f_magic is 0xC1 for COFF1 and 0xC2 for COFF2
@@ -89,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
@@ -198,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
@@ -384,51 +377,71 @@ 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 **********************/
-struct external_reloc_v0 {
+struct external_reloc_v0
+{
char r_vaddr[4];
char r_symndx[2];
char r_reserved[2];
char r_type[2];
};
-struct external_reloc {
+struct external_reloc
+{
char r_vaddr[4];
char r_symndx[4];
char r_reserved[2]; /* extended pmad byte for COFF2 */
diff --git a/contrib/binutils/include/demangle.h b/contrib/binutils/include/demangle.h
index 2b5a9f54621e..a898218f4b84 100644
--- a/contrib/binutils/include/demangle.h
+++ b/contrib/binutils/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
@@ -54,6 +54,7 @@
extern enum demangling_styles
{
+ no_demangling = -1,
unknown_demangling = 0,
auto_demangling = DMGL_AUTO,
gnu_demangling = DMGL_GNU,
@@ -68,6 +69,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 +96,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 *
@@ -121,8 +123,39 @@ cplus_demangle_set_style PARAMS ((enum demangling_styles style));
extern enum demangling_styles
cplus_demangle_name_to_style PARAMS ((const char *name));
-/* V3 ABI demangling entry point, defined in cp-demangle.c. */
+/* V3 ABI demangling entry points, defined in cp-demangle.c. */
extern char*
cplus_demangle_v3 PARAMS ((const char* mangled));
+extern char*
+java_demangle_v3 PARAMS ((const char* mangled));
+
+
+enum gnu_v3_ctor_kinds {
+ gnu_v3_complete_object_ctor = 1,
+ gnu_v3_base_object_ctor,
+ gnu_v3_complete_object_allocating_ctor
+};
+
+/* Return non-zero iff NAME is the mangled form of a constructor name
+ in the G++ V3 ABI demangling style. Specifically, return an `enum
+ gnu_v3_ctor_kinds' value indicating what kind of constructor
+ it is. */
+extern enum gnu_v3_ctor_kinds
+ is_gnu_v3_mangled_ctor PARAMS ((const char *name));
+
+
+enum gnu_v3_dtor_kinds {
+ gnu_v3_deleting_dtor = 1,
+ gnu_v3_complete_object_dtor,
+ gnu_v3_base_object_dtor
+};
+
+/* Return non-zero iff NAME is the mangled form of a destructor name
+ in the G++ V3 ABI demangling style. Specifically, return an `enum
+ gnu_v3_dtor_kinds' value, indicating what kind of destructor
+ it is. */
+extern enum gnu_v3_dtor_kinds
+ is_gnu_v3_mangled_dtor PARAMS ((const char *name));
+
#endif /* DEMANGLE_H */
diff --git a/contrib/binutils/include/dis-asm.h b/contrib/binutils/include/dis-asm.h
index c2e7ae3b5de4..4e16ed345340 100644
--- a/contrib/binutils/include/dis-asm.h
+++ b/contrib/binutils/include/dis-asm.h
@@ -145,8 +145,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 +171,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,38 +192,44 @@ 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_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_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 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 *));
@@ -294,6 +300,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/contrib/binutils/include/dyn-string.h b/contrib/binutils/include/dyn-string.h
index 67f7ab7d36e4..315f63fabc8f 100644
--- a/contrib/binutils/include/dyn-string.h
+++ b/contrib/binutils/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/contrib/binutils/include/elf/ChangeLog b/contrib/binutils/include/elf/ChangeLog
index d346b9d5b5b1..a0b4f714a611 100644
--- a/contrib/binutils/include/elf/ChangeLog
+++ b/contrib/binutils/include/elf/ChangeLog
@@ -1,15 +1,125 @@
+2002-01-16 Alan Modra <amodra@bigpond.net.au>
+
+ * ppc.h (DT_PPC64_GLINK): 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-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.
+
+Tue Aug 26 23:32:34 2001 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,
+ including all new DWARF 2.1 extensions.
+
2001-06-29 James Cownie <jcownie@etnus.com>
* dwarf2.h: Add DWARF 2.1 attribues.
-2001-06-11 Alan Modra <amodra@bigpond.net.au>
+2001-06-15 Per Bothner <per@bothner.com>
+
+ * dwarf2.h: Partial merge with gcc version.
+ (enum dwarf_descrim_list): Fix typo -> dwarf_discrim_list.
+ (DW_LANG_Java): Use value from dwarf 2.1 draft (also used in gcc).
+
+2001-05-15 Ralf Baechle <ralf@gnu.org>
- Merge from mainline.
- 2001-05-15 Ralf Baechle <ralf@gnu.org>
* 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-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+2001-05-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
* external.h: Fix typo.
* mips.h: Add/Extend many comments with reference to the MIPS ELF64
spec v. 2.4, available at e.g.
@@ -28,15 +138,40 @@
(ELF64_MIPS_R_TYPE): Likewise.
(OHW_R10KLDL): Define.
- 2001-04-24 Todd Fries <todd@fries.net>
+2001-04-24 Todd Fries <todd@fries.net>
+
* sparc.h: Fix typo.
- 2001-03-23 Nick Clifton <nickc@redhat.com>
+2001-04-20 Johan Rydberg <jrydberg@opencores.org>
+
+ * openrisc.h: New file.
+ * common.h (EM_OPENRISC): New constant.
+
+2001-04-23 Bo Thorsen <bo@suse.de>
+
+ * x86-64.h: Add vtable support.
+
+2001-03-23 Nick Clifton <nickc@redhat.com>
+
* mips.h: Remove extraneous whitespace.
-2001-06-07 Alan Modra <amodra@bigpond.net.au>
+2001-03-22 Hans-Peter Nilsson <hp@axis.com>
+
+ * cris.h: Add leading comment about PC-relative location.
+ (R_CRIS_COPY, R_CRIS_GLOB_DAT, R_CRIS_JUMP_SLOT, R_CRIS_RELATIVE,
+ R_CRIS_16_GOT, R_CRIS_32_GOT, R_CRIS_16_GOTPLT, R_CRIS_32_GOTPLT,
+ R_CRIS_32_GOTREL, R_CRIS_32_PLT_GOTREL, R_CRIS_32_PLT_PCREL):
+ New relocs.
+
+2001-02-27 Philip Blundell <pb@futuretv.com>
+
+ * arm.h: Add new definitions from ARM document SWS ESPC 0003 B-01.
+ (EF_PIC, et al.): Rename to EF_ARM_xx.
+
+2001-02-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
- * Many files: Update copyright notices.
+ * common.h: Add linux target for S/390.
+ * s390.h: New file.
2001-01-11 Peter Targett <peter.targett@arccores.com>
diff --git a/contrib/binutils/include/elf/alpha.h b/contrib/binutils/include/elf/alpha.h
index 8bf67bd3d0f1..ab429d480b8b 100644
--- a/contrib/binutils/include/elf/alpha.h
+++ b/contrib/binutils/include/elf/alpha.h
@@ -80,23 +80,15 @@ 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 */
diff --git a/contrib/binutils/include/elf/arm.h b/contrib/binutils/include/elf/arm.h
index 28e87a81948f..269a225dd028 100644
--- a/contrib/binutils/include/elf/arm.h
+++ b/contrib/binutils/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.
@@ -25,29 +25,34 @@
/* Processor specific flags for the ELF header e_flags field. */
#define EF_ARM_RELEXEC 0x01
#define EF_ARM_HASENTRY 0x02
-#define EF_INTERWORK 0x04
-#define EF_APCS_26 0x08
-#define EF_APCS_FLOAT 0x10
-#define EF_PIC 0x20
-#define EF_ALIGN8 0x40 /* 8-bit structure alignment is in use. */
-#define EF_NEW_ABI 0x80
-#define EF_OLD_ABI 0x100
-#define EF_SOFT_FLOAT 0x200
-
-/* Other constants defined in the ARM ELF spec. version A-08. */
+#define EF_ARM_INTERWORK 0x04
+#define EF_ARM_APCS_26 0x08
+#define EF_ARM_APCS_FLOAT 0x10
+#define EF_ARM_PIC 0x20
+#define EF_ARM_ALIGN8 0x40 /* 8-bit structure alignment is in use. */
+#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 */
+#define EF_ARM_DYNSYMSUSESEGIDX 0x08 /* NB conflicts with EF_APCS26 */
+#define EF_ARM_MAPSYMSFIRST 0x10 /* NB conflicts with EF_APCS_FLOAT */
#define EF_ARM_EABIMASK 0xFF000000
#define EF_ARM_EABI_VERSION(flags) ((flags) & EF_ARM_EABIMASK)
#define EF_ARM_EABI_UNKNOWN 0x00000000
#define EF_ARM_EABI_VER1 0x01000000
+#define EF_ARM_EABI_VER2 0x02000000
/* Local aliases for some flags to match names used by COFF port. */
-#define F_INTERWORK EF_INTERWORK
-#define F_APCS26 EF_APCS_26
-#define F_APCS_FLOAT EF_APCS_FLOAT
-#define F_PIC EF_PIC
-#define F_SOFT_FLOAT EF_SOFT_FLOAT
+#define F_INTERWORK EF_ARM_INTERWORK
+#define F_APCS26 EF_ARM_APCS_26
+#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. */
@@ -109,13 +114,21 @@ START_RELOC_NUMBERS (elf_arm_reloc_type)
FAKE_RELOC (LAST_INVALID_RELOC, 249)
#else /* not OLD_ARM_ABI */
FAKE_RELOC (FIRST_INVALID_RELOC1, 28)
- FAKE_RELOC (LAST_INVALID_RELOC1, 99)
+ FAKE_RELOC (LAST_INVALID_RELOC1, 31)
+ RELOC_NUMBER (R_ARM_ALU_PCREL7_0, 32)
+ RELOC_NUMBER (R_ARM_ALU_PCREL15_8, 33)
+ RELOC_NUMBER (R_ARM_ALU_PCREL23_15, 34)
+ RELOC_NUMBER (R_ARM_LDR_SBREL11_0, 35)
+ RELOC_NUMBER (R_ARM_ALU_SBREL19_12, 36)
+ RELOC_NUMBER (R_ARM_ALU_SBREL27_20, 37)
+ FAKE_RELOC (FIRST_INVALID_RELOC2, 38)
+ FAKE_RELOC (LAST_INVALID_RELOC2, 99)
RELOC_NUMBER (R_ARM_GNU_VTENTRY, 100)
RELOC_NUMBER (R_ARM_GNU_VTINHERIT, 101)
RELOC_NUMBER (R_ARM_THM_PC11, 102) /* Cygnus extension to abi: Thumb unconditional branch. */
RELOC_NUMBER (R_ARM_THM_PC9, 103) /* Cygnus extension to abi: Thumb conditional branch. */
- FAKE_RELOC (FIRST_INVALID_RELOC2, 104)
- FAKE_RELOC (LAST_INVALID_RELOC2, 248)
+ FAKE_RELOC (FIRST_INVALID_RELOC3, 104)
+ FAKE_RELOC (LAST_INVALID_RELOC3, 248)
RELOC_NUMBER (R_ARM_RXPC25, 249)
#endif /* not OLD_ARM_ABI */
RELOC_NUMBER (R_ARM_RSBREL32, 250)
diff --git a/contrib/binutils/include/elf/common.h b/contrib/binutils/include/elf/common.h
index 4c50b890c620..289d3f2add2f 100644
--- a/contrib/binutils/include/elf/common.h
+++ b/contrib/binutils/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
@@ -114,6 +114,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define EM_960 19 /* Intel 80960 */
#define EM_PPC 20 /* PowerPC */
#define EM_PPC64 21 /* 64-bit PowerPC */
+#define EM_S390 22 /* IBM S/390 */
#define EM_V800 36 /* NEC V800 series */
#define EM_FR20 37 /* Fujitsu FR20 */
@@ -161,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
@@ -174,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
@@ -186,15 +199,15 @@ 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
-
/* Cygnus M32R ELF backend. Written in the absence of an ABI. */
#define EM_CYGNUS_M32R 0x9041
/* Alpha backend magic number. Written in the absence of an ABI. */
#define EM_ALPHA 0x9026
+/* old S/390 backend magic number. Written in the absence of an ABI. */
+#define EM_S390_OLD 0xa390
+
/* D10V backend magic number. Written in the absence of an ABI. */
#define EM_CYGNUS_D10V 0x7650
@@ -214,7 +227,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_OLD 0x3426
+
+#define EM_XSTORMY16 0xad45
/* See the above comment before you add a new EM_* value here. */
@@ -237,6 +256,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 */
@@ -321,10 +342,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_
@@ -386,8 +415,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/contrib/binutils/include/elf/cris.h b/contrib/binutils/include/elf/cris.h
index 860537534b5f..3bd03e8aa812 100644
--- a/contrib/binutils/include/elf/cris.h
+++ b/contrib/binutils/include/elf/cris.h
@@ -30,6 +30,8 @@ START_RELOC_NUMBERS (elf_cris_reloc_type)
RELOC_NUMBER (R_CRIS_8, 1)
RELOC_NUMBER (R_CRIS_16, 2)
RELOC_NUMBER (R_CRIS_32, 3)
+
+ /* The "PC" position is the location right after the relocation. */
RELOC_NUMBER (R_CRIS_8_PCREL, 4)
RELOC_NUMBER (R_CRIS_16_PCREL, 5)
RELOC_NUMBER (R_CRIS_32_PCREL, 6)
@@ -37,6 +39,58 @@ START_RELOC_NUMBERS (elf_cris_reloc_type)
RELOC_NUMBER (R_CRIS_GNU_VTINHERIT, 7)
RELOC_NUMBER (R_CRIS_GNU_VTENTRY, 8)
+ /* Copy contents at dynlinking. Generated by the linker.
+ The BFD equivalent is BFD_RELOC_CRIS_COPY. */
+ RELOC_NUMBER (R_CRIS_COPY, 9)
+
+ /* Create GOT entry. Generated by the linker.
+ The BFD equivalent is BFD_RELOC_CRIS_GLOB_DAT. */
+ RELOC_NUMBER (R_CRIS_GLOB_DAT, 10)
+
+ /* Create PLT entry. Generated by the linker.
+ The BFD equivalent is BFD_RELOC_CRIS_JUMP_SLOT. */
+ RELOC_NUMBER (R_CRIS_JUMP_SLOT, 11)
+
+ /* Adjust by program base. Generated by the linker.
+ The BFD equivalent is BFD_RELOC_CRIS_RELATIVE. */
+ RELOC_NUMBER (R_CRIS_RELATIVE, 12)
+
+ /* A 16-bit offset to entry in GOT and request to create GOT entry for
+ that symbol.
+ The BFD equivalent is BFD_RELOC_CRIS_16_GOT. */
+ RELOC_NUMBER (R_CRIS_16_GOT, 13)
+
+ /* A 32-bit offset to entry in GOT and request to create GOT entry for
+ that symbol.
+ The BFD equivalent is BFD_RELOC_CRIS_32_GOT. */
+ RELOC_NUMBER (R_CRIS_32_GOT, 14)
+
+ /* A 16-bit offset to entry in PLT part of GOT and request to create PLT
+ entry for that symbol.
+ The BFD equivalent is BFD_RELOC_CRIS_16_GOTPLT. */
+ RELOC_NUMBER (R_CRIS_16_GOTPLT, 15)
+
+ /* A 32-bit offset to entry in PLT part of GOT and request to create PLT
+ entry for that symbol.
+ The BFD equivalent is BFD_RELOC_CRIS_32_GOTPLT. */
+ RELOC_NUMBER (R_CRIS_32_GOTPLT, 16)
+
+ /* A 32-bit offset from GOT to (local) symbol: no GOT entry should be
+ necessary.
+ The BFD equivalent is BFD_RELOC_CRIS_32_GOTREL. */
+ RELOC_NUMBER (R_CRIS_32_GOTREL, 17)
+
+ /* A 32-bit offset from GOT to entry for this symbol in PLT and request
+ to create PLT entry for symbol.
+ The BFD equivalent is BFD_RELOC_CRIS_32_GOTREL. */
+ RELOC_NUMBER (R_CRIS_32_PLT_GOTREL, 18)
+
+ /* A 32-bit offset from location after this relocation (addend specifies
+ offset) to entry for this symbol in PLT and request to create PLT
+ entry for symbol.
+ The BFD equivalent is BFD_RELOC_CRIS_32_PLT_PCREL. */
+ RELOC_NUMBER (R_CRIS_32_PLT_PCREL, 19)
+
/* No other relocs must be visible outside the assembler. */
END_RELOC_NUMBERS (R_CRIS_max)
diff --git a/contrib/binutils/include/elf/dwarf2.h b/contrib/binutils/include/elf/dwarf2.h
index edaa664a1c98..a99dca709e8b 100644
--- a/contrib/binutils/include/elf/dwarf2.h
+++ b/contrib/binutils/include/elf/dwarf2.h
@@ -32,7 +32,6 @@ 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 is shared between GCC and GDB, and should not contain
@@ -178,6 +177,15 @@ enum dwarf_tag
DW_TAG_variant_part = 0x33,
DW_TAG_variable = 0x34,
DW_TAG_volatile_type = 0x35,
+ /* DWARF 2.1. */
+ DW_TAG_dwarf_procedure = 0x36,
+ DW_TAG_restrict_type = 0x37,
+ DW_TAG_interface_type = 0x38,
+ DW_TAG_namespace = 0x39,
+ DW_TAG_imported_module = 0x3a,
+ DW_TAG_unspecified_type = 0x3b,
+ DW_TAG_partial_unit = 0x3c,
+ DW_TAG_imported_unit = 0x3d,
/* SGI/MIPS Extensions. */
DW_TAG_MIPS_loop = 0x4081,
/* GNU extensions. */
@@ -493,7 +501,9 @@ enum dwarf_type
DW_ATE_signed = 0x5,
DW_ATE_signed_char = 0x6,
DW_ATE_unsigned = 0x7,
- DW_ATE_unsigned_char = 0x8
+ DW_ATE_unsigned_char = 0x8,
+ /* DWARF 2.1. */
+ DW_ATE_imaginary_float = 0x9
};
#define DW_ATE_lo_user 0x80
@@ -559,8 +569,8 @@ enum dwarf_inline_attribute
DW_INL_declared_inlined = 3
};
-/* Descriminant lists. */
-enum dwarf_descrim_list
+/* Discriminant lists. */
+enum dwarf_discrim_list
{
DW_DSC_label = 0,
DW_DSC_range = 1
@@ -578,7 +588,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. */
@@ -651,7 +665,12 @@ enum dwarf_source_language
DW_LANG_Fortran90 = 0x0008,
DW_LANG_Pascal83 = 0x0009,
DW_LANG_Modula2 = 0x000a,
- DW_LANG_Java = 0x9af4,
+ DW_LANG_Java = 0x000b,
+ /* DWARF 2.1. */
+ DW_LANG_C99 = 0x000c,
+ DW_LANG_Ada95 = 0x000d,
+ DW_LANG_Fortran95 = 0x000e,
+ /* MIPS. */
DW_LANG_Mips_Assembler = 0x8001
};
@@ -668,4 +687,28 @@ enum dwarf_macinfo_record_type
DW_MACINFO_end_file = 4,
DW_MACINFO_vendor_ext = 255
};
+
+/* @@@ For use with GNU frame unwind information. */
+
+#define DW_EH_PE_absptr 0x00
+#define DW_EH_PE_omit 0xff
+
+#define DW_EH_PE_uleb128 0x01
+#define DW_EH_PE_udata2 0x02
+#define DW_EH_PE_udata4 0x03
+#define DW_EH_PE_udata8 0x04
+#define DW_EH_PE_sleb128 0x09
+#define DW_EH_PE_sdata2 0x0A
+#define DW_EH_PE_sdata4 0x0B
+#define DW_EH_PE_sdata8 0x0C
+#define DW_EH_PE_signed 0x08
+
+#define DW_EH_PE_pcrel 0x10
+#define DW_EH_PE_textrel 0x20
+#define DW_EH_PE_datarel 0x30
+#define DW_EH_PE_funcrel 0x40
+#define DW_EH_PE_aligned 0x50
+
+#define DW_EH_PE_indirect 0x80
+
#endif /* _ELF_DWARF2_H */
diff --git a/contrib/binutils/include/elf/external.h b/contrib/binutils/include/elf/external.h
index 38e6596de7d4..403ee622b5d1 100644
--- a/contrib/binutils/include/elf/external.h
+++ b/contrib/binutils/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/contrib/binutils/include/elf/h8.h b/contrib/binutils/include/elf/h8.h
new file mode 100644
index 000000000000..ac9db566a483
--- /dev/null
+++ b/contrib/binutils/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/contrib/binutils/include/elf/ia64.h b/contrib/binutils/include/elf/ia64.h
index edfc7c5b532e..5e632ed010e5 100644
--- a/contrib/binutils/include/elf/ia64.h
+++ b/contrib/binutils/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/contrib/binutils/include/elf/internal.h b/contrib/binutils/include/elf/internal.h
index eb79917f16c0..5d39d3ae7ce1 100644
--- a/contrib/binutils/include/elf/internal.h
+++ b/contrib/binutils/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/contrib/binutils/include/elf/mips.h b/contrib/binutils/include/elf/mips.h
index 6ad8d5b96b1e..3b6fe99eccf5 100644
--- a/contrib/binutils/include/elf/mips.h
+++ b/contrib/binutils/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/contrib/binutils/include/elf/mmix.h b/contrib/binutils/include/elf/mmix.h
new file mode 100644
index 000000000000..fa367e5a314a
--- /dev/null
+++ b/contrib/binutils/include/elf/mmix.h
@@ -0,0 +1,151 @@
+/* MMIX 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. */
+
+/* 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, equivalent of the expression. */
+ 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"
+
+/* 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
+
+#endif /* ELF_MMIX_H */
diff --git a/contrib/binutils/include/elf/openrisc.h b/contrib/binutils/include/elf/openrisc.h
new file mode 100644
index 000000000000..c60990624f9e
--- /dev/null
+++ b/contrib/binutils/include/elf/openrisc.h
@@ -0,0 +1,39 @@
+/* OpenRISC 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_OPENRISC_H
+#define _ELF_OPENRISC_H
+
+#include "elf/reloc-macros.h"
+
+/* Relocations. */
+START_RELOC_NUMBERS (elf_openrisc_reloc_type)
+ RELOC_NUMBER (R_OPENRISC_NONE, 0)
+ RELOC_NUMBER (R_OPENRISC_INSN_REL_26, 1)
+ RELOC_NUMBER (R_OPENRISC_INSN_ABS_26, 2)
+ RELOC_NUMBER (R_OPENRISC_LO_16_IN_INSN, 3)
+ RELOC_NUMBER (R_OPENRISC_HI_16_IN_INSN, 4)
+ RELOC_NUMBER (R_OPENRISC_8, 5)
+ RELOC_NUMBER (R_OPENRISC_16, 6)
+ RELOC_NUMBER (R_OPENRISC_32, 7)
+ RELOC_NUMBER (R_OPENRISC_GNU_VTINHERIT, 8)
+ RELOC_NUMBER (R_OPENRISC_GNU_VTENTRY, 9)
+END_RELOC_NUMBERS (R_OPENRISC_max)
+
+#endif /* _ELF_OPENRISC_H */
diff --git a/contrib/binutils/include/elf/ppc.h b/contrib/binutils/include/elf/ppc.h
index 426961e09087..8e4af62fb1ef 100644
--- a/contrib/binutils/include/elf/ppc.h
+++ b/contrib/binutils/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/contrib/binutils/include/elf/s390.h b/contrib/binutils/include/elf/s390.h
new file mode 100644
index 000000000000..8b67c967a9a2
--- /dev/null
+++ b/contrib/binutils/include/elf/s390.h
@@ -0,0 +1,73 @@
+/* 390 ELF support for BFD.
+ Copyright 2000, 2001 Free Software Foundation, Inc.
+ Contributed by Carl B. Pedersen and Martin Schwidefsky.
+
+ 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_390_H
+#define _ELF_390_H
+
+/* Processor specific flags for the ELF header e_flags field. */
+
+/* Symbol types. */
+
+#define STACK_REG 15 /* Global Stack reg */
+#define BACKL_REG 14 /* Global Backlink reg */
+#define BASE_REG 13 /* Global Base reg */
+#define GOT_REG 12 /* Holds addr of GOT */
+
+#include "elf/reloc-macros.h"
+
+/* Relocation types. */
+
+START_RELOC_NUMBERS (elf_s390_reloc_type)
+ RELOC_NUMBER (R_390_NONE, 0) /* No reloc. */
+ RELOC_NUMBER (R_390_8, 1) /* Direct 8 bit. */
+ RELOC_NUMBER (R_390_12, 2) /* Direct 12 bit. */
+ RELOC_NUMBER (R_390_16, 3) /* Direct 16 bit. */
+ RELOC_NUMBER (R_390_32, 4) /* Direct 32 bit. */
+ RELOC_NUMBER (R_390_PC32, 5) /* PC relative 32 bit. */
+ RELOC_NUMBER (R_390_GOT12, 6) /* 12 bit GOT offset. */
+ RELOC_NUMBER (R_390_GOT32, 7) /* 32 bit GOT offset. */
+ RELOC_NUMBER (R_390_PLT32, 8) /* 32 bit PC relative PLT address. */
+ RELOC_NUMBER (R_390_COPY, 9) /* Copy symbol at runtime. */
+ RELOC_NUMBER (R_390_GLOB_DAT, 10) /* Create GOT entry. */
+ RELOC_NUMBER (R_390_JMP_SLOT, 11) /* Create PLT entry. */
+ RELOC_NUMBER (R_390_RELATIVE, 12) /* Adjust by program base. */
+ RELOC_NUMBER (R_390_GOTOFF, 13) /* 32 bit offset to GOT. */
+ RELOC_NUMBER (R_390_GOTPC, 14) /* 32 bit PC relative offset to GOT. */
+ RELOC_NUMBER (R_390_GOT16, 15) /* 16 bit GOT offset. */
+ RELOC_NUMBER (R_390_PC16, 16) /* PC relative 16 bit. */
+ RELOC_NUMBER (R_390_PC16DBL, 17) /* PC relative 16 bit shifted by 1. */
+ RELOC_NUMBER (R_390_PLT16DBL, 18) /* 16 bit PC rel. PLT shifted by 1. */
+ RELOC_NUMBER (R_390_PC32DBL, 19) /* PC relative 32 bit shifted by 1. */
+ RELOC_NUMBER (R_390_PLT32DBL, 20) /* 32 bit PC rel. PLT shifted by 1. */
+ RELOC_NUMBER (R_390_GOTPCDBL, 21) /* 32 bit PC rel. GOT shifted by 1. */
+ RELOC_NUMBER (R_390_64, 22) /* Direct 64 bit. */
+ RELOC_NUMBER (R_390_PC64, 23) /* PC relative 64 bit. */
+ RELOC_NUMBER (R_390_GOT64, 24) /* 64 bit GOT offset. */
+ RELOC_NUMBER (R_390_PLT64, 25) /* 64 bit PC relative PLT address. */
+ RELOC_NUMBER (R_390_GOTENT, 26) /* 32 bit PC rel. to GOT entry >> 1. */
+ /* These are GNU extensions to enable C++ vtable garbage collection. */
+ RELOC_NUMBER (R_390_GNU_VTINHERIT, 250)
+ RELOC_NUMBER (R_390_GNU_VTENTRY, 251)
+END_RELOC_NUMBERS (R_390_max)
+
+#endif /* _ELF_390_H */
+
+
diff --git a/contrib/binutils/include/elf/x86-64.h b/contrib/binutils/include/elf/x86-64.h
index a4da0a375226..74febc2d5dbb 100644
--- a/contrib/binutils/include/elf/x86-64.h
+++ b/contrib/binutils/include/elf/x86-64.h
@@ -41,6 +41,8 @@ START_RELOC_NUMBERS (elf_x86_64_reloc_type)
RELOC_NUMBER (R_X86_64_PC16, 13) /* 16 bit sign extended pc relative*/
RELOC_NUMBER (R_X86_64_8, 14) /* Direct 8 bit sign extended */
RELOC_NUMBER (R_X86_64_PC8, 15) /* 8 bit sign extended pc relative*/
+ RELOC_NUMBER (R_X86_64_GNU_VTINHERIT, 250) /* GNU C++ hack */
+ RELOC_NUMBER (R_X86_64_GNU_VTENTRY, 251) /* GNU C++ hack */
END_RELOC_NUMBERS (R_X86_64_max)
#endif
diff --git a/contrib/binutils/include/elf/xstormy16.h b/contrib/binutils/include/elf/xstormy16.h
new file mode 100644
index 000000000000..ee6c551a059d
--- /dev/null
+++ b/contrib/binutils/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/contrib/binutils/include/fibheap.h b/contrib/binutils/include/fibheap.h
new file mode 100644
index 000000000000..d109e4ad1635
--- /dev/null
+++ b/contrib/binutils/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/contrib/binutils/include/filenames.h b/contrib/binutils/include/filenames.h
index ba933c8530ee..ca9e2732a326 100644
--- a/contrib/binutils/include/filenames.h
+++ b/contrib/binutils/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/contrib/binutils/include/floatformat.h b/contrib/binutils/include/floatformat.h
index 4335401db5f1..0cd09befb475 100644
--- a/contrib/binutils/include/floatformat.h
+++ b/contrib/binutils/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/contrib/binutils/include/hashtab.h b/contrib/binutils/include/hashtab.h
index a577c5e2afe6..8871710e5d8b 100644
--- a/contrib/binutils/include/hashtab.h
+++ b/contrib/binutils/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/contrib/binutils/include/libiberty.h b/contrib/binutils/include/libiberty.h
index d31ac777dd48..455643d3a92c 100644
--- a/contrib/binutils/include/libiberty.h
+++ b/contrib/binutils/include/libiberty.h
@@ -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
@@ -235,6 +277,38 @@ extern int vasprintf PARAMS ((char **, const char *, va_list))
#define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0]))
+/* Drastically simplified alloca configurator. If we're using GCC,
+ we use __builtin_alloca; otherwise we use the C alloca. The C
+ alloca is always available. You can override GCC by defining
+ 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));
+#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
}
#endif
diff --git a/contrib/binutils/include/objalloc.h b/contrib/binutils/include/objalloc.h
index 0b451cdc2959..c7106478dca4 100644
--- a/contrib/binutils/include/objalloc.h
+++ b/contrib/binutils/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/contrib/binutils/include/opcode/ChangeLog b/contrib/binutils/include/opcode/ChangeLog
index 9e40d0ce9ac8..dcde56b56ba3 100644
--- a/contrib/binutils/include/opcode/ChangeLog
+++ b/contrib/binutils/include/opcode/ChangeLog
@@ -1,26 +1,152 @@
-2001-06-11 Alan Modra <amodra@bigpond.net.au>
+2002-01-22 Graydon Hoare <graydon@redhat.com>
- Merge from mainline.
- 2001-05-23 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
- * mips.h (CPU_R12000): Define.
+ * cgen.h (CGEN_MAYBE_MULTI_IFLD): New structure.
+ (CGEN_OPERAND): Add CGEN_MAYBE_MULTI_IFLD field.
- 2001-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
- * mips.h (INSN_ISA_MASK): Define.
+2002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
- 2001-03-21 Kazu Hirata <kazu@hxi.com>
- * h8300.h: Fix formatting.
+ * h8300.h: Comment typo fix.
- 2001-02-28 Igor Shevlyakov <igor@windriver.com>
- * m68k.h: new defines for Coldfire V4. Update mcf to know
- about mcf5407.
+2002-01-03 matthew green <mrg@redhat.com>
- 2001-02-10 Nick Clifton <nickc@redhat.com>
- * mips.h: Remove extraneous whitespace. Formating change to allow
- for future contribution.
+ * 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-06-07 Alan Modra <amodra@bigpond.net.au>
+2001-08-16 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
- * Many files: Update copyright notices.
+ * 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-08 Alan Modra <amodra@one.net.au>
+
+ 1999-10-25 Torbjorn Granlund <tege@swox.com>
+ * ppc.h (struct powerpc_operand): New field `reloc'.
+
+2001-07-11 Frank Ch. Eigler <fche@redhat.com>
+
+ * cgen.h (CGEN_MACH): Add insn_chunk_bitsize field.
+ (cgen_cpu_desc): Ditto.
+
+2001-07-07 Ben Elliston <bje@redhat.com>
+
+ * m88k.h: Clean up and reformat. Remove unused code.
+
+2001-06-14 Geoffrey Keating <geoffk@redhat.com>
+
+ * cgen.h (cgen_keyword): Add nonalpha_chars field.
+
+2001-05-23 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * mips.h (CPU_R12000): Define.
+
+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.
2001-05-12 Alan Modra <amodra@one.net.au>
@@ -33,11 +159,24 @@
* i386.h (i386_optab): Move InvMem to first operand of pmovmskb
and pextrw to swap reg/rm assignments.
+2001-04-05 Hans-Peter Nilsson <hp@axis.com>
+
+ * cris.h (enum cris_insn_version_usage): Correct comment for
+ cris_ver_v3p.
+
2001-03-24 Alan Modra <alan@linuxcare.com.au>
* i386.h (i386_optab): Correct entry for "movntdq". Add "punpcklqdq".
Add InvMem to first operand of "maskmovdqu".
+2001-03-22 Hans-Peter Nilsson <hp@axis.com>
+
+ * cris.h (ADD_PC_INCR_OPCODE): New macro.
+
+2001-03-21 Kazu Hirata <kazu@hxi.com>
+
+ * h8300.h: Fix formatting.
+
2001-03-22 Alan Modra <alan@linuxcare.com.au>
* i386.h (i386_optab): Add paddq, psubq.
@@ -46,11 +185,35 @@
* i386.h (REGNAM_AL, REGNAM_AX, REGNAM_EAX): Define.
-Mon Feb 12 17:39:31 CET 2001 Jan Hubicka <jh@suse.cz>
+2001-02-28 Igor Shevlyakov <igor@windriver.com>
+
+ * m68k.h: new defines for Coldfire V4. Update mcf to know
+ about mcf5407.
+
+2001-02-18 lars brinkhoff <lars@nocrew.org>
+
+ * pdp11.h: New file.
+
+2001-02-12 Jan Hubicka <jh@suse.cz>
* i386.h (i386_optab): SSE integer converison instructions have
64bit versions on x86-64.
+2001-02-10 Nick Clifton <nickc@redhat.com>
+
+ * mips.h: Remove extraneous whitespace. Formating change to allow
+ for future contribution.
+
+2001-02-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
+
+ * s390.h: New file.
+
+2001-02-02 Patrick Macdonald <patrickm@redhat.com>
+
+ * cgen.h (CGEN_SYNTAX_CHAR_TYPE): Typedef as unsigned short.
+ (CGEN_MAX_SYNTAX_ELEMENTS): Rename from CGEN_MAX_SYNTAX_BYTES.
+ (CGEN_SYNTAX): Define using CGEN_MAX_SYNTAX_ELEMENTS.
+
2001-01-24 Karsten Keil <kkeil@suse.de>
* i386.h (i386_optab): Fix swapgs
@@ -62,7 +225,7 @@ Mon Feb 12 17:39:31 CET 2001 Jan Hubicka <jh@suse.cz>
(pa_opcodes): Add entries for missing wide mode ldi,ldo,ldw,stw.
Remove duplicate "ldw j(s,b),x". Sort some entries.
-Sat Jan 13 09:56:32 MET 2001 Jan Hubicka <jh@suse.cz>
+2001-01-13 Jan Hubicka <jh@suse.cz>
* i386.h (i386_optab): Fix pusha and ret templates.
@@ -117,7 +280,7 @@ Sat Jan 13 09:56:32 MET 2001 Jan Hubicka <jh@suse.cz>
* 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.
@@ -142,7 +305,7 @@ Sat Jan 13 09:56:32 MET 2001 Jan Hubicka <jh@suse.cz>
(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.
@@ -150,7 +313,7 @@ Sat Jan 13 09:56:32 MET 2001 Jan Hubicka <jh@suse.cz>
constant meanings.
* mips.h (INSN_ISA64, ISA_MIPS5, ISA_MIPS64): New
- definitions.
+ definitions.
* mips.h (CPU_SB1): New constant.
@@ -164,21 +327,21 @@ Sat Jan 13 09:56:32 MET 2001 Jan Hubicka <jh@suse.cz>
* 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>
@@ -358,7 +521,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.
@@ -476,7 +639,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.
@@ -562,7 +725,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>
@@ -590,7 +753,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>
@@ -607,7 +770,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>
@@ -718,7 +881,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.
@@ -741,7 +904,7 @@ Mon Feb 1 21:09:14 1999 Catherine Moore <clm@cygnus.com>
* cgen.h (enum cgen_mode): Add CGEN_MODE_TARGET_MAX, CGEN_MODE_INT,
CGEN_MODE_UINT.
-Sat Jan 16 01:29:25 1999 Jeffrey A Law (law@cygnus.com)
+1999-01-16 Jeffrey A Law (law@cygnus.com)
* hppa.h (bv): Fix mask.
@@ -759,16 +922,16 @@ Sat Jan 16 01:29:25 1999 Jeffrey A Law (law@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>
@@ -829,7 +992,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>
@@ -883,7 +1046,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.
@@ -1488,9 +1651,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)
@@ -1543,9 +1706,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>
@@ -1559,11 +1722,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)
@@ -1573,7 +1736,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)
@@ -1589,7 +1752,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>
@@ -1611,7 +1774,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)
@@ -1761,7 +1924,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/contrib/binutils/include/opcode/alpha.h b/contrib/binutils/include/opcode/alpha.h
index 6f31e9ae09c1..487b69605a33 100644
--- a/contrib/binutils/include/opcode/alpha.h
+++ b/contrib/binutils/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/contrib/binutils/include/opcode/arc.h b/contrib/binutils/include/opcode/arc.h
index 81e5bd847dc2..b137840156c0 100644
--- a/contrib/binutils/include/opcode/arc.h
+++ b/contrib/binutils/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/contrib/binutils/include/opcode/cgen.h b/contrib/binutils/include/opcode/cgen.h
index 8cf312322256..e603b55ce6e9 100644
--- a/contrib/binutils/include/opcode/cgen.h
+++ b/contrib/binutils/include/opcode/cgen.h
@@ -199,6 +199,8 @@ typedef struct {
const char *bfd_name;
/* one of enum mach_attr */
int num;
+ /* parameter from mach->cpu */
+ unsigned int insn_chunk_bitsize;
} CGEN_MACH;
/* Parse result (also extraction result).
@@ -513,6 +515,11 @@ typedef struct cgen_keyword
/* Pointer to null keyword "" entry if present. */
const CGEN_KEYWORD_ENTRY *null_entry;
+
+ /* String containing non-alphanumeric characters used
+ in keywords.
+ At present, the highest number of entries used is 1. */
+ char nonalpha_chars[8];
} CGEN_KEYWORD;
/* Structure used for searching. */
@@ -602,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
@@ -630,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. */
@@ -736,25 +765,21 @@ typedef struct
the data is recorded in the parse/insert/extract/print switch statements. */
/* This should be at least as large as necessary for any target. */
-#define CGEN_MAX_SYNTAX_BYTES 40
+#define CGEN_MAX_SYNTAX_ELEMENTS 48
/* A target may know its own precise maximum. Assert that it falls below
the above limit. */
-#ifdef CGEN_ACTUAL_MAX_SYNTAX_BYTES
-#if CGEN_ACTUAL_MAX_SYNTAX_BYTES > CGEN_MAX_SYNTAX_BYTES
-#error "CGEN_ACTUAL_MAX_SYNTAX_BYTES too high - enlarge CGEN_MAX_SYNTAX_BYTES"
+#ifdef CGEN_ACTUAL_MAX_SYNTAX_ELEMENTS
+#if CGEN_ACTUAL_MAX_SYNTAX_ELEMENTS > CGEN_MAX_SYNTAX_ELEMENTS
+#error "CGEN_ACTUAL_MAX_SYNTAX_ELEMENTS too high - enlarge CGEN_MAX_SYNTAX_ELEMENTS"
#endif
#endif
-#if !defined(MAX_OPERANDS) || MAX_OPERANDS <= 127
-typedef unsigned char CGEN_SYNTAX_CHAR_TYPE;
-#else
typedef unsigned short CGEN_SYNTAX_CHAR_TYPE;
-#endif
typedef struct
{
- CGEN_SYNTAX_CHAR_TYPE syntax[CGEN_MAX_SYNTAX_BYTES];
+ CGEN_SYNTAX_CHAR_TYPE syntax[CGEN_MAX_SYNTAX_ELEMENTS];
} CGEN_SYNTAX;
#define CGEN_SYNTAX_STRING(syn) (syn->syntax)
@@ -1006,6 +1031,11 @@ struct cgen_insn
const CGEN_IBASE *base;
const CGEN_OPCODE *opcode;
const CGEN_OPINST *opinst;
+
+ /* Regex to disambiguate overloaded opcodes */
+ void *rx;
+#define CGEN_INSN_RX(insn) ((insn)->rx)
+#define CGEN_MAX_RX_ELEMENTS (CGEN_MAX_SYNTAX_ELEMENTS * 5)
};
/* Instruction lists.
@@ -1165,6 +1195,10 @@ typedef struct cgen_cpu_desc
lazily fetch the data from there. */
unsigned int word_bitsize;
+ /* Instruction chunk size (in bits), for purposes of endianness
+ conversion. */
+ unsigned int insn_chunk_bitsize;
+
/* Indicator if sizes are unknown.
This is used by default_insn_bitsize,base_insn_bitsize if there is a
difference between the selected isa's. */
@@ -1357,6 +1391,11 @@ extern void CGEN_SYM (cpu_close) PARAMS ((CGEN_CPU_DESC));
extern void CGEN_SYM (init_opcode_table) PARAMS ((CGEN_CPU_DESC cd_));
+/* build the insn selection regex.
+ called by init_opcode_table */
+
+extern char * CGEN_SYM(build_insn_regex) PARAMS ((CGEN_INSN *insn_));
+
/* Initialize the ibld table for use.
Called by init_asm/init_dis. */
diff --git a/contrib/binutils/include/opcode/i386.h b/contrib/binutils/include/opcode/i386.h
index 38de44aca0a1..571990e1be9b 100644
--- a/contrib/binutils/include/opcode/i386.h
+++ b/contrib/binutils/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/contrib/binutils/include/opcode/ppc.h b/contrib/binutils/include/opcode/ppc.h
index d23e1c695e93..dc3983ec0a14 100644
--- a/contrib/binutils/include/opcode/ppc.h
+++ b/contrib/binutils/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/contrib/binutils/include/partition.h b/contrib/binutils/include/partition.h
index 091655ac01d0..851422a957a2 100644
--- a/contrib/binutils/include/partition.h
+++ b/contrib/binutils/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/contrib/binutils/include/safe-ctype.h b/contrib/binutils/include/safe-ctype.h
index 6d4d10a830aa..b2ad8490bd04 100644
--- a/contrib/binutils/include/safe-ctype.h
+++ b/contrib/binutils/include/safe-ctype.h
@@ -63,13 +63,15 @@ 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. */
extern const unsigned short _sch_istable[256];
-#define _sch_test(c, bit) (_sch_istable[(c) & 0xff] & (bit))
+#define _sch_test(c, bit) (_sch_istable[(c) & 0xff] & (unsigned short)(bit))
#define ISALPHA(c) _sch_test(c, _sch_isalpha)
#define ISALNUM(c) _sch_test(c, _sch_isalnum)
@@ -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/contrib/binutils/include/sort.h b/contrib/binutils/include/sort.h
index c8e1d5547d1b..b974059ddfab 100644
--- a/contrib/binutils/include/sort.h
+++ b/contrib/binutils/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/contrib/binutils/include/splay-tree.h b/contrib/binutils/include/splay-tree.h
index e43d4b62eaa0..6903969402e5 100644
--- a/contrib/binutils/include/splay-tree.h
+++ b/contrib/binutils/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. */
@@ -110,6 +110,10 @@ extern splay_tree_node splay_tree_predecessor
extern splay_tree_node splay_tree_successor
PARAMS((splay_tree,
splay_tree_key));
+extern splay_tree_node splay_tree_max
+ PARAMS((splay_tree));
+extern splay_tree_node splay_tree_min
+ PARAMS((splay_tree));
extern int splay_tree_foreach PARAMS((splay_tree,
splay_tree_foreach_fn,
void*));
diff --git a/contrib/binutils/include/ternary.h b/contrib/binutils/include/ternary.h
new file mode 100644
index 000000000000..40d442e6223e
--- /dev/null
+++ b/contrib/binutils/include/ternary.h
@@ -0,0 +1,51 @@
+/* ternary.h - Ternary Search Trees
+ Copyright 2001 Free Software Foundation, Inc.
+
+ Contributed by Daniel Berlin (dan@cgsoftware.com)
+
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the
+ Free Software Foundation; either version 2, 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 TERNARY_H_
+#define TERNARY_H_
+/* Ternary search trees */
+
+typedef struct ternary_node_def *ternary_tree;
+
+typedef struct ternary_node_def
+{
+ char splitchar;
+ ternary_tree lokid;
+ ternary_tree eqkid;
+ ternary_tree hikid;
+}
+ternary_node;
+
+/* Insert string S into tree P, associating it with DATA.
+ Return the data in the tree associated with the string if it's
+ already there, and replace is 0.
+ Otherwise, replaces if it it exists, inserts if it doesn't, and
+ returns the data you passed in. */
+PTR ternary_insert PARAMS ((ternary_tree *p, const char *s,
+ PTR data, int replace));
+
+/* Delete the ternary search tree rooted at P.
+ Does NOT delete the data you associated with the strings. */
+void ternary_cleanup PARAMS ((ternary_tree p));
+
+/* Search the ternary tree for string S, returning the data associated
+ with it if found. */
+PTR ternary_search PARAMS ((const ternary_node *p, const char *s));
+#endif
diff --git a/contrib/binutils/include/xregex.h b/contrib/binutils/include/xregex.h
new file mode 100644
index 000000000000..645195bbceb5
--- /dev/null
+++ b/contrib/binutils/include/xregex.h
@@ -0,0 +1,28 @@
+/* This file redefines all regex external names before including
+ a renamed copy of glibc's regex.h. */
+
+#ifndef _XREGEX_H
+#define _XREGEX_H 1
+
+# define regfree xregfree
+# define regexec xregexec
+# define regcomp xregcomp
+# define regerror xregerror
+# define re_set_registers xre_set_registers
+# define re_match_2 xre_match_2
+# define re_match xre_match
+# define re_search xre_search
+# define re_compile_pattern xre_compile_pattern
+# define re_set_syntax xre_set_syntax
+# define re_search_2 xre_search_2
+# define re_compile_fastmap xre_compile_fastmap
+# 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 */
diff --git a/contrib/binutils/include/xregex2.h b/contrib/binutils/include/xregex2.h
new file mode 100644
index 000000000000..b9c2d97cce1b
--- /dev/null
+++ b/contrib/binutils/include/xregex2.h
@@ -0,0 +1,565 @@
+/* Definitions for data structures and routines for the regular
+ expression library, version 0.12.
+ Copyright (C) 1985,1989-1993,1995-1998, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library. Its master source is NOT part of
+ the C library, however. The master source lives in /gd/gnu/lib.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _REGEX_H
+#define _REGEX_H 1
+
+/* Allow the use in C++ code. */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* POSIX says that <sys/types.h> must be included (by the caller) before
+ <regex.h>. */
+
+#if !defined _POSIX_C_SOURCE && !defined _POSIX_SOURCE && defined VMS
+/* VMS doesn't have `size_t' in <sys/types.h>, even though POSIX says it
+ should be there. */
+# include <stddef.h>
+#endif
+
+/* The following two types have to be signed and unsigned integer type
+ wide enough to hold a value of a pointer. For most ANSI compilers
+ ptrdiff_t and size_t should be likely OK. Still size of these two
+ types is 2 for Microsoft C. Ugh... */
+typedef long int s_reg_t;
+typedef unsigned long int active_reg_t;
+
+/* The following bits are used to determine the regexp syntax we
+ recognize. The set/not-set meanings are chosen so that Emacs syntax
+ remains the value 0. The bits are given in alphabetical order, and
+ the definitions shifted by one from the previous bit; thus, when we
+ add or remove a bit, only one other definition need change. */
+typedef unsigned long int reg_syntax_t;
+
+/* If this bit is not set, then \ inside a bracket expression is literal.
+ If set, then such a \ quotes the following character. */
+#define RE_BACKSLASH_ESCAPE_IN_LISTS ((unsigned long int) 1)
+
+/* If this bit is not set, then + and ? are operators, and \+ and \? are
+ literals.
+ If set, then \+ and \? are operators and + and ? are literals. */
+#define RE_BK_PLUS_QM (RE_BACKSLASH_ESCAPE_IN_LISTS << 1)
+
+/* If this bit is set, then character classes are supported. They are:
+ [:alpha:], [:upper:], [:lower:], [:digit:], [:alnum:], [:xdigit:],
+ [:space:], [:print:], [:punct:], [:graph:], and [:cntrl:].
+ If not set, then character classes are not supported. */
+#define RE_CHAR_CLASSES (RE_BK_PLUS_QM << 1)
+
+/* If this bit is set, then ^ and $ are always anchors (outside bracket
+ expressions, of course).
+ If this bit is not set, then it depends:
+ ^ is an anchor if it is at the beginning of a regular
+ expression or after an open-group or an alternation operator;
+ $ is an anchor if it is at the end of a regular expression, or
+ before a close-group or an alternation operator.
+
+ This bit could be (re)combined with RE_CONTEXT_INDEP_OPS, because
+ POSIX draft 11.2 says that * etc. in leading positions is undefined.
+ We already implemented a previous draft which made those constructs
+ invalid, though, so we haven't changed the code back. */
+#define RE_CONTEXT_INDEP_ANCHORS (RE_CHAR_CLASSES << 1)
+
+/* If this bit is set, then special characters are always special
+ regardless of where they are in the pattern.
+ If this bit is not set, then special characters are special only in
+ some contexts; otherwise they are ordinary. Specifically,
+ * + ? and intervals are only special when not after the beginning,
+ open-group, or alternation operator. */
+#define RE_CONTEXT_INDEP_OPS (RE_CONTEXT_INDEP_ANCHORS << 1)
+
+/* If this bit is set, then *, +, ?, and { cannot be first in an re or
+ immediately after an alternation or begin-group operator. */
+#define RE_CONTEXT_INVALID_OPS (RE_CONTEXT_INDEP_OPS << 1)
+
+/* If this bit is set, then . matches newline.
+ If not set, then it doesn't. */
+#define RE_DOT_NEWLINE (RE_CONTEXT_INVALID_OPS << 1)
+
+/* If this bit is set, then . doesn't match NUL.
+ If not set, then it does. */
+#define RE_DOT_NOT_NULL (RE_DOT_NEWLINE << 1)
+
+/* If this bit is set, nonmatching lists [^...] do not match newline.
+ If not set, they do. */
+#define RE_HAT_LISTS_NOT_NEWLINE (RE_DOT_NOT_NULL << 1)
+
+/* If this bit is set, either \{...\} or {...} defines an
+ interval, depending on RE_NO_BK_BRACES.
+ If not set, \{, \}, {, and } are literals. */
+#define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1)
+
+/* If this bit is set, +, ? and | aren't recognized as operators.
+ If not set, they are. */
+#define RE_LIMITED_OPS (RE_INTERVALS << 1)
+
+/* If this bit is set, newline is an alternation operator.
+ If not set, newline is literal. */
+#define RE_NEWLINE_ALT (RE_LIMITED_OPS << 1)
+
+/* If this bit is set, then `{...}' defines an interval, and \{ and \}
+ are literals.
+ If not set, then `\{...\}' defines an interval. */
+#define RE_NO_BK_BRACES (RE_NEWLINE_ALT << 1)
+
+/* If this bit is set, (...) defines a group, and \( and \) are literals.
+ If not set, \(...\) defines a group, and ( and ) are literals. */
+#define RE_NO_BK_PARENS (RE_NO_BK_BRACES << 1)
+
+/* If this bit is set, then \<digit> matches <digit>.
+ If not set, then \<digit> is a back-reference. */
+#define RE_NO_BK_REFS (RE_NO_BK_PARENS << 1)
+
+/* If this bit is set, then | is an alternation operator, and \| is literal.
+ If not set, then \| is an alternation operator, and | is literal. */
+#define RE_NO_BK_VBAR (RE_NO_BK_REFS << 1)
+
+/* If this bit is set, then an ending range point collating higher
+ than the starting range point, as in [z-a], is invalid.
+ If not set, then when ending range point collates higher than the
+ starting range point, the range is ignored. */
+#define RE_NO_EMPTY_RANGES (RE_NO_BK_VBAR << 1)
+
+/* If this bit is set, then an unmatched ) is ordinary.
+ If not set, then an unmatched ) is invalid. */
+#define RE_UNMATCHED_RIGHT_PAREN_ORD (RE_NO_EMPTY_RANGES << 1)
+
+/* If this bit is set, succeed as soon as we match the whole pattern,
+ without further backtracking. */
+#define RE_NO_POSIX_BACKTRACKING (RE_UNMATCHED_RIGHT_PAREN_ORD << 1)
+
+/* If this bit is set, do not process the GNU regex operators.
+ If not set, then the GNU regex operators are recognized. */
+#define RE_NO_GNU_OPS (RE_NO_POSIX_BACKTRACKING << 1)
+
+/* If this bit is set, turn on internal regex debugging.
+ If not set, and debugging was on, turn it off.
+ This only works if regex.c is compiled -DDEBUG.
+ We define this bit always, so that all that's needed to turn on
+ debugging is to recompile regex.c; the calling code can always have
+ this bit set, and it won't affect anything in the normal case. */
+#define RE_DEBUG (RE_NO_GNU_OPS << 1)
+
+/* If this bit is set, a syntactically invalid interval is treated as
+ a string of ordinary characters. For example, the ERE 'a{1' is
+ treated as 'a\{1'. */
+#define RE_INVALID_INTERVAL_ORD (RE_DEBUG << 1)
+
+/* This global variable defines the particular regexp syntax to use (for
+ some interfaces). When a regexp is compiled, the syntax used is
+ stored in the pattern buffer, so changing this does not affect
+ already-compiled regexps. */
+extern reg_syntax_t re_syntax_options;
+
+/* Define combinations of the above bits for the standard possibilities.
+ (The [[[ comments delimit what gets put into the Texinfo file, so
+ don't delete them!) */
+/* [[[begin syntaxes]]] */
+#define RE_SYNTAX_EMACS 0
+
+#define RE_SYNTAX_AWK \
+ (RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DOT_NOT_NULL \
+ | RE_NO_BK_PARENS | RE_NO_BK_REFS \
+ | RE_NO_BK_VBAR | RE_NO_EMPTY_RANGES \
+ | RE_DOT_NEWLINE | RE_CONTEXT_INDEP_ANCHORS \
+ | RE_UNMATCHED_RIGHT_PAREN_ORD | RE_NO_GNU_OPS)
+
+#define RE_SYNTAX_GNU_AWK \
+ ((RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DEBUG) \
+ & ~(RE_DOT_NOT_NULL | RE_INTERVALS | RE_CONTEXT_INDEP_OPS))
+
+#define RE_SYNTAX_POSIX_AWK \
+ (RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS \
+ | RE_INTERVALS | RE_NO_GNU_OPS)
+
+#define RE_SYNTAX_GREP \
+ (RE_BK_PLUS_QM | RE_CHAR_CLASSES \
+ | RE_HAT_LISTS_NOT_NEWLINE | RE_INTERVALS \
+ | RE_NEWLINE_ALT)
+
+#define RE_SYNTAX_EGREP \
+ (RE_CHAR_CLASSES | RE_CONTEXT_INDEP_ANCHORS \
+ | RE_CONTEXT_INDEP_OPS | RE_HAT_LISTS_NOT_NEWLINE \
+ | RE_NEWLINE_ALT | RE_NO_BK_PARENS \
+ | RE_NO_BK_VBAR)
+
+#define RE_SYNTAX_POSIX_EGREP \
+ (RE_SYNTAX_EGREP | RE_INTERVALS | RE_NO_BK_BRACES \
+ | RE_INVALID_INTERVAL_ORD)
+
+/* P1003.2/D11.2, section 4.20.7.1, lines 5078ff. */
+#define RE_SYNTAX_ED RE_SYNTAX_POSIX_BASIC
+
+#define RE_SYNTAX_SED RE_SYNTAX_POSIX_BASIC
+
+/* Syntax bits common to both basic and extended POSIX regex syntax. */
+#define _RE_SYNTAX_POSIX_COMMON \
+ (RE_CHAR_CLASSES | RE_DOT_NEWLINE | RE_DOT_NOT_NULL \
+ | RE_INTERVALS | RE_NO_EMPTY_RANGES)
+
+#define RE_SYNTAX_POSIX_BASIC \
+ (_RE_SYNTAX_POSIX_COMMON | RE_BK_PLUS_QM)
+
+/* Differs from ..._POSIX_BASIC only in that RE_BK_PLUS_QM becomes
+ RE_LIMITED_OPS, i.e., \? \+ \| are not recognized. Actually, this
+ isn't minimal, since other operators, such as \`, aren't disabled. */
+#define RE_SYNTAX_POSIX_MINIMAL_BASIC \
+ (_RE_SYNTAX_POSIX_COMMON | RE_LIMITED_OPS)
+
+#define RE_SYNTAX_POSIX_EXTENDED \
+ (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \
+ | RE_CONTEXT_INDEP_OPS | RE_NO_BK_BRACES \
+ | RE_NO_BK_PARENS | RE_NO_BK_VBAR \
+ | RE_CONTEXT_INVALID_OPS | RE_UNMATCHED_RIGHT_PAREN_ORD)
+
+/* Differs from ..._POSIX_EXTENDED in that RE_CONTEXT_INDEP_OPS is
+ removed and RE_NO_BK_REFS is added. */
+#define RE_SYNTAX_POSIX_MINIMAL_EXTENDED \
+ (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \
+ | RE_CONTEXT_INVALID_OPS | RE_NO_BK_BRACES \
+ | RE_NO_BK_PARENS | RE_NO_BK_REFS \
+ | RE_NO_BK_VBAR | RE_UNMATCHED_RIGHT_PAREN_ORD)
+/* [[[end syntaxes]]] */
+
+/* Maximum number of duplicates an interval can allow. Some systems
+ (erroneously) define this in other header files, but we want our
+ value, so remove any previous define. */
+#ifdef RE_DUP_MAX
+# undef RE_DUP_MAX
+#endif
+/* If sizeof(int) == 2, then ((1 << 15) - 1) overflows. */
+#define RE_DUP_MAX (0x7fff)
+
+
+/* POSIX `cflags' bits (i.e., information for `regcomp'). */
+
+/* If this bit is set, then use extended regular expression syntax.
+ If not set, then use basic regular expression syntax. */
+#define REG_EXTENDED 1
+
+/* If this bit is set, then ignore case when matching.
+ If not set, then case is significant. */
+#define REG_ICASE (REG_EXTENDED << 1)
+
+/* If this bit is set, then anchors do not match at newline
+ characters in the string.
+ If not set, then anchors do match at newlines. */
+#define REG_NEWLINE (REG_ICASE << 1)
+
+/* If this bit is set, then report only success or fail in regexec.
+ If not set, then returns differ between not matching and errors. */
+#define REG_NOSUB (REG_NEWLINE << 1)
+
+
+/* POSIX `eflags' bits (i.e., information for regexec). */
+
+/* If this bit is set, then the beginning-of-line operator doesn't match
+ the beginning of the string (presumably because it's not the
+ beginning of a line).
+ If not set, then the beginning-of-line operator does match the
+ beginning of the string. */
+#define REG_NOTBOL 1
+
+/* Like REG_NOTBOL, except for the end-of-line. */
+#define REG_NOTEOL (1 << 1)
+
+
+/* If any error codes are removed, changed, or added, update the
+ `re_error_msg' table in regex.c. */
+typedef enum
+{
+#ifdef _XOPEN_SOURCE
+ REG_ENOSYS = -1, /* This will never happen for this implementation. */
+#endif
+
+ REG_NOERROR = 0, /* Success. */
+ REG_NOMATCH, /* Didn't find a match (for regexec). */
+
+ /* POSIX regcomp return error codes. (In the order listed in the
+ standard.) */
+ REG_BADPAT, /* Invalid pattern. */
+ REG_ECOLLATE, /* Not implemented. */
+ REG_ECTYPE, /* Invalid character class name. */
+ REG_EESCAPE, /* Trailing backslash. */
+ REG_ESUBREG, /* Invalid back reference. */
+ REG_EBRACK, /* Unmatched left bracket. */
+ REG_EPAREN, /* Parenthesis imbalance. */
+ REG_EBRACE, /* Unmatched \{. */
+ REG_BADBR, /* Invalid contents of \{\}. */
+ REG_ERANGE, /* Invalid range end. */
+ REG_ESPACE, /* Ran out of memory. */
+ REG_BADRPT, /* No preceding re for repetition op. */
+
+ /* Error codes we've added. */
+ REG_EEND, /* Premature end. */
+ REG_ESIZE, /* Compiled pattern bigger than 2^16 bytes. */
+ REG_ERPAREN /* Unmatched ) or \); not returned from regcomp. */
+} reg_errcode_t;
+
+/* This data structure represents a compiled pattern. Before calling
+ the pattern compiler, the fields `buffer', `allocated', `fastmap',
+ `translate', and `no_sub' can be set. After the pattern has been
+ compiled, the `re_nsub' field is available. All other fields are
+ private to the regex routines. */
+
+#ifndef RE_TRANSLATE_TYPE
+# define RE_TRANSLATE_TYPE char *
+#endif
+
+struct re_pattern_buffer
+{
+/* [[[begin pattern_buffer]]] */
+ /* Space that holds the compiled pattern. It is declared as
+ `unsigned char *' because its elements are
+ sometimes used as array indexes. */
+ unsigned char *buffer;
+
+ /* Number of bytes to which `buffer' points. */
+ unsigned long int allocated;
+
+ /* Number of bytes actually used in `buffer'. */
+ unsigned long int used;
+
+ /* Syntax setting with which the pattern was compiled. */
+ reg_syntax_t syntax;
+
+ /* Pointer to a fastmap, if any, otherwise zero. re_search uses
+ the fastmap, if there is one, to skip over impossible
+ starting points for matches. */
+ char *fastmap;
+
+ /* Either a translate table to apply to all characters before
+ comparing them, or zero for no translation. The translation
+ is applied to a pattern when it is compiled and to a string
+ when it is matched. */
+ RE_TRANSLATE_TYPE translate;
+
+ /* Number of subexpressions found by the compiler. */
+ size_t re_nsub;
+
+ /* Zero if this pattern cannot match the empty string, one else.
+ Well, in truth it's used only in `re_search_2', to see
+ whether or not we should use the fastmap, so we don't set
+ this absolutely perfectly; see `re_compile_fastmap' (the
+ `duplicate' case). */
+ unsigned can_be_null : 1;
+
+ /* If REGS_UNALLOCATED, allocate space in the `regs' structure
+ for `max (RE_NREGS, re_nsub + 1)' groups.
+ If REGS_REALLOCATE, reallocate space if necessary.
+ If REGS_FIXED, use what's there. */
+#define REGS_UNALLOCATED 0
+#define REGS_REALLOCATE 1
+#define REGS_FIXED 2
+ unsigned regs_allocated : 2;
+
+ /* Set to zero when `regex_compile' compiles a pattern; set to one
+ by `re_compile_fastmap' if it updates the fastmap. */
+ unsigned fastmap_accurate : 1;
+
+ /* If set, `re_match_2' does not return information about
+ subexpressions. */
+ unsigned no_sub : 1;
+
+ /* If set, a beginning-of-line anchor doesn't match at the
+ beginning of the string. */
+ unsigned not_bol : 1;
+
+ /* Similarly for an end-of-line anchor. */
+ unsigned not_eol : 1;
+
+ /* If true, an anchor at a newline matches. */
+ unsigned newline_anchor : 1;
+
+/* [[[end pattern_buffer]]] */
+};
+
+typedef struct re_pattern_buffer regex_t;
+
+/* Type for byte offsets within the string. POSIX mandates this. */
+typedef int regoff_t;
+
+
+/* This is the structure we store register match data in. See
+ regex.texinfo for a full description of what registers match. */
+struct re_registers
+{
+ unsigned num_regs;
+ regoff_t *start;
+ regoff_t *end;
+};
+
+
+/* If `regs_allocated' is REGS_UNALLOCATED in the pattern buffer,
+ `re_match_2' returns information about at least this many registers
+ the first time a `regs' structure is passed. */
+#ifndef RE_NREGS
+# define RE_NREGS 30
+#endif
+
+
+/* POSIX specification for registers. Aside from the different names than
+ `re_registers', POSIX uses an array of structures, instead of a
+ structure of arrays. */
+typedef struct
+{
+ regoff_t rm_so; /* Byte offset from string's start to substring's start. */
+ regoff_t rm_eo; /* Byte offset from string's start to substring's end. */
+} regmatch_t;
+
+/* Declarations for routines. */
+
+/* To avoid duplicating every routine declaration -- once with a
+ prototype (if we are ANSI), and once without (if we aren't) -- we
+ use the following macro to declare argument types. This
+ unfortunately clutters up the declarations a bit, but I think it's
+ worth it. */
+
+#if __STDC__
+
+# define _RE_ARGS(args) args
+
+#else /* not __STDC__ */
+
+# define _RE_ARGS(args) ()
+
+#endif /* not __STDC__ */
+
+/* Sets the current default syntax to SYNTAX, and return the old syntax.
+ You can also simply assign to the `re_syntax_options' variable. */
+extern reg_syntax_t re_set_syntax _RE_ARGS ((reg_syntax_t syntax));
+
+/* Compile the regular expression PATTERN, with length LENGTH
+ and syntax given by the global `re_syntax_options', into the buffer
+ BUFFER. Return NULL if successful, and an error string if not. */
+extern const char *re_compile_pattern
+ _RE_ARGS ((const char *pattern, size_t length,
+ struct re_pattern_buffer *buffer));
+
+
+/* Compile a fastmap for the compiled pattern in BUFFER; used to
+ accelerate searches. Return 0 if successful and -2 if was an
+ internal error. */
+extern int re_compile_fastmap _RE_ARGS ((struct re_pattern_buffer *buffer));
+
+
+/* Search in the string STRING (with length LENGTH) for the pattern
+ compiled into BUFFER. Start searching at position START, for RANGE
+ characters. Return the starting position of the match, -1 for no
+ match, or -2 for an internal error. Also return register
+ information in REGS (if REGS and BUFFER->no_sub are nonzero). */
+extern int re_search
+ _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string,
+ int length, int start, int range, struct re_registers *regs));
+
+
+/* Like `re_search', but search in the concatenation of STRING1 and
+ STRING2. Also, stop searching at index START + STOP. */
+extern int re_search_2
+ _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string1,
+ int length1, const char *string2, int length2,
+ int start, int range, struct re_registers *regs, int stop));
+
+
+/* Like `re_search', but return how many characters in STRING the regexp
+ in BUFFER matched, starting at position START. */
+extern int re_match
+ _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string,
+ int length, int start, struct re_registers *regs));
+
+
+/* Relates to `re_match' as `re_search_2' relates to `re_search'. */
+extern int re_match_2
+ _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string1,
+ int length1, const char *string2, int length2,
+ int start, struct re_registers *regs, int stop));
+
+
+/* Set REGS to hold NUM_REGS registers, storing them in STARTS and
+ ENDS. Subsequent matches using BUFFER and REGS will use this memory
+ for recording register information. STARTS and ENDS must be
+ allocated with malloc, and must each be at least `NUM_REGS * sizeof
+ (regoff_t)' bytes long.
+
+ If NUM_REGS == 0, then subsequent matches should allocate their own
+ register data.
+
+ Unless this function is called, the first search or match using
+ PATTERN_BUFFER will allocate its own register data, without
+ freeing the old data. */
+extern void re_set_registers
+ _RE_ARGS ((struct re_pattern_buffer *buffer, struct re_registers *regs,
+ unsigned num_regs, regoff_t *starts, regoff_t *ends));
+
+#if defined _REGEX_RE_COMP || defined _LIBC
+# ifndef _CRAY
+/* 4.2 bsd compatibility. */
+extern char *re_comp _RE_ARGS ((const char *));
+extern int re_exec _RE_ARGS ((const char *));
+# endif
+#endif
+
+/* GCC 2.95 and later have "__restrict"; C99 compilers have
+ "restrict", and "configure" may have defined "restrict". */
+#ifndef __restrict
+# if ! (2 < __GNUC__ || (2 == __GNUC__ && 95 <= __GNUC_MINOR__))
+# if defined restrict || 199901L <= __STDC_VERSION__
+# define __restrict restrict
+# else
+# define __restrict
+# endif
+# endif
+#endif
+/* For now unconditionally define __restrict_arr to expand to nothing.
+ Ideally we would have a test for the compiler which allows defining
+ it to restrict. */
+#define __restrict_arr
+
+/* POSIX compatibility. */
+extern int regcomp _RE_ARGS ((regex_t *__restrict __preg,
+ const char *__restrict __pattern,
+ int __cflags));
+
+extern int regexec _RE_ARGS ((const regex_t *__restrict __preg,
+ const char *__restrict __string, size_t __nmatch,
+ regmatch_t __pmatch[__restrict_arr],
+ int __eflags));
+
+extern size_t regerror _RE_ARGS ((int __errcode, const regex_t *__preg,
+ char *__errbuf, size_t __errbuf_size));
+
+extern void regfree _RE_ARGS ((regex_t *__preg));
+
+
+#ifdef __cplusplus
+}
+#endif /* C++ */
+
+#endif /* regex.h */
+
+/*
+Local variables:
+make-backup-files: t
+version-control: t
+trim-versions-without-asking: nil
+End:
+*/