aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/ChangeLog89
-rw-r--r--include/ansidecl.h3
-rw-r--r--include/aout/ChangeLog16
-rw-r--r--include/aout/adobe.h18
-rw-r--r--include/aout/aout64.h18
-rw-r--r--include/aout/ar.h18
-rw-r--r--include/aout/dynix3.h79
-rw-r--r--include/aout/encap.h2
-rw-r--r--include/aout/host.h28
-rw-r--r--include/aout/hp300hpux.h2
-rw-r--r--include/aout/ranlib.h2
-rw-r--r--include/aout/reloc.h2
-rw-r--r--include/aout/stab.def2
-rw-r--r--include/aout/stab_gnu.h17
-rw-r--r--include/aout/sun4.h20
-rw-r--r--include/bfdlink.h3
-rw-r--r--include/bout.h267
-rw-r--r--include/coff/ChangeLog87
-rw-r--r--include/coff/a29k.h208
-rw-r--r--include/coff/alpha.h36
-rw-r--r--include/coff/apollo.h184
-rw-r--r--include/coff/arm.h222
-rw-r--r--include/coff/aux-coff.h17
-rw-r--r--include/coff/ecoff.h24
-rw-r--r--include/coff/external.h254
-rw-r--r--include/coff/go32exe.h41
-rw-r--r--include/coff/h8300.h206
-rw-r--r--include/coff/h8500.h203
-rw-r--r--include/coff/i386.h215
-rw-r--r--include/coff/i860.h207
-rw-r--r--include/coff/i960.h242
-rw-r--r--include/coff/ia64.h182
-rw-r--r--include/coff/internal.h78
-rw-r--r--include/coff/m68k.h204
-rw-r--r--include/coff/m88k.h155
-rw-r--r--include/coff/mcore.h191
-rw-r--r--include/coff/mips.h94
-rw-r--r--include/coff/mipspe.h207
-rw-r--r--include/coff/pe.h2
-rw-r--r--include/coff/powerpc.h199
-rw-r--r--include/coff/rs6000.h232
-rw-r--r--include/coff/rs6k64.h254
-rw-r--r--include/coff/sh.h227
-rw-r--r--include/coff/sparc.h103
-rw-r--r--include/coff/ti.h47
-rw-r--r--include/coff/tic30.h199
-rw-r--r--include/coff/tic54x.h24
-rw-r--r--include/coff/tic80.h186
-rw-r--r--include/coff/w65.h201
-rw-r--r--include/coff/we32k.h202
-rw-r--r--include/coff/z8k.h203
-rw-r--r--include/demangle.h3
-rw-r--r--include/dis-asm.h18
-rw-r--r--include/dyn-string.h2
-rw-r--r--include/elf/ChangeLog14
-rw-r--r--include/elf/alpha.h2
-rw-r--r--include/elf/arc.h2
-rw-r--r--include/elf/arm.h2
-rw-r--r--include/elf/avr.h2
-rw-r--r--include/elf/common.h3
-rw-r--r--include/elf/cris.h2
-rw-r--r--include/elf/d10v.h2
-rw-r--r--include/elf/d30v.h2
-rw-r--r--include/elf/dwarf.h2
-rw-r--r--include/elf/dwarf2.h2
-rw-r--r--include/elf/external.h3
-rw-r--r--include/elf/fr30.h2
-rw-r--r--include/elf/hppa.h3
-rw-r--r--include/elf/i370.h2
-rw-r--r--include/elf/i386.h2
-rw-r--r--include/elf/i860.h2
-rw-r--r--include/elf/i960.h2
-rw-r--r--include/elf/ia64.h2
-rw-r--r--include/elf/internal.h2
-rw-r--r--include/elf/m32r.h2
-rw-r--r--include/elf/m68hc11.h2
-rw-r--r--include/elf/m68k.h2
-rw-r--r--include/elf/mcore.h2
-rw-r--r--include/elf/mips.h2
-rw-r--r--include/elf/mn10200.h2
-rw-r--r--include/elf/mn10300.h2
-rw-r--r--include/elf/pj.h2
-rw-r--r--include/elf/ppc.h2
-rw-r--r--include/elf/reloc-macros.h2
-rw-r--r--include/elf/s390.h2
-rw-r--r--include/elf/sh.h2
-rw-r--r--include/elf/sparc.h2
-rw-r--r--include/elf/v850.h2
-rw-r--r--include/floatformat.h2
-rw-r--r--include/fnmatch.h2
-rw-r--r--include/getopt.h2
-rw-r--r--include/hashtab.h2
-rw-r--r--include/hp-symtab.h2
-rw-r--r--include/ieee.h270
-rw-r--r--include/libiberty.h18
-rw-r--r--include/md5.h2
-rw-r--r--include/mpw/spin.h2
-rw-r--r--include/nlm/alpha-ext.h2
-rw-r--r--include/nlm/common.h2
-rw-r--r--include/nlm/external.h2
-rw-r--r--include/nlm/i386-ext.h2
-rw-r--r--include/nlm/internal.h2
-rw-r--r--include/nlm/sparc32-ext.h2
-rw-r--r--include/oasys.h304
-rw-r--r--include/obstack.h3
-rw-r--r--include/opcode/ChangeLog51
-rw-r--r--include/opcode/a29k.h2
-rw-r--r--include/opcode/arc.h2
-rw-r--r--include/opcode/arm.h2
-rw-r--r--include/opcode/cgen.h2
-rw-r--r--include/opcode/convex.h2
-rw-r--r--include/opcode/d10v.h2
-rw-r--r--include/opcode/d30v.h2
-rw-r--r--include/opcode/h8300.h3
-rw-r--r--include/opcode/hppa.h3
-rw-r--r--include/opcode/i370.h2
-rw-r--r--include/opcode/i386.h5
-rw-r--r--include/opcode/i860.h2
-rw-r--r--include/opcode/i960.h52
-rw-r--r--include/opcode/m68k.h3
-rw-r--r--include/opcode/m88k.h2
-rw-r--r--include/opcode/mips.h3
-rw-r--r--include/opcode/mn10300.h2
-rw-r--r--include/opcode/np1.h2
-rw-r--r--include/opcode/ns32k.h2
-rw-r--r--include/opcode/pdp11.h2
-rw-r--r--include/opcode/pj.h2
-rw-r--r--include/opcode/pn.h2
-rw-r--r--include/opcode/ppc.h2
-rw-r--r--include/opcode/pyr.h22
-rw-r--r--include/opcode/s390.h2
-rw-r--r--include/opcode/sparc.h2
-rw-r--r--include/opcode/tic80.h2
-rw-r--r--include/opcode/v850.h2
-rw-r--r--include/opcode/vax.h2
-rw-r--r--include/os9k.h2
-rw-r--r--include/partition.h2
-rw-r--r--include/progress.h2
-rw-r--r--include/remote-sim.h3
-rw-r--r--include/safe-ctype.h2
-rw-r--r--include/sim-d10v.h2
-rw-r--r--include/sort.h2
-rw-r--r--include/splay-tree.h2
-rw-r--r--include/symcat.h2
144 files changed, 2357 insertions, 4497 deletions
diff --git a/include/ChangeLog b/include/ChangeLog
index 70009a4..c1c2dd1 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,7 +1,7 @@
2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
John David Anglin <dave@hiauly1.hia.nrc.ca>
- * include/libiberty.h: Add lbasename.
+ * libiberty.h: Add lbasename.
2001-03-06 Zack Weinberg <zackw@stanford.edu>
@@ -113,10 +113,6 @@
* libiberty.h (ARRAY_SIZE): New macro.
-2000-08-08 Jason Eckhardt <jle@cygnus.com>
-
- * opcode/i860.h: Small formatting adjustments.
-
2000-07-29 Nick Clifton <nickc@cygnus.com>
* os9k.h: Add copyright notice.
@@ -124,30 +120,6 @@
2000-07-22 Jason Eckhardt <jle@cygnus.com>
- * opcode/i860.h (btne, bte, bla): Changed these opcodes
- to use sbroff ('r') instead of split16 ('s').
- (J, K, L, M): New operand types for 16-bit aligned fields.
- (ld.x, {p}fld.x, fst.x, pst.d): Changed these opcodes to
- use I, J, K, L, M instead of just I.
- (T, U): New operand types for split 16-bit aligned fields.
- (st.x): Changed these opcodes to use S, T, U instead of just S.
- (andh, andnoth, orh, xorh): Deleted 3-register forms as they do not
- exist on the i860.
- (pfgt.sd, pfle.sd): Deleted these as they do not exist on the i860.
- (pfeq.ss, pfeq.dd): New opcodes.
- (st.s): Fixed incorrect mask bits.
- (fmlow): Fixed incorrect mask bits.
- (fzchkl, pfzchkl): Fixed incorrect mask bits.
- (faddz, pfaddz): Fixed incorrect mask bits.
- (form, pform): Fixed incorrect mask bits.
- (pfld.l): Fixed incorrect mask bits.
- (fst.q): Fixed incorrect mask bits.
- (all floating point opcodes): Fixed incorrect mask bits for
- handling of dual bit.
-
- * elf/i860.h: New file.
- (elf_i860_reloc_type): Defined ELF32 i860 relocations.
-
* dis-asm.h (print_insn_i860): Add prototype.
2000-07-20 H.J. Lu <hjl@gnu.org>
@@ -166,10 +138,6 @@
* MAINTAINERS: new
-2000-06-30 DJ Delorie <dj@cygnus.com>
-
- * coff/pe.h: clarify a comment
-
2000-06-21 Alex Samuel <samuel@codesourcery.com>
* dyn-string.h (dyn_string_init, dyn_string_new,
@@ -243,10 +211,6 @@ Tue May 30 16:53:34 2000 Andrew Cagney <cagney@b1.cygnus.com>
* ansidecl.h: #define __extension__ to nothing if
GCC_VERSION < 2008.
-Fri May 5 16:51:03 2000 Clinton Popetz <cpopetz@cygnus.com>
-
- * coff/rs6k64.h (U802TOC64MAGIC): Change to U803XTOCMAGIC.
-
2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* demangle.h (demangler_engine): Constify.
@@ -267,10 +231,6 @@ Thu May 4 17:15:26 2000 Philippe De Muyter <phdm@macqel.be>
(cplus_demangle_set_style): New function for setting style.
(cplus_demangle_name_to_style): New function to translate name.
-Mon Apr 24 15:20:51 2000 Clinton Popetz <cpopetz@cygnus.com>
-
- * include/coff/rs6k64.h: New file.
-
2000-04-24 Mark Mitchell <mark@codesourcery.com>
* hashtab.h (hash_pointer): Declare.
@@ -353,11 +313,6 @@ Tue Apr 18 16:22:30 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* dis-asm.h (print_insn_i370): Declare.
-2000-02-22 Chandra Chavva <cchavva@cygnus.com>
-
- * opcode/d30v.h (FLAG_NOT_WITH_ADDSUBppp): Redefined as operation
- cannot be combined in parallel with ADD/SUBppp.
-
Tue Feb 22 15:19:54 2000 Andrew Cagney <cagney@b1.cygnus.com>
* remote-sim.h (sim_trace): Document return values.
@@ -598,11 +553,6 @@ Tue Dec 8 00:30:31 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
(struct dntt_type_svar): add field thread_specific.
(hp_language): add languages modcal and dmpascal.
-Mon Nov 30 15:25:58 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * elf/sh.h (elf_sh_reloc_type): Add R_SH_FIRST_INVALID_RELOC,
- R_SH_LAST_INVALID_RELOC, R_SH_SWITCH8 and R_SH_max.
-
Fri Nov 20 13:14:00 1998 Andrew Cagney <cagney@b1.cygnus.com>
* libiberty.h (basename): Add prototype for FreeBSD.
@@ -657,10 +607,6 @@ Mon Jun 1 13:48:32 1998 Jason Molenda (crash@bugshack.cygnus.com)
* obstack.h: Update to latest FSF version.
-Tue May 26 20:57:43 1998 Stan Cox <scox@equinox.cygnus.com>
-
- * elf/sparc.h (EF_SPARC_LEDATA, R_SPARC_32LE): Added.
-
Tue Feb 24 13:05:02 1998 Doug Evans <devans@canuck.cygnus.com>
* dis-asm.h (disassemble_info): Member `symbol' renamed to `symbols'
@@ -699,10 +645,6 @@ Tue Dec 2 10:20:53 1997 Nick Clifton <nickc@cygnus.com>
* dis-asm.h (disasm_symaddr): New prototype.
-Mon Dec 1 20:24:18 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * coff/sh.h (R_SH_SWITCH8): New.
-
Mon Dec 1 11:29:35 1997 Doug Evans <devans@canuck.cygnus.com>
* callback.h (CB_SYSCALL): Comment out arg names in prototypes.
@@ -831,14 +773,6 @@ Thu May 15 01:24:16 1997 Mark Alexander <marka@cygnus.com>
* obstack.h (obstack_specify_allocation_with_arg, obstack_chunkfun,
obstack_freefun): Eliminate compile warnings in gdb.
-Tue May 13 10:21:14 1997 Nick Clifton <nickc@cygnus.com>
-
- * coff/arm.h (constants): Added new flag bits F_APCS_26 and
- F_APCS_SET for the f_flags field of the filehdr structure. Added new
- flags: F_APCS26, F_ARM_2, F_ARM_3, F_ARM_7, F_ARM_7T to store
- information in the flags field of the internal_f structure used by BFD
- routines.
-
Tue Apr 22 10:24:34 1997 Fred Fish <fnf@cygnus.com>
* floatformat.h (floatformat_byteorders): Add comments for previous
@@ -1187,13 +1121,7 @@ Thu May 18 04:25:50 1995 Ken Raeburn <raeburn@kr-laptop.cygnus.com>
Sat May 13 10:14:08 1995 Steve Chamberlain <sac@slash.cygnus.com>
- * coff/pe.h: New file.
* bfdlink.h (subsytem, stack_heap_parameters): New.
- * coff/i386.h (NT_SECTION_ALIGNMENT, NT_FILE_ALIGNMENT,
- NT_DEF_RESERVE, NT_DEF_COMMIT): New.
- * coff/internal.h (internal_filehdr): New fields for PE.
- (IMAGE_DATA_DIRECTORY): New.
- (internal_aouthdr): New fields for PE.
Thu May 4 14:36:42 1995 Jason Merrill <jason@phydeaux.cygnus.com>
@@ -1268,8 +1196,6 @@ Tue Oct 25 11:38:02 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
Sun Sep 04 17:58:10 1994 Richard Earnshaw (rwe@pegasus.esprit.ec.org)
- * aout/aout64.h: Only define QMAGIC if it isn't already defined.
-
* dis-asm.h: Add support for the ARM.
Wed Aug 10 12:51:41 1994 Doug Evans (dje@canuck.cygnus.com)
@@ -1415,10 +1341,6 @@ Fri Aug 6 17:05:47 1993 David J. Mackenzie (djm@thepub.cygnus.com)
* getopt.h, obstack.h: Update to latest FSF version.
-Mon Aug 2 16:37:14 1993 Stu Grossman (grossman at cygnus.com)
-
- * coff/i386.h: Add Lynx magic number.
-
Mon Aug 2 14:45:29 1993 John Gilmore (gnu@cygnus.com)
* dis-asm.h: Move enum outside of struct defn to avoid warnings.
@@ -1448,10 +1370,6 @@ Thu Jul 15 12:41:15 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
* dis-asm.h: Added declaration of print_insn_m88k.
-Thu Jul 8 09:05:26 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * opcode/h8300.h: Lots of little fixes for the h8/300h.
-
Fri Jul 2 10:31:59 1993 Ian Lance Taylor (ian@cygnus.com)
* ansidecl.h: Use ANSI macros if __mips and _SYSTYPE_SVR4 are
@@ -1476,9 +1394,6 @@ Tue Jun 8 12:16:03 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
Support for H8/300-H
* dis-asm.h (print_insn_h8300, print_insn_h8300h): Declare it.
- * coff/h8300.h: New magic number.
- * coff/internal.h: New relocations.
- * opcode/h8300.h: Lots of new opcodes.
Tue Jun 1 07:35:03 1993 Ken Raeburn (raeburn@kr-pc.cygnus.com)
@@ -1757,7 +1672,7 @@ Mon Jan 27 22:01:13 1992 Steve Chamberlain (sac at cygnus.com)
Wed Dec 18 17:19:44 1991 Stu Grossman (grossman at cygnus.com)
- * bfd.h, ieee.h, opcode/m68k.h, opcode/sparc.h: ANSIfy enums.
+ * bfd.h, ieee.h: ANSIfy enums.
Thu Dec 12 20:59:56 1991 John Gilmore (gnu at cygnus.com)
diff --git a/include/ansidecl.h b/include/ansidecl.h
index e7852c6..545a621 100644
--- a/include/ansidecl.h
+++ b/include/ansidecl.h
@@ -1,5 +1,6 @@
/* ANSI and traditional C compatability macros
- Copyright 1991, 1992, 1996, 1999 Free Software Foundation, Inc.
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software; you can redistribute it and/or modify
diff --git a/include/aout/ChangeLog b/include/aout/ChangeLog
index 1645a5a..f107b84 100644
--- a/include/aout/ChangeLog
+++ b/include/aout/ChangeLog
@@ -37,6 +37,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.
@@ -171,20 +175,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/include/aout/adobe.h b/include/aout/adobe.h
index 3d2f15c..c751d10 100644
--- a/include/aout/adobe.h
+++ b/include/aout/adobe.h
@@ -1,4 +1,20 @@
-/* `a.out.adobe' differences from standard a.out files */
+/* `a.out.adobe' differences from standard 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. */
#ifndef __A_OUT_ADOBE_H__
#define __A_OUT_ADOBE_H__
diff --git a/include/aout/aout64.h b/include/aout/aout64.h
index bec8440..a8a8cd1 100644
--- a/include/aout/aout64.h
+++ b/include/aout/aout64.h
@@ -1,4 +1,20 @@
-/* `a.out' object-file definitions, including extensions to 64-bit fields */
+/* `a.out' object-file definitions, including extensions to 64-bit fields
+
+ 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 __A_OUT_64_H__
#define __A_OUT_64_H__
diff --git a/include/aout/ar.h b/include/aout/ar.h
index 7b5dcda..15d534c 100644
--- a/include/aout/ar.h
+++ b/include/aout/ar.h
@@ -1,4 +1,20 @@
-/* archive file definition for GNU software */
+/* archive file definition for GNU software
+
+ 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. */
/* So far this is correct for BSDish archives. Don't forget that
files must begin on an even byte boundary. */
diff --git a/include/aout/dynix3.h b/include/aout/dynix3.h
index efeeebf..b09d5d7 100644
--- a/include/aout/dynix3.h
+++ b/include/aout/dynix3.h
@@ -1,44 +1,59 @@
-/*
- * a.out specifics for Sequent Symmetry running Dynix 3.x
- */
+/* a.out specifics for Sequent Symmetry running Dynix 3.x
+
+ 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 A_OUT_DYNIX3_H
#define A_OUT_DYNIX3_H
#define external_exec dynix_external_exec
/* struct exec for Dynix 3
- *
- * a_gdtbl and a_bootstrap are only for standalone binaries.
- * Shared data fields are not supported by the kernel as of Dynix 3.1,
- * but are supported by Dynix compiler programs.
- */
-struct dynix_external_exec {
- unsigned char e_info[4];
- unsigned char e_text[4];
- unsigned char e_data[4];
- unsigned char e_bss[4];
- unsigned char e_syms[4];
- unsigned char e_entry[4];
- unsigned char e_trsize[4];
- unsigned char e_drsize[4];
- unsigned char e_g_code[8], e_g_data[8], e_g_desc[8];
- unsigned char e_shdata[4];
- unsigned char e_shbss[4];
- unsigned char e_shdrsize[4];
- unsigned char e_bootstrap[44];
- unsigned char e_reserved[12];
- unsigned char e_version[4];
-};
+
+ a_gdtbl and a_bootstrap are only for standalone binaries.
+ Shared data fields are not supported by the kernel as of Dynix 3.1,
+ but are supported by Dynix compiler programs. */
+struct dynix_external_exec
+ {
+ unsigned char e_info[4];
+ unsigned char e_text[4];
+ unsigned char e_data[4];
+ unsigned char e_bss[4];
+ unsigned char e_syms[4];
+ unsigned char e_entry[4];
+ unsigned char e_trsize[4];
+ unsigned char e_drsize[4];
+ unsigned char e_g_code[8];
+ unsigned char e_g_data[8];
+ unsigned char e_g_desc[8];
+ unsigned char e_shdata[4];
+ unsigned char e_shbss[4];
+ unsigned char e_shdrsize[4];
+ unsigned char e_bootstrap[44];
+ unsigned char e_reserved[12];
+ unsigned char e_version[4];
+ };
#define EXEC_BYTES_SIZE (128)
-/*
- * All executables under Dynix are demand paged with read-only text,
- * Thus no NMAGIC.
- *
- * ZMAGIC has a page of 0s at virtual 0,
- * XMAGIC has an invalid page at virtual 0
- */
+/* All executables under Dynix are demand paged with read-only text,
+ Thus no NMAGIC.
+
+ ZMAGIC has a page of 0s at virtual 0,
+ XMAGIC has an invalid page at virtual 0. */
#define OMAGIC 0x12eb /* .o */
#define ZMAGIC 0x22eb /* zero @ 0, demand load */
#define XMAGIC 0x32eb /* invalid @ 0, demand load */
diff --git a/include/aout/encap.h b/include/aout/encap.h
index b215d49..1381557 100644
--- a/include/aout/encap.h
+++ b/include/aout/encap.h
@@ -1,5 +1,5 @@
/* Yet Another Try at encapsulating bsd object files in coff.
- Copyright (C) 1988, 1989, 1991 Free Software Foundation, Inc.
+ Copyright 1988, 1989, 1991 Free Software Foundation, Inc.
Written by Pace Willisson 12/9/88
This file is obsolete. It needs to be converted to just define a bunch
diff --git a/include/aout/host.h b/include/aout/host.h
index 8e36212..442981a 100644
--- a/include/aout/host.h
+++ b/include/aout/host.h
@@ -1,22 +1,42 @@
-/* Parameters about the a.out format, based on the host system on which
- the program is compiled. */
+/* host.h - Parameters about the a.out format, based on the host system
+ on which the program is compiled.
+
+ 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. */
/* Address of data segment in memory after it is loaded.
- It is up to you to define SEGMENT_SIZE
- on machines not listed here. */
+ It is up to you to define SEGMENT_SIZE on machines not listed here. */
#ifndef SEGMENT_SIZE
+
#if defined(hp300) || defined(pyr)
#define SEGMENT_SIZE page_size
#endif
+
#ifdef sony
#define SEGMENT_SIZE 0x1000
#endif /* Sony. */
+
#ifdef is68k
#define SEGMENT_SIZE 0x20000
#endif
+
#if defined(m68k) && defined(PORTAR)
#define TARGET_PAGE_SIZE 0x400
#define SEGMENT_SIZE TARGET_PAGE_SIZE
#endif
+
#endif /*!defined(SEGMENT_SIZE)*/
diff --git a/include/aout/hp300hpux.h b/include/aout/hp300hpux.h
index 44d5196..451b8946 100644
--- a/include/aout/hp300hpux.h
+++ b/include/aout/hp300hpux.h
@@ -1,5 +1,5 @@
/* Special version of <a.out.h> for use under hp-ux.
- Copyright (C) 1988,1993 Free Software Foundation, Inc. */
+ Copyright 1988, 1993, 1995 Free Software Foundation, Inc.
struct hp300hpux_exec_bytes
{
diff --git a/include/aout/ranlib.h b/include/aout/ranlib.h
index 9826005..e4603ed 100644
--- a/include/aout/ranlib.h
+++ b/include/aout/ranlib.h
@@ -1,5 +1,5 @@
/* ranlib.h -- archive library index member definition for GNU.
- Copyright 1990-1991 Free Software Foundation, Inc.
+ Copyright 1990, 1991 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
diff --git a/include/aout/reloc.h b/include/aout/reloc.h
index 563c552..eca3f59 100644
--- a/include/aout/reloc.h
+++ b/include/aout/reloc.h
@@ -1,5 +1,5 @@
/* reloc.h -- Header file for relocation information.
- Copyright 1989-1991 Free Software Foundation, Inc.
+ Copyright 1989, 1990, 1991 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
diff --git a/include/aout/stab.def b/include/aout/stab.def
index 9c2d2dd..67bde35 100644
--- a/include/aout/stab.def
+++ b/include/aout/stab.def
@@ -1,5 +1,5 @@
/* Table of DBX symbol codes for the GNU system.
- Copyright (C) 1988, 91, 92, 93, 94, 95, 96, 1998
+ Copyright 1988, 1991, 1992, 1993, 1994, 1996, 1998
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
diff --git a/include/aout/stab_gnu.h b/include/aout/stab_gnu.h
index 7d18e14..c62ac6e 100644
--- a/include/aout/stab_gnu.h
+++ b/include/aout/stab_gnu.h
@@ -1,3 +1,20 @@
+/* gnu_stab.h Definitions for GNU extensions to STABS
+
+ 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 __GNU_STAB__
/* Indicate the GNU stab.h is in use. */
diff --git a/include/aout/sun4.h b/include/aout/sun4.h
index f42a0dd..623afc1 100644
--- a/include/aout/sun4.h
+++ b/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/include/bfdlink.h b/include/bfdlink.h
index ae96323..29eeb66 100644
--- a/include/bfdlink.h
+++ b/include/bfdlink.h
@@ -1,5 +1,6 @@
/* bfdlink.h -- header file for BFD link routines
- Copyright 1993, 94, 95, 96, 97, 1999 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
+ Free Software Foundation, Inc.
Written by Steve Chamberlain and Ian Lance Taylor, Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
diff --git a/include/bout.h b/include/bout.h
index 8fc28cc..a69e280 100644
--- a/include/bout.h
+++ b/include/bout.h
@@ -1,79 +1,91 @@
-/*
- * This file is a modified version of 'a.out.h'. It is to be used in all
- * GNU tools modified to support the i80960 (or tools that operate on
- * object files created by such tools).
- *
- * All i80960 development is done in a CROSS-DEVELOPMENT environment. I.e.,
- * object code is generated on, and executed under the direction of a symbolic
- * debugger running on, a host system. We do not want to be subject to the
- * vagaries of which host it is or whether it supports COFF or a.out format,
- * or anything else. We DO want to:
- *
- * o always generate the same format object files, regardless of host.
- *
- * o have an 'a.out' header that we can modify for our own purposes
- * (the 80960 is typically an embedded processor and may require
- * enhanced linker support that the normal a.out.h header can't
- * accommodate).
- *
- * As for byte-ordering, the following rules apply:
- *
- * o Text and data that is actually downloaded to the target is always
- * in i80960 (little-endian) order.
- *
- * o All other numbers (in the header, symbols, relocation directives)
- * are in host byte-order: object files CANNOT be lifted from a
- * little-end host and used on a big-endian (or vice versa) without
- * modification.
- * ==> THIS IS NO LONGER TRUE USING BFD. WE CAN GENERATE ANY BYTE ORDER
- * FOR THE HEADER, AND READ ANY BYTE ORDER. PREFERENCE WOULD BE TO
- * USE LITTLE-ENDIAN BYTE ORDER THROUGHOUT, REGARDLESS OF HOST. <==
- *
- * o The downloader ('comm960') takes care to generate a pseudo-header
- * with correct (i80960) byte-ordering before shipping text and data
- * off to the NINDY monitor in the target systems. Symbols and
- * relocation info are never sent to the target.
- */
+/* This file is a modified version of 'a.out.h'. It is to be used in all
+ GNU tools modified to support the i80960 (or tools that operate on
+ object files created by such tools).
+
+ 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. */
+
+/* All i80960 development is done in a CROSS-DEVELOPMENT environment. I.e.,
+ object code is generated on, and executed under the direction of a symbolic
+ debugger running on, a host system. We do not want to be subject to the
+ vagaries of which host it is or whether it supports COFF or a.out format,
+ or anything else. We DO want to:
+
+ o always generate the same format object files, regardless of host.
+
+ o have an 'a.out' header that we can modify for our own purposes
+ (the 80960 is typically an embedded processor and may require
+ enhanced linker support that the normal a.out.h header can't
+ accommodate).
+
+ As for byte-ordering, the following rules apply:
+
+ o Text and data that is actually downloaded to the target is always
+ in i80960 (little-endian) order.
+
+ o All other numbers (in the header, symbols, relocation directives)
+ are in host byte-order: object files CANNOT be lifted from a
+ little-end host and used on a big-endian (or vice versa) without
+ modification.
+ ==> THIS IS NO LONGER TRUE USING BFD. WE CAN GENERATE ANY BYTE ORDER
+ FOR THE HEADER, AND READ ANY BYTE ORDER. PREFERENCE WOULD BE TO
+ USE LITTLE-ENDIAN BYTE ORDER THROUGHOUT, REGARDLESS OF HOST. <==
+
+ o The downloader ('comm960') takes care to generate a pseudo-header
+ with correct (i80960) byte-ordering before shipping text and data
+ off to the NINDY monitor in the target systems. Symbols and
+ relocation info are never sent to the target. */
#define BMAGIC 0415
/* We don't accept the following (see N_BADMAG macro).
- * They're just here so GNU code will compile.
- */
+ They're just here so GNU code will compile. */
#define OMAGIC 0407 /* old impure format */
#define NMAGIC 0410 /* read-only text */
#define ZMAGIC 0413 /* demand load format */
/* FILE HEADER
- * All 'lengths' are given as a number of bytes.
- * All 'alignments' are for relinkable files only; an alignment of
- * 'n' indicates the corresponding segment must begin at an
- * address that is a multiple of (2**n).
- */
-struct external_exec {
- /* Standard stuff */
- unsigned char e_info[4]; /* Identifies this as a b.out file */
- unsigned char e_text[4]; /* Length of text */
- unsigned char e_data[4]; /* Length of data */
- unsigned char e_bss[4]; /* Length of uninitialized data area */
- unsigned char e_syms[4]; /* Length of symbol table */
- unsigned char e_entry[4]; /* Runtime start address */
- unsigned char e_trsize[4]; /* Length of text relocation info */
- unsigned char e_drsize[4]; /* Length of data relocation info */
+ All 'lengths' are given as a number of bytes.
+ All 'alignments' are for relinkable files only; an alignment of
+ 'n' indicates the corresponding segment must begin at an
+ address that is a multiple of (2**n). */
+struct external_exec
+ {
+ /* Standard stuff */
+ unsigned char e_info[4]; /* Identifies this as a b.out file */
+ unsigned char e_text[4]; /* Length of text */
+ unsigned char e_data[4]; /* Length of data */
+ unsigned char e_bss[4]; /* Length of uninitialized data area */
+ unsigned char e_syms[4]; /* Length of symbol table */
+ unsigned char e_entry[4]; /* Runtime start address */
+ unsigned char e_trsize[4]; /* Length of text relocation info */
+ unsigned char e_drsize[4]; /* Length of data relocation info */
- /* Added for i960 */
- unsigned char e_tload[4]; /* Text runtime load address */
- unsigned char e_dload[4]; /* Data runtime load address */
- unsigned char e_talign[1]; /* Alignment of text segment */
- unsigned char e_dalign[1]; /* Alignment of data segment */
- unsigned char e_balign[1]; /* Alignment of bss segment */
- unsigned char e_relaxable[1]; /* Assembled with enough info to allow linker to relax */
-};
+ /* Added for i960 */
+ unsigned char e_tload[4]; /* Text runtime load address */
+ unsigned char e_dload[4]; /* Data runtime load address */
+ unsigned char e_talign[1]; /* Alignment of text segment */
+ unsigned char e_dalign[1]; /* Alignment of data segment */
+ unsigned char e_balign[1]; /* Alignment of bss segment */
+ unsigned char e_relaxable[1];/* Assembled with enough info to allow linker to relax */
+ };
#define EXEC_BYTES_SIZE (sizeof (struct external_exec))
/* These macros use the a_xxx field names, since they operate on the exec
- structure after it's been byte-swapped and realigned on the host machine. */
+ structure after it's been byte-swapped and realigned on the host machine. */
#define N_BADMAG(x) (((x).a_info)!=BMAGIC)
#define N_TXTOFF(x) EXEC_BYTES_SIZE
#define N_DATOFF(x) ( N_TXTOFF(x) + (x).a_text )
@@ -90,23 +102,24 @@ struct external_exec {
#define N_TXTADDR(x) 0
#endif
-/* A single entry in the symbol table
- */
-struct nlist {
- union {
- char *n_name;
- struct nlist *n_next;
- long n_strx; /* Index into string table */
- } n_un;
- unsigned char n_type; /* See below */
- char n_other; /* Used in i80960 support -- see below */
- short n_desc;
- unsigned long n_value;
-};
+/* A single entry in the symbol table. */
+struct nlist
+ {
+ union
+ {
+ char* n_name;
+ struct nlist * n_next;
+ long n_strx; /* Index into string table */
+ } n_un;
+
+ unsigned char n_type; /* See below */
+ char n_other; /* Used in i80960 support -- see below */
+ short n_desc;
+ unsigned long n_value;
+ };
-/* Legal values of n_type
- */
+/* Legal values of n_type. */
#define N_UNDF 0 /* Undefined symbol */
#define N_ABS 2 /* Absolute symbol */
#define N_TEXT 4 /* Text symbol */
@@ -119,34 +132,33 @@ struct nlist {
#define N_STAB 0340 /* Mask for all bits used for SDB entries */
/* MEANING OF 'n_other'
- *
- * If non-zero, the 'n_other' fields indicates either a leaf procedure or
- * a system procedure, as follows:
- *
- * 1 <= n_other <= 32 :
- * The symbol is the entry point to a system procedure.
- * 'n_value' is the address of the entry, as for any other
- * procedure. The system procedure number (which can be used in
- * a 'calls' instruction) is (n_other-1). These entries come from
- * '.sysproc' directives.
- *
- * n_other == N_CALLNAME
- * the symbol is the 'call' entry point to a leaf procedure.
- * The *next* symbol in the symbol table must be the corresponding
- * 'bal' entry point to the procedure (see following). These
- * entries come from '.leafproc' directives in which two different
- * symbols are specified (the first one is represented here).
- *
- *
- * n_other == N_BALNAME
- * the symbol is the 'bal' entry point to a leaf procedure.
- * These entries result from '.leafproc' directives in which only
- * one symbol is specified, or in which the same symbol is
- * specified twice.
- *
- * Note that an N_CALLNAME entry *must* have a corresponding N_BALNAME entry,
- * but not every N_BALNAME entry must have an N_CALLNAME entry.
- */
+
+ If non-zero, the 'n_other' fields indicates either a leaf procedure or
+ a system procedure, as follows:
+
+ 1 <= n_other <= 32 :
+ The symbol is the entry point to a system procedure.
+ 'n_value' is the address of the entry, as for any other
+ procedure. The system procedure number (which can be used in
+ a 'calls' instruction) is (n_other-1). These entries come from
+ '.sysproc' directives.
+
+ n_other == N_CALLNAME
+ the symbol is the 'call' entry point to a leaf procedure.
+ The *next* symbol in the symbol table must be the corresponding
+ 'bal' entry point to the procedure (see following). These
+ entries come from '.leafproc' directives in which two different
+ symbols are specified (the first one is represented here).
+
+
+ n_other == N_BALNAME
+ the symbol is the 'bal' entry point to a leaf procedure.
+ These entries result from '.leafproc' directives in which only
+ one symbol is specified, or in which the same symbol is
+ specified twice.
+
+ Note that an N_CALLNAME entry *must* have a corresponding N_BALNAME entry,
+ but not every N_BALNAME entry must have an N_CALLNAME entry. */
#define N_CALLNAME ((char)-1)
#define N_BALNAME ((char)-2)
#define IS_CALLNAME(x) (N_CALLNAME == (x))
@@ -154,29 +166,26 @@ struct nlist {
#define IS_OTHER(x) ((x)>0 && (x) <=32)
#define b_out_relocation_info relocation_info
-struct relocation_info {
- int r_address; /* File address of item to be relocated */
- unsigned
+struct relocation_info
+ {
+ int r_address; /* File address of item to be relocated. */
+ unsigned
#define r_index r_symbolnum
- r_symbolnum:24,/* Index of symbol on which relocation is based,
- * if r_extern is set. Otherwise set to
- * either N_TEXT, N_DATA, or N_BSS to
- * indicate section on which relocation is
- * based.
- */
- r_pcrel:1, /* 1 => relocate PC-relative; else absolute
- * On i960, pc-relative implies 24-bit
- * address, absolute implies 32-bit.
- */
- r_length:2, /* Number of bytes to relocate:
- * 0 => 1 byte
- * 1 => 2 bytes -- used for 13 bit pcrel
- * 2 => 4 bytes
- */
- r_extern:1,
- r_bsr:1, /* Something for the GNU NS32K assembler */
- r_disp:1, /* Something for the GNU NS32K assembler */
- r_callj:1, /* 1 if relocation target is an i960 'callj' */
- r_relaxable:1; /* 1 if enough info is left to relax
- the data */
+ r_symbolnum:24, /* Index of symbol on which relocation is based,
+ if r_extern is set. Otherwise set to
+ either N_TEXT, N_DATA, or N_BSS to
+ indicate section on which relocation is
+ based. */
+ r_pcrel:1, /* 1 => relocate PC-relative; else absolute
+ On i960, pc-relative implies 24-bit
+ address, absolute implies 32-bit. */
+ r_length:2, /* Number of bytes to relocate:
+ 0 => 1 byte
+ 1 => 2 bytes -- used for 13 bit pcrel
+ 2 => 4 bytes. */
+ r_extern:1,
+ r_bsr:1, /* Something for the GNU NS32K assembler. */
+ r_disp:1, /* Something for the GNU NS32K assembler. */
+ r_callj:1, /* 1 if relocation target is an i960 'callj'. */
+ r_relaxable:1; /* 1 if enough info is left to relax the data. */
};
diff --git a/include/coff/ChangeLog b/include/coff/ChangeLog
index aace5bd..4326544 100644
--- a/include/coff/ChangeLog
+++ b/include/coff/ChangeLog
@@ -1,3 +1,31 @@
+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.
@@ -5,7 +33,7 @@
2001-01-23 H.J. Lu <hjl@gnu.org>
- * include/coff/pe.h (struct external_PEI_DOS_hdr): New.
+ * pe.h (struct external_PEI_DOS_hdr): New.
(struct external_PEI_IMAGE_hdr): New.
2000-12-11 Alan Modra <alan@linuxcare.com.au>
@@ -20,6 +48,14 @@
* pe.h: Clarify a comment.
+2000-05-05 Clinton Popetz <cpopetz@cygnus.com>
+
+ * rs6k64.h (U802TOC64MAGIC): Change to U803XTOCMAGIC.
+
+2000-04-24 Clinton Popetz <cpopetz@cygnus.com>
+
+ * rs6k64.h: New file.
+
2000-04-17 Timothy Wall <twall@cygnus.com>
* ti.h: Load page cleanup.
@@ -134,7 +170,7 @@ Wed Jun 2 18:08:18 1999 Richard Henderson <rth@cygnus.com>
Mon May 17 13:35:35 1999 Stan Cox <scox@cygnus.com>
- * coff/arm.h (F_PIC, F_ARM_2, F_ARM_2a, F_ARM_3, F_ARM_3M,
+ * arm.h (F_PIC, F_ARM_2, F_ARM_2a, F_ARM_3, F_ARM_3M,
F_ARM_4, F_ARM_4T, F_APCS26): Changed values to distinguish
F_ARM_2a, F_ARM_3M, F_ARM_4T.
@@ -158,7 +194,7 @@ Sun Dec 6 21:36:37 1998 Mark Elbrecht <snowball3@usa.net>
Wed Jan 27 13:35:35 1999 Stan Cox <scox@cygnus.com>
- * coff/arm.h (F_PIC_INT, F_ARM_2, F_ARM_3, F_ARM_4, F_APCS26):
+ * arm.h (F_PIC_INT, F_ARM_2, F_ARM_3, F_ARM_4, F_APCS26):
Changed values to avoid clashing with IMAGE_FILE_* coff header
flag values.
@@ -184,6 +220,10 @@ Tue Dec 2 10:21:40 1997 Nick Clifton <nickc@cygnus.com>
* arm.h (COFFARM): New define.
+Mon Dec 1 20:24:18 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * sh.h (R_SH_SWITCH8): New.
+
Sat Nov 22 15:10:14 1997 Nick Clifton <nickc@cygnus.com>
* internal.h (C_THUMBEXTFUNC, C_THUMBSTATFUNC): Constants to
@@ -213,6 +253,14 @@ Mon May 26 14:07:55 1997 Ian Lance Taylor <ian@cygnus.com>
* tic80.h (R_PPL16B): Correct value.
+Tue May 13 10:21:14 1997 Nick Clifton <nickc@cygnus.com>
+
+ * arm.h (constants): Added new flag bits F_APCS_26 and
+ F_APCS_SET for the f_flags field of the filehdr structure. Added new
+ flags: F_APCS26, F_ARM_2, F_ARM_3, F_ARM_7, F_ARM_7T to store
+ information in the flags field of the internal_f structure used by BFD
+ routines.
+
Sat May 3 08:24:59 1997 Fred Fish <fnf@cygnus.com>
* internal.h (C_UEXT, C_STATLAB, C_EXTLAB, C_SYSTEM):
@@ -347,8 +395,8 @@ Thu Nov 9 14:08:30 1995 Ian Lance Taylor <ian@cygnus.com>
Tue Nov 7 14:38:45 1995 Kim Knuttila <krk@cygnus.com>
- * coff/powerpc.h (IMAGE_NT_OPTIONAL_HDR_MAGIC): Added define.
- * coff/pe.h: Added defines for file level flags
+ * powerpc.h (IMAGE_NT_OPTIONAL_HDR_MAGIC): Added define.
+ * pe.h: Added defines for file level flags
Mon Nov 6 17:28:01 1995 Harry Dolan <dolan@ssd.intel.com>
@@ -472,6 +520,15 @@ Tue May 16 15:08:20 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
* internal.h (NT_subsystem, NT_stack_heap): Now extern.
+Sat May 13 10:14:08 1995 Steve Chamberlain <sac@slash.cygnus.com>
+
+ * pe.h: New file.
+ * i386.h (NT_SECTION_ALIGNMENT, NT_FILE_ALIGNMENT,
+ NT_DEF_RESERVE, NT_DEF_COMMIT): New.
+ * internal.h (internal_filehdr): New fields for PE.
+ (IMAGE_DATA_DIRECTORY): New.
+ (internal_aouthdr): New fields for PE.
+
Tue Feb 14 17:59:37 1995 Ian Lance Taylor <ian@cygnus.com>
* ecoff.h (struct ecoff_fdrtab_entry): Define.
@@ -635,10 +692,10 @@ Wed Oct 13 15:52:34 1993 Ken Raeburn (raeburn@cygnus.com)
Sun Oct 10 17:27:10 1993 Troy Rollo (troy@cbme.unsw.edu.au)
- * coff/internal.h: Added o_sri, o_inlib and o_vid for Apollos
- as well as R_DIR16.
+ * internal.h: Added o_sri, o_inlib and o_vid for Apollos as well
+ as R_DIR16.
- * coff/apollo.h: New file
+ * apollo.h: New file
Mon Oct 11 17:16:48 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
@@ -709,6 +766,10 @@ Thu Aug 12 11:24:42 1993 Ian Lance Taylor (ian@cygnus.com)
* ecoff.h: Moved MIPS reloc definitions from here...
* mips.h: to here.
+Mon Aug 2 16:37:14 1993 Stu Grossman (grossman at cygnus.com)
+
+ * i386.h: Add Lynx magic number.
+
Tue Aug 3 11:17:53 1993 Ian Lance Taylor (ian@cygnus.com)
* alpha.h: Corrected external symbolic debugging structures to
@@ -751,6 +812,12 @@ Wed Jun 9 15:09:09 1993 Ian Lance Taylor (ian@cygnus.com)
* mips.h (OMAGIC): Define.
+Tue Jun 8 12:16:03 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
+
+ Support for H8/300-H
+ * h8300.h: New magic number.
+ * internal.h: New relocations.
+
Mon Apr 26 18:04:47 1993 Steve Chamberlain (sac@thepub.cygnus.com)
* internal.h, sh.h: Support for SH.
@@ -928,8 +995,8 @@ Thu Feb 6 11:33:32 1992 Steve Chamberlain (sac at rtl.cygnus.com)
Sat Nov 30 20:38:35 1991 Steve Chamberlain (sac at rtl.cygnus.com)
- * ChangeLog, a29k.h, h8300.h, i386.h, i960.h, internal.h, m68k.h,
- m88k.h, mips.h, rs6000.h: move from above coff-<foo>.h
+ * a29k.h, h8300.h, i386.h, i960.h, internal.h, m68k.h, m88k.h,
+ mips.h, rs6000.h: Move from above coff-<foo>.h.
Local Variables:
diff --git a/include/coff/a29k.h b/include/coff/a29k.h
index 8c3a646..3b601f8 100644
--- a/include/coff/a29k.h
+++ b/include/coff/a29k.h
@@ -1,32 +1,29 @@
/* COFF spec for AMD 290*0
- Contributed by David Wood @ New York University.
- */
+
+ 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.
+
+ Contributed by David Wood @ New York University. */
#ifndef AMD
# define AMD
#endif
-/****************************************************************/
-
-/*
-** File Header and related definitions
-*/
-
-struct external_filehdr
-{
- char f_magic[2]; /* magic number */
- char f_nscns[2]; /* number of sections */
- char f_timdat[4]; /* time & date stamp */
- char f_symptr[4]; /* file pointer to symtab */
- char f_nsyms[4]; /* number of symtab entries */
- char f_opthdr[2]; /* sizeof(optional hdr) */
- char f_flags[2]; /* flags */
-};
-
-#define FILHDR struct external_filehdr
-#define FILHSZ 20
-
-/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
+#define L_LNNO_SIZE 2
+#include "coff/external.h"
/*
** Magic numbers for Am29000
@@ -36,11 +33,10 @@ struct external_filehdr
#define SIPFBOMAGIC 0572 /* Am29000 (Byte 0 is MSB) */
#define SIPRBOMAGIC 0573 /* Am29000 (Byte 0 is LSB) */
-
#define A29K_MAGIC_BIG SIPFBOMAGIC
#define A29K_MAGIC_LITTLE SIPRBOMAGIC
-#define A29KBADMAG(x) (((x).f_magic!=A29K_MAGIC_BIG) && \
- ((x).f_magic!=A29K_MAGIC_LITTLE))
+#define A29KBADMAG(x) ( ((x).f_magic != A29K_MAGIC_BIG) && \
+ ((x).f_magic != A29K_MAGIC_LITTLE))
#define OMAGIC A29K_MAGIC_BIG
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
@@ -54,61 +50,17 @@ struct external_filehdr
/*--------------------------------------------------------------*/
-/*
-** Optional (a.out) header
-*/
-
-typedef struct external_aouthdr
-{
- char magic[2]; /* type of file */
- char vstamp[2]; /* version stamp */
- char tsize[4]; /* text size in bytes, padded to FW bdry*/
- char dsize[4]; /* initialized data " " */
- char bsize[4]; /* uninitialized data " " */
- char entry[4]; /* entry pt. */
- char text_start[4]; /* base of text used for this file */
- char data_start[4]; /* base of data used for this file */
-} AOUTHDR;
-
-#define AOUTSZ 28
-#define AOUTHDRSZ 28
/* aouthdr magic numbers */
#define NMAGIC 0410 /* separate i/d executable */
#define SHMAGIC 0406 /* NYU/Ultra3 shared data executable
(writable text) */
-
#define _ETEXT "_etext"
/*--------------------------------------------------------------*/
-/*
-** Section header and related definitions
-*/
-
-struct external_scnhdr
-{
- char s_name[8]; /* section name */
- char s_paddr[4]; /* physical address, aliased s_nlib */
- char s_vaddr[4]; /* virtual address */
- char s_size[4]; /* section size */
- char s_scnptr[4]; /* file ptr to raw data for section */
- char s_relptr[4]; /* file ptr to relocation */
- char s_lnnoptr[4]; /* file ptr to line numbers */
- char s_nreloc[2]; /* number of relocation entries */
- char s_nlnno[2]; /* number of line number entries*/
- char s_flags[4]; /* flags */
-};
-#define SCNHDR struct external_scnhdr
-#define SCNHSZ 40
-
-/*
- * names of "special" sections
- */
-#define _TEXT ".text"
-#define _DATA ".data"
-#define _BSS ".bss"
+/* More names of "special" sections. */
#define _LIT ".lit"
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
@@ -134,7 +86,8 @@ struct external_scnhdr
** Relocation information declaration and related definitions
*/
-struct external_reloc {
+struct external_reloc
+{
char r_vaddr[4]; /* (virtual) address of reference */
char r_symndx[4]; /* index into symbol table */
char r_type[2]; /* relocation type */
@@ -183,49 +136,6 @@ The constant fields of the instruction are set to zero.
/*--------------------------------------------------------------*/
-/*
-** Line number entry declaration and related definitions
-*/
-
-struct external_lineno
-{
- union {
- char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/
- char l_paddr[4]; /* (physical) address of line number */
- } l_addr;
- char l_lnno[2]; /* line number */
-};
-
-#define LINENO struct external_lineno
-#define LINESZ 6 /* sizeof (LINENO) */
-
-/*--------------------------------------------------------------*/
-
-/*
-** Symbol entry declaration and related definitions
-*/
-
-#define E_SYMNMLEN 8 /* Number of characters in a symbol name */
-
-struct external_syment
-{
- union {
- char e_name[E_SYMNMLEN];
- struct {
- char e_zeroes[4];
- char e_offset[4];
- } e;
- } e;
- char e_value[4];
- char e_scnum[2];
- char e_type[2];
- char e_sclass[1];
- char e_numaux[1];
-};
-
-#define SYMENT struct external_syment
-#define SYMESZ 18
-
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
/*
@@ -235,71 +145,3 @@ struct external_syment
#define C_GLBLREG 19 /* global register */
#define C_EXTREG 20 /* external global register */
#define C_DEFREG 21 /* ext. def. of global register */
-
-
-/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
-
-/*
-** Derived symbol mask/shifts.
-*/
-
-#define N_BTMASK (0xf)
-#define N_BTSHFT (4)
-#define N_TMASK (0x30)
-#define N_TSHIFT (2)
-
-/*--------------------------------------------------------------*/
-
-/*
-** Auxiliary symbol table entry declaration and related
-** definitions.
-*/
-
-#define E_FILNMLEN 14 /* # characters in a file name */
-#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
-
-union external_auxent {
- struct {
- char x_tagndx[4]; /* str, un, or enum tag indx */
- union {
- struct {
- char x_lnno[2]; /* declaration line number */
- char x_size[2]; /* str/union/array size */
- } x_lnsz;
- char x_fsize[4]; /* size of function */
- } x_misc;
- union {
- struct { /* if ISFCN, tag, or .bb */
- char x_lnnoptr[4]; /* ptr to fcn line # */
- char x_endndx[4]; /* entry ndx past block end */
- } x_fcn;
- struct { /* if ISARY, up to 4 dimen. */
- char x_dimen[E_DIMNUM][2];
- } x_ary;
- } x_fcnary;
- char x_tvndx[2]; /* tv index */
- } x_sym;
-
- union {
- char x_fname[E_FILNMLEN];
- struct {
- char x_zeroes[4];
- char x_offset[4];
- } x_n;
- } x_file;
-
- struct {
- char x_scnlen[4]; /* section length */
- char x_nreloc[2]; /* # relocation entries */
- char x_nlinno[2]; /* # line numbers */
- } x_scn;
-
- struct {
- char x_tvfill[4]; /* tv fill value */
- char x_tvlen[2]; /* length of .tv */
- char x_tvran[2][2]; /* tv range */
- } x_tv; /* info about .tv section (in auxent of symbol .tv)) */
-};
-
-#define AUXENT union external_auxent
-#define AUXESZ 18
diff --git a/include/coff/alpha.h b/include/coff/alpha.h
index 076cbcb..e5210a5 100644
--- a/include/coff/alpha.h
+++ b/include/coff/alpha.h
@@ -1,9 +1,26 @@
/* ECOFF support on Alpha machines.
- coff/ecoff.h must be included before this file. */
-
+ coff/ecoff.h must be included before this file.
+
+ 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. */
+
/********************** 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 */
@@ -28,7 +45,6 @@ struct external_filehdr {
/********************** AOUT "OPTIONAL HEADER" **********************/
-
typedef struct external_aouthdr
{
unsigned char magic[2]; /* type of file */
@@ -54,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 */
@@ -72,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];
@@ -150,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];
@@ -180,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/include/coff/apollo.h b/include/coff/apollo.h
index d1347f1..4628459 100644
--- a/include/coff/apollo.h
+++ b/include/coff/apollo.h
@@ -1,17 +1,24 @@
-/*** coff information for Apollo M68K */
-
-/********************** 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 */
-};
-
+/* coff information for Apollo M68K
+
+ 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. */
+
+#define DO_NOT_DEFINE_AOUTHDR
+#define L_LNNO_SIZE 2
+#include "coff/external.h"
/* Motorola 68000/68008/68010/68020 */
#define MC68MAGIC 0520
@@ -32,11 +39,6 @@ struct external_filehdr {
((x).f_magic!=MC68KROMAGIC) && ((x).f_magic!=MC68KPGMAGIC) && ((x).f_magic!=M68MAGIC) && ((x).f_magic!=M68TVMAGIC) && \
((x).f_magic!=APOLLOM68KMAGIC) )
-
-#define FILHDR struct external_filehdr
-#define FILHSZ 20
-
-
/********************** AOUT "OPTIONAL HEADER" **********************/
typedef struct
@@ -59,39 +61,16 @@ AOUTHDR;
#define AOUTHDRSZ 44
#define AOUTSZ 44
+/* Apollo allowa for larger section names by allowing
+ them to be in the string table. */
-
-/********************** SECTION HEADER **********************/
-
-struct external_scnhdr {
- /* Apollo allow for larger section names by allowing it to be in
- * the string table.
- */
- char s_name[8];
- 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 */
-};
-
-/* If s_zeores is all zeroes, s_offset gives the real location of the name
- * in the string table.
- */
+/* If s_zeores is all zeroes, s_offset gives the real
+ location of the name in the string table. */
#define s_zeroes section_name.s_name
#define s_offset (section_name.s_name+4)
-/*
- * names of "special" sections
- */
-#define _TEXT ".text"
-#define _DATA ".data"
-#define _BSS ".bss"
+/* More names of "special" sections. */
#define _TV ".tv"
#define _INIT ".init"
#define _FINI ".fini"
@@ -106,116 +85,10 @@ struct external_scnhdr {
compressed sections */
#define _UNWIND ".unwind" /* Stack unwind information */
-#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;
- 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 (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 */
- } 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 **********************/
-
-struct external_reloc {
+struct external_reloc
+{
char r_vaddr[4];
char r_symndx[4];
char r_type[2];
@@ -225,7 +98,6 @@ struct external_reloc {
};
-
#define RELOC struct external_reloc
#ifdef M68K_COFF_OFFSET
diff --git a/include/coff/arm.h b/include/coff/arm.h
index 7ca9329..77830ca 100644
--- a/include/coff/arm.h
+++ b/include/coff/arm.h
@@ -1,5 +1,5 @@
/* ARM COFF support for BFD.
- Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000 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)
@@ -77,13 +67,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 +84,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 +96,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/include/coff/aux-coff.h b/include/coff/aux-coff.h
index c89c124..f8536c9 100644
--- a/include/coff/aux-coff.h
+++ b/include/coff/aux-coff.h
@@ -1,4 +1,21 @@
/* Modifications of internal.h and m68k.h needed by A/UX
+
+ 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.
+
Suggested by Ian Lance Taylor <ian@cygnus.com> */
#ifndef GNU_COFF_AUX_H
diff --git a/include/coff/ecoff.h b/include/coff/ecoff.h
index 9e4202e..076fdf5 100644
--- a/include/coff/ecoff.h
+++ b/include/coff/ecoff.h
@@ -1,9 +1,25 @@
-#ifndef ECOFF_H
-#define ECOFF_H
-
/* Generic ECOFF support.
This does not include symbol information, found in sym.h and
- symconst.h. */
+ symconst.h.
+
+ 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 ECOFF_H
+#define ECOFF_H
/* Mips magic numbers used in filehdr. MIPS_MAGIC_LITTLE is used on
little endian machines. MIPS_MAGIC_BIG is used on big endian
diff --git a/include/coff/external.h b/include/coff/external.h
new file mode 100644
index 0000000..b584f30
--- /dev/null
+++ b/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) 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));
+#endif
+#if L_LNNO_SIZE == 2
+#define GET_LINENO_LNNO(abfd, ext) bfd_h_get_16 (abfd, (bfd_byte *) (ext->l_lnno));
+#define PUT_LINENO_LNNO(abfd,val, ext) bfd_h_put_16 (abfd,val, (bfd_byte *) (ext->l_lnno));
+#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/include/coff/go32exe.h b/include/coff/go32exe.h
index 5bd26c1..ccd5c91 100644
--- a/include/coff/go32exe.h
+++ b/include/coff/go32exe.h
@@ -1,18 +1,35 @@
-/* COFF information for PC running go32. */
+/* COFF information for PC running go32.
+
+ 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. */
#define STUBSIZE 2048
-struct external_filehdr_go32_exe {
- char stub[STUBSIZE]; /* the stub to load the image */
- /* the standard COFF header */
- 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 */
-};
+struct external_filehdr_go32_exe
+ {
+ char stub[STUBSIZE];/* the stub to load the image */
+ /* the standard COFF header */
+ 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 */
+ };
#undef FILHDR
#define FILHDR struct external_filehdr_go32_exe
diff --git a/include/coff/h8300.h b/include/coff/h8300.h
index 9b62394..3ed5aef 100644
--- a/include/coff/h8300.h
+++ b/include/coff/h8300.h
@@ -1,193 +1,40 @@
-/*** coff information for Hitachi H8/300 and H8/300-H */
-
-/********************** 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 */
-};
-
-
+/* coff information for Hitachi H8/300 and H8/300-H
+
+ 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. */
+
+#define L_LNNO_SIZE 4
+#include "coff/external.h"
#define H8300MAGIC 0x8300
#define H8300HMAGIC 0x8301
#define H8300SMAGIC 0x8302
-#define H8300BADMAG(x) (((x).f_magic!=H8300MAGIC))
-#define H8300HBADMAG(x) (((x).f_magic!=H8300HMAGIC))
-#define H8300SBADMAG(x) (((x).f_magic!=H8300SMAGIC))
-
-#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
-
-
-
-
-/********************** 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;
- char l_lnno[4]; /* line number */
-};
-
-#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
-#define LINESZ 8
-
-
-/********************** 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 */
- } 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 H8300BADMAG(x) (((x).f_magic != H8300MAGIC))
+#define H8300HBADMAG(x) (((x).f_magic != H8300HMAGIC))
+#define H8300SBADMAG(x) (((x).f_magic != H8300SMAGIC))
/********************** 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. */
-struct external_reloc {
+struct external_reloc
+{
char r_vaddr[4];
char r_symndx[4];
char r_offset[4];
@@ -195,7 +42,6 @@ struct external_reloc {
char r_stuff[2];
};
-
#define RELOC struct external_reloc
#define RELSZ 16
diff --git a/include/coff/h8500.h b/include/coff/h8500.h
index 0305bf2b..87e5754 100644
--- a/include/coff/h8500.h
+++ b/include/coff/h8500.h
@@ -1,190 +1,36 @@
-/*** coff information for Hitachi H8/500 */
-
-/********************** 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 */
-};
-
-
+/* coff information for Hitachi H8/500
+
+ 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. */
+
+#define L_LNNO_SIZE 4
+#include "coff/external.h"
#define H8500MAGIC 0x8500
-
-#define H8500BADMAG(x) ((0xffff && ((x).f_magic)!=H8500MAGIC))
-
-#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
-
-
-
-
-/********************** 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;
- char l_lnno[4]; /* line number */
-};
-
-#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
-#define LINESZ 8
-
-
-/********************** 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 */
- } 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 H8500BADMAG(x) ((0xffff && ((x).f_magic) != H8500MAGIC))
/********************** 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. */
-struct external_reloc {
+struct external_reloc
+{
char r_vaddr[4];
char r_symndx[4];
char r_offset[4];
@@ -192,7 +38,6 @@ struct external_reloc {
char r_stuff[2];
};
-
#define RELOC struct external_reloc
#define RELSZ 16
diff --git a/include/coff/i386.h b/include/coff/i386.h
index 5ebf4a2..484a3b1 100644
--- a/include/coff/i386.h
+++ b/include/coff/i386.h
@@ -1,33 +1,37 @@
-/*** coff information for Intel 386/486. */
-
-
-/********************** 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 */
-};
+/* coff information for Intel 386/486.
+
+ 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. */
+
+#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
@@ -36,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
@@ -80,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/include/coff/i860.h b/include/coff/i860.h
index 73686e9..dac7617 100644
--- a/include/coff/i860.h
+++ b/include/coff/i860.h
@@ -1,205 +1,54 @@
-/* This file was hacked from i386.h [dolan@ssd.intel.com] */
-
-/*** coff information for Intel 860. */
-
+/* coff information for Intel 860.
+
+ 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. */
-/********************** 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 */
-};
+/* This file was hacked from i386.h [dolan@ssd.intel.com] */
+#define L_LNNO_SIZE 2
+#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 I860MAGIC 0x14d
#define I860BADMAG(x) ((x).f_magic != I860MAGIC)
-#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
-
/* FIXME: What are the a.out magic numbers? */
-/********************** 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 */
- } 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"
-
+#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/include/coff/i960.h b/include/coff/i960.h
index 0935836..b9d167e 100644
--- a/include/coff/i960.h
+++ b/include/coff/i960.h
@@ -1,17 +1,34 @@
-/*** coff information for 80960. Origins: Intel corp, natch. */
+/* coff information for 80960. Origins: Intel corp, natch.
+
+ 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. */
/* NOTE: Tagentries (cf TAGBITS) are no longer used by the 960 */
/********************** 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 */
+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 OMAGIC (0407) /* old impure format. data immediately
@@ -49,13 +66,12 @@ struct external_filehdr {
/********************** AOUT "OPTIONAL HEADER" **********************/
-typedef struct {
- unsigned long phys_addr;
- unsigned long bitarray;
+typedef struct
+{
+ unsigned long phys_addr;
+ unsigned long bitarray;
} TAGBITS;
-
-
typedef struct
{
char magic[2]; /* type of file */
@@ -83,19 +99,19 @@ AOUTHDR;
/********************** 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 */
- char s_align[4]; /* section alignment */
+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 */
+ char s_align[4]; /* section alignment */
};
@@ -116,20 +132,22 @@ struct external_scnhdr {
* 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 */
- char padding[2]; /* force alignment */
+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 */
+ char padding[2]; /* force alignment */
};
#define LINENO struct external_lineno
#define LINESZ 8
-
/********************** SYMBOLS **********************/
#define E_SYMNMLEN 8 /* # characters in a symbol name */
@@ -138,13 +156,17 @@ struct external_lineno {
struct external_syment
{
- union {
+ union
+ {
char e_name[E_SYMNMLEN];
- struct {
+
+ struct
+ {
char e_zeroes[4];
char e_offset[4];
} e;
} e;
+
char e_value[4];
char e_scnum[2];
char e_flags[2];
@@ -154,78 +176,99 @@ struct external_syment
char pad2[2];
};
-
-
-
#define N_BTMASK (0x1f)
#define N_TMASK (0x60)
#define N_BTSHFT (5)
#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 */
- } 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)) */
-
- /******************************************
- * I960-specific *2nd* aux. entry formats
- ******************************************/
- struct {
- /* This is a very old typo that keeps getting propagated. */
+union external_auxent
+{
+ struct
+ {
+ char x_tagndx[4]; /* str, un, or enum tag indx */
+
+ union
+ {
+ struct
+ {
+ char x_lnno[2]; /* declaration line number */
+ char x_size[2]; /* str/union/array size */
+ } x_lnsz;
+
+ char x_fsize[4]; /* size of function */
+
+ } x_misc;
+
+ union
+ {
+ struct /* if ISFCN, tag, or .bb */
+ {
+ char x_lnnoptr[4]; /* ptr to fcn line # */
+ char x_endndx[4]; /* entry ndx past block end */
+ } x_fcn;
+
+ struct /* if ISARY, up to 4 dimen. */
+ {
+ char x_dimen[E_DIMNUM][2];
+ } x_ary;
+
+ } x_fcnary;
+
+ char x_tvndx[2]; /* tv index */
+
+ } x_sym;
+
+ union
+ {
+ char x_fname[E_FILNMLEN];
+
+ struct
+ {
+ char x_zeroes[4];
+ char x_offset[4];
+ } x_n;
+
+ } x_file;
+
+ struct
+ {
+ char x_scnlen[4]; /* section length */
+ char x_nreloc[2]; /* # relocation entries */
+ char x_nlinno[2]; /* # line numbers */
+
+ } x_scn;
+
+ struct
+ {
+ char x_tvfill[4]; /* tv fill value */
+ char x_tvlen[2]; /* length of .tv */
+ char x_tvran[2][2]; /* tv range */
+
+ } x_tv; /* info about .tv section (in auxent of symbol .tv)) */
+
+ /******************************************
+ * I960-specific *2nd* aux. entry formats
+ ******************************************/
+ struct
+ {
+ /* This is a very old typo that keeps getting propagated. */
#define x_stdindx x_stindx
- char x_stindx[4]; /* sys. table entry */
- } x_sc; /* system call entry */
+ char x_stindx[4]; /* sys. table entry */
+ } x_sc; /* system call entry */
- struct {
- char x_balntry[4]; /* BAL entry point */
- } x_bal; /* BAL-callable function */
+ struct
+ {
+ char x_balntry[4]; /* BAL entry point */
+ } x_bal; /* BAL-callable function */
- struct {
- char x_timestamp[4]; /* time stamp */
- char x_idstring[20]; /* producer identity string */
- } x_ident; /* Producer ident info */
+ struct
+ {
+ char x_timestamp[4]; /* time stamp */
+ char x_idstring[20]; /* producer identity string */
+ } x_ident; /* Producer ident info */
};
-
-
#define SYMENT struct external_syment
#define SYMESZ 24
#define AUXENT union external_auxent
@@ -235,7 +278,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/include/coff/ia64.h b/include/coff/ia64.h
index a115786..f7ff0ee 100644
--- a/include/coff/ia64.h
+++ b/include/coff/ia64.h
@@ -1,17 +1,25 @@
-/*** coff information for HP/Intel IA-64. */
-
-
-/********************** 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 */
-};
+/* coff information for HP/Intel IA-64.
+
+ 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. */
+
+#define DO_NOT_DEFINE_AOUTHDR
+#define L_LNNO_SIZE 2
+#define INCLUDE_COMDAT_FIELDS_IN_AUXENT
+#include "coff/external.h"
#define IA64MAGIC 0x200
@@ -30,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 */
@@ -66,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
@@ -74,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/include/coff/internal.h b/include/coff/internal.h
index c6f2760..9b62710 100644
--- a/include/coff/internal.h
+++ b/include/coff/internal.h
@@ -1,5 +1,21 @@
/* Internal format of COFF object file data structures, for GNU BFD.
- This file is part of BFD, the Binary File Descriptor library. */
+ This file is part of BFD, the Binary File Descriptor library.
+
+ 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 GNU_COFF_INTERNAL_H
#define GNU_COFF_INTERNAL_H 1
@@ -45,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 */
@@ -58,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)
@@ -81,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;
@@ -184,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 **********************/
@@ -306,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 */
@@ -327,22 +338,20 @@ 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
{
@@ -384,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 */
@@ -394,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 */
@@ -415,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 */
diff --git a/include/coff/m68k.h b/include/coff/m68k.h
index c9147ed..5c5f758 100644
--- a/include/coff/m68k.h
+++ b/include/coff/m68k.h
@@ -1,20 +1,26 @@
-/*** coff information for M68K */
+/* coff information for M68K
+
+ 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 GNU_COFF_M68K_H
#define GNU_COFF_M68K_H 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
+#include "coff/external.h"
/* Motorola 68000/68008/68010/68020 */
#define MC68MAGIC 0520
@@ -25,7 +31,7 @@ struct external_filehdr {
#define M68MAGIC 0210
#define M68TVMAGIC 0211
-/* this is the magic of the Bull dpx/2 */
+/* This is the magic of the Bull dpx/2 */
#define MC68KBCSMAGIC 0526
/* This is Lynx's all-platform magic number for executables. */
@@ -36,8 +42,14 @@ struct external_filehdr {
/* This intentionally does not include MC68KBCSMAGIC; it only includes
magic numbers which imply that names do not have underscores. */
-#define M68KBADMAG(x) (((x).f_magic!=MC68MAGIC) && ((x).f_magic!=MC68KWRMAGIC) && ((x).f_magic!=MC68TVMAGIC) && \
- ((x).f_magic!=MC68KROMAGIC) && ((x).f_magic!=MC68KPGMAGIC) && ((x).f_magic!=M68MAGIC) && ((x).f_magic!=M68TVMAGIC) && ((x).f_magic!=LYNXCOFFMAGIC) )
+#define M68KBADMAG(x) (((x).f_magic != MC68MAGIC) \
+ && ((x).f_magic != MC68KWRMAGIC) \
+ && ((x).f_magic != MC68TVMAGIC) \
+ && ((x).f_magic != MC68KROMAGIC) \
+ && ((x).f_magic != MC68KPGMAGIC) \
+ && ((x).f_magic != M68MAGIC) \
+ && ((x).f_magic != M68TVMAGIC) \
+ && ((x).f_magic != LYNXCOFFMAGIC))
/* Magic numbers for the a.out header. */
@@ -46,174 +58,18 @@ struct external_filehdr {
#define PAGEMAGICPEXECTSHLIB 0443 /* pure executable (target shared library) */
#define PAGEMAGICPEXECPAGED 0413 /* pure executable (paged) */
-#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
-
-
-/********************** 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 _COMMENT ".comment"
-
-#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;
- 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 (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 */
- } 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 **********************/
-
-struct external_reloc {
+struct external_reloc
+{
char r_vaddr[4];
char r_symndx[4];
char r_type[2];
#ifdef M68K_COFF_OFFSET
char r_offset[4];
#endif
-
};
-
#define RELOC struct external_reloc
#ifdef M68K_COFF_OFFSET
diff --git a/include/coff/m88k.h b/include/coff/m88k.h
index e06eb41..44fbca4 100644
--- a/include/coff/m88k.h
+++ b/include/coff/m88k.h
@@ -1,56 +1,40 @@
-/*** coff information for 88k bcs */
-
-/********************** 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 */
-};
+/* coff information for 88k bcs
+
+ 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. */
+
+#define DO_NOT_DEFINE_SCNHDR
+#define L_LNNO_SIZE 4
+#define DO_NOT_DEFINE_SYMENT
+#define DO_NOT_DEFINE_AUXENT
+#include "coff/external.h"
#define MC88MAGIC 0540 /* 88k BCS executable */
#define MC88DMAGIC 0541 /* DG/UX executable */
#define MC88OMAGIC 0555 /* Object file */
-#define MC88BADMAG(x) (((x).f_magic!=MC88MAGIC) &&((x).f_magic!=MC88DMAGIC) && ((x).f_magic != MC88OMAGIC))
-
-#define FILHDR struct external_filehdr
-#define FILHSZ 20
-
-
-/********************** AOUT "OPTIONAL HEADER" **********************/
-
+#define MC88BADMAG(x) (((x).f_magic != MC88MAGIC) \
+ && ((x).f_magic != MC88DMAGIC) \
+ && ((x).f_magic != MC88OMAGIC))
-#define PAGEMAGIC3 0414 /* Split i&d, zero mapped */
+#define PAGEMAGIC3 0414 /* Split i&d, zero mapped */
#define PAGEMAGICBCS 0413
-
-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;
-
-
-/* compute size of a header */
-
-#define AOUTSZ 28
-#define AOUTHDRSZ 28
-
-
/********************** SECTION HEADER **********************/
-
struct external_scnhdr
{
char s_name[8]; /* section name */
@@ -65,38 +49,15 @@ struct external_scnhdr
char s_flags[4]; /* flags */
};
-
#define SCNHDR struct external_scnhdr
#define SCNHSZ 44
-/*
- * names of "special" sections
- */
+/* Names of "special" sections. */
#define _TEXT ".text"
#define _DATA ".data"
#define _BSS ".bss"
#define _COMMENT ".comment"
-/********************** 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[4];
-
-};
-
-#define LINENO struct external_lineno
-#define LINESZ 8
-
/********************** SYMBOLS **********************/
@@ -106,13 +67,18 @@ struct external_lineno{
struct external_syment
{
- union {
+ union
+ {
char e_name[E_SYMNMLEN];
- struct {
+
+ struct
+ {
char e_zeroes[4];
char e_offset[4];
} e;
+
} e;
+
char e_value[4];
char e_scnum[2];
char e_type[2];
@@ -121,62 +87,75 @@ struct external_syment
char pad2[2];
};
-
-
-
#define N_BTMASK 017
#define N_TMASK 060
#define N_BTSHFT 4
#define N_TSHIFT 2
-
/* Note that this isn't the same shape as other coffs */
-union external_auxent {
- struct {
+union external_auxent
+{
+ struct
+ {
char x_tagndx[4]; /* str, un, or enum tag indx */
/* 4 */
- union {
+
+ union
+ {
char x_fsize[4]; /* size of function */
- struct {
+
+ struct
+ {
char x_lnno[4]; /* declaration line number */
char x_size[4]; /* str/union/array size */
} x_lnsz;
+
} x_misc;
/* 12 */
- union {
- struct { /* if ISFCN, tag, or .bb */
+ 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. */
+
+ struct /* if ISARY, up to 4 dimen. */
+ {
char x_dimen[E_DIMNUM][2];
} x_ary;
+
} x_fcnary;
/* 20 */
} x_sym;
- union {
+ union
+ {
char x_fname[E_FILNMLEN];
- struct {
+
+ struct
+ {
char x_zeroes[4];
char x_offset[4];
} x_n;
+
} x_file;
- struct {
+ struct
+ {
char x_scnlen[4]; /* section length */
char x_nreloc[4]; /* # relocation entries */
char x_nlinno[4]; /* # line numbers */
} x_scn;
- struct {
+ 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 GET_FCN_LNNOPTR(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *)ext->x_sym.x_fcnary.x_fcn.x_lnnoptr)
@@ -196,17 +175,15 @@ union external_auxent {
#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 SYMENT struct external_syment
#define SYMESZ 20
#define AUXENT union external_auxent
#define AUXESZ 20
-
/********************** RELOCATION DIRECTIVES **********************/
-struct external_reloc {
+struct external_reloc
+{
char r_vaddr[4];
char r_symndx[4];
char r_type[2];
diff --git a/include/coff/mcore.h b/include/coff/mcore.h
index 0fa319c..980cf13 100644
--- a/include/coff/mcore.h
+++ b/include/coff/mcore.h
@@ -1,5 +1,5 @@
/* Motorola MCore support for BFD.
- Copyright (C) 1999 Free Software Foundation, Inc.
+ Copyright 1999 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -22,6 +22,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef _COFF_MORE_H
#define _COFF_MORE_H
+#define INCLUDE_COMDAT_FIELDS_IN_AUXENT
+#define L_LNNO_SIZE 2
+#include "coff/external.h"
+
+#define MCOREMAGIC 0xb00 /* I just made this up */
+
+#define MCOREBADMAG(x) (((x).f_magic != MCOREMAGIC))
#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
@@ -36,22 +43,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define PEMCORE
-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 */
@@ -60,14 +51,12 @@ AOUTHDR;
/* From winnt.h */
#define IMAGE_NT_OPTIONAL_HDR_MAGIC 0x10b
-
/* Define some NT default values. */
#define NT_SECTION_ALIGNMENT 0x1000
#define NT_FILE_ALIGNMENT 0x200
#define NT_DEF_RESERVE 0x100000
#define NT_DEF_COMMIT 0x1000
-
struct external_reloc
{
char r_vaddr [4];
@@ -79,168 +68,4 @@ struct external_reloc
#define RELOC struct external_reloc
#define RELSZ 14
-#define MCOREMAGIC 0xb00 /* I just made this up */
-
-#define MCOREBADMAG(x) (((x).f_magic!= MCOREMAGIC))
-
-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 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
-
-/* 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
-
-#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));
-
-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"
-
-
-
#endif /* __COFF_MCORE_H */
diff --git a/include/coff/mips.h b/include/coff/mips.h
index d4665b1..b9503bd 100644
--- a/include/coff/mips.h
+++ b/include/coff/mips.h
@@ -1,17 +1,25 @@
/* ECOFF support on MIPS machines.
- coff/ecoff.h must be included before this file. */
-
-/********************** FILE HEADER **********************/
-
-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 */
- unsigned char f_symptr[4]; /* file pointer to symtab */
- unsigned char f_nsyms[4]; /* number of symtab entries */
- unsigned char f_opthdr[2]; /* sizeof(optional hdr) */
- unsigned char f_flags[2]; /* flags */
-};
+ coff/ecoff.h must be included before this file.
+
+ 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. */
+
+#define DO_NOT_DEFINE_AOUTHDR
+#define L_LNNO_SIZE 4
+#include "coff/external.h"
/* Magic numbers are defined in coff/ecoff.h. */
#define MIPS_ECOFF_BADMAG(x) (((x).f_magic!=MIPS_MAGIC_1) && \
@@ -22,12 +30,9 @@ struct external_filehdr {
((x).f_magic!=MIPS_MAGIC_LITTLE3) && \
((x).f_magic!=MIPS_MAGIC_BIG3))
-#define FILHDR struct external_filehdr
-#define FILHSZ 20
/********************** AOUT "OPTIONAL HEADER" **********************/
-
typedef struct external_aouthdr
{
unsigned char magic[2]; /* type of file */
@@ -49,30 +54,13 @@ typedef struct external_aouthdr
#define AOUTSZ 56
#define AOUTHDRSZ 56
-/********************** SECTION HEADER **********************/
-
-struct external_scnhdr {
- unsigned char s_name[8]; /* section name */
- unsigned char s_paddr[4]; /* physical address, aliased s_nlib */
- unsigned char s_vaddr[4]; /* virtual address */
- unsigned char s_size[4]; /* section size */
- unsigned char s_scnptr[4]; /* file ptr to raw data for section */
- unsigned char s_relptr[4]; /* file ptr to relocation */
- unsigned char s_lnnoptr[4]; /* file ptr to line numbers */
- unsigned char s_nreloc[2]; /* number of relocation entries */
- unsigned char s_nlnno[2]; /* number of line number entries*/
- unsigned char s_flags[4]; /* flags */
-};
-
-#define SCNHDR struct external_scnhdr
-#define SCNHSZ 40
-
/********************** RELOCATION DIRECTIVES **********************/
-struct external_reloc {
- unsigned char r_vaddr[4];
- unsigned char r_bits[4];
-};
+struct external_reloc
+ {
+ unsigned char r_vaddr[4];
+ unsigned char r_bits[4];
+ };
#define RELOC struct external_reloc
#define RELSZ 8
@@ -162,7 +150,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];
@@ -192,7 +181,8 @@ struct hdr_ext {
/* File descriptor external record */
-struct fdr_ext {
+struct fdr_ext
+{
unsigned char f_adr[4];
unsigned char f_rss[4];
unsigned char f_issBase[4];
@@ -238,7 +228,8 @@ struct fdr_ext {
/* Procedure descriptor external record */
-struct pdr_ext {
+struct pdr_ext
+{
unsigned char p_adr[4];
unsigned char p_isym[4];
unsigned char p_iline[4];
@@ -257,7 +248,8 @@ struct pdr_ext {
/* Runtime procedure table */
-struct rpdr_ext {
+struct rpdr_ext
+{
unsigned char p_adr[4];
unsigned char p_regmask[4];
unsigned char p_regoffset[4];
@@ -273,13 +265,15 @@ struct rpdr_ext {
/* Line numbers */
-struct line_ext {
+struct line_ext
+{
unsigned char l_line[4];
};
/* Symbol external record */
-struct sym_ext {
+struct sym_ext
+{
unsigned char s_iss[4];
unsigned char s_value[4];
unsigned char s_bits1[1];
@@ -319,7 +313,8 @@ struct sym_ext {
/* External symbol external record */
-struct ext_ext {
+struct ext_ext
+{
unsigned char es_bits1[1];
unsigned char es_bits2[1];
unsigned char es_ifd[2];
@@ -337,20 +332,23 @@ struct ext_ext {
/* Dense numbers external record */
-struct dnr_ext {
+struct dnr_ext
+{
unsigned char d_rfd[4];
unsigned char d_index[4];
};
/* Relative file descriptor */
-struct rfd_ext {
+struct rfd_ext
+{
unsigned char rfd[4];
};
/* Optimizer symbol external record */
-struct opt_ext {
+struct opt_ext
+{
unsigned char o_bits1[1];
unsigned char o_bits2[1];
unsigned char o_bits3[1];
diff --git a/include/coff/mipspe.h b/include/coff/mipspe.h
index 1927d99..9b4ffab 100644
--- a/include/coff/mipspe.h
+++ b/include/coff/mipspe.h
@@ -1,51 +1,29 @@
-/*** coff information for Windows CE with MIPS VR4111 */
-
-/********************** 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 */
-};
-
-
+/* coff information for Windows CE with MIPS VR4111
+
+ 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. */
+
+#define L_LNNO_SIZE 2
+#define INCLUDE_COMDAT_FIELDS_IN_AUXENT
+#include "coff/external.h"
#define MIPS_ARCH_MAGIC_WINCE 0x0166 /* Windows CE - little endian */
#define MIPS_PE_MAGIC 0x010b
-#define MIPSBADMAG(x) \
- ((x).f_magic!=MIPS_ARCH_MAGIC_WINCE)
-
-#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
-
-
-
+#define MIPSBADMAG(x) ((x).f_magic != MIPS_ARCH_MAGIC_WINCE)
/* define some NT default values */
/* #define NT_IMAGE_BASE 0x400000 moved to internal.h */
@@ -54,154 +32,19 @@ 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;
- char l_lnno[2]; /* line number */
-};
-
-#define GET_LINENO_LNNO(abfd, ext) bfd_h_get_16(abfd, (bfd_byte *) (ext->l_lnno));
-#define PUT_LINENO_LNNO(abfd,val, ext) bfd_h_put_16(abfd,val, (bfd_byte *) (ext->l_lnno));
-
-#define 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 (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. */
-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/include/coff/pe.h b/include/coff/pe.h
index 7f15474..ff37875 100644
--- a/include/coff/pe.h
+++ b/include/coff/pe.h
@@ -1,6 +1,6 @@
/* pe.h - PE COFF header information
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright 2000, 2001 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
diff --git a/include/coff/powerpc.h b/include/coff/powerpc.h
index 9552cf9..1d4d6fb 100644
--- a/include/coff/powerpc.h
+++ b/include/coff/powerpc.h
@@ -1,32 +1,33 @@
/* Basic coff information for the PowerPC
- *
- * Based on coff/rs6000.h, coff/i386.h and others.
- *
- * 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
+ Based on coff/rs6000.h, coff/i386.h and others.
+
+ 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.
+
+ Initial release: Kim Knuttila (krk@cygnus.com) */
+#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)
@@ -43,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/include/coff/rs6000.h b/include/coff/rs6000.h
index 0def1d9..afddc76 100644
--- a/include/coff/rs6000.h
+++ b/include/coff/rs6000.h
@@ -1,5 +1,5 @@
/* IBM RS/6000 "XCOFF" file definitions for BFD.
- Copyright (C) 1990, 1991 Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1993, 1994, 1995 Free Software Foundation, Inc.
FIXME: Can someone provide a transliteration of this name into ASCII?
Using the following chars caused a compiler warning on HIUX (so I replaced
them with octal escapes), and isn't useful without an understanding of what
@@ -7,17 +7,10 @@
Written by Mimi Ph\373\364ng-Th\345o V\365 of IBM
and John Gilmore of Cygnus Support. */
-/********************** 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 DO_NOT_DEFINE_AUXENT
+#define L_LNNO_SIZE 2
+#include "coff/external.h"
/* IBM RS/6000 */
#define U802WRMAGIC 0730 /* writeable text segments **chh** */
@@ -28,13 +21,8 @@ struct external_filehdr {
((x).f_magic != U802ROMAGIC && (x).f_magic != U802WRMAGIC && \
(x).f_magic != U802TOCMAGIC)
-#define FILHDR struct external_filehdr
-#define FILHSZ 20
-
-
/********************** AOUT "OPTIONAL HEADER" **********************/
-
typedef struct
{
unsigned char magic[2]; /* type of file */
@@ -70,35 +58,10 @@ AOUTHDR;
#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 **********************/
-
-
-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"
+/* More names of "special" sections. */
#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
@@ -109,130 +72,97 @@ struct external_scnhdr {
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.
- * 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 external_auxent
{
- 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 */
- } 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)) */
-
- struct {
- unsigned char x_scnlen[4];
- unsigned char x_parmhash[4];
- unsigned char x_snhash[2];
- unsigned char x_smtyp[1];
- unsigned char x_smclas[1];
- unsigned char x_stab[4];
- unsigned char x_snstab[2];
- } x_csect;
-
+ struct
+ {
+ char x_tagndx[4]; /* str, un, or enum tag indx */
+
+ union
+ {
+ struct
+ {
+ char x_lnno[2]; /* declaration line number */
+ char x_size[2]; /* str/union/array size */
+ } x_lnsz;
+
+ char x_fsize[4]; /* size of function */
+
+ } x_misc;
+
+ union
+ {
+ struct /* if ISFCN, tag, or .bb */
+ {
+ char x_lnnoptr[4]; /* ptr to fcn line # */
+ char x_endndx[4]; /* entry ndx past block end */
+ } x_fcn;
+
+ struct /* if ISARY, up to 4 dimen. */
+ {
+ char x_dimen[E_DIMNUM][2];
+ } x_ary;
+
+ } x_fcnary;
+
+ char x_tvndx[2]; /* tv index */
+
+ } x_sym;
+
+ union
+ {
+ char x_fname[E_FILNMLEN];
+
+ struct
+ {
+ char x_zeroes[4];
+ char x_offset[4];
+ } x_n;
+
+ } x_file;
+
+ struct
+ {
+ char x_scnlen[4]; /* section length */
+ char x_nreloc[2]; /* # relocation entries */
+ char x_nlinno[2]; /* # line numbers */
+ } x_scn;
+
+ struct
+ {
+ char x_tvfill[4]; /* tv fill value */
+ char x_tvlen[2]; /* length of .tv */
+ char x_tvran[2][2]; /* tv range */
+ } x_tv; /* info about .tv section (in auxent of symbol .tv)) */
+
+ struct
+ {
+ unsigned char x_scnlen[4];
+ unsigned char x_parmhash[4];
+ unsigned char x_snhash[2];
+ unsigned char x_smtyp[1];
+ unsigned char x_smclas[1];
+ unsigned char x_stab[4];
+ unsigned char x_snstab[2];
+ } x_csect;
};
-#define SYMENT struct external_syment
-#define SYMESZ 18
#define AUXENT union external_auxent
#define AUXESZ 18
+
#define DBXMASK 0x80 /* for dbx storage mask */
#define SYMNAME_IN_DEBUG(symptr) ((symptr)->n_sclass & DBXMASK)
-
-
/********************** RELOCATION DIRECTIVES **********************/
-
-struct external_reloc {
+struct external_reloc
+{
char r_vaddr[4];
char r_symndx[4];
char r_size[1];
char r_type[1];
};
-
#define RELOC struct external_reloc
#define RELSZ 10
diff --git a/include/coff/rs6k64.h b/include/coff/rs6k64.h
index 80d8e4c0e9..a8675bd 100644
--- a/include/coff/rs6k64.h
+++ b/include/coff/rs6k64.h
@@ -1,55 +1,60 @@
/* IBM RS/6000 "XCOFF64" file definitions for BFD.
- Copyright (C) 2000 Free Software Foundation, Inc. */
-
-/********************** 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[8];/* file pointer to symtab */
- char f_opthdr[2]; /* sizeof(optional hdr) */
- char f_flags[2]; /* flags */
- char f_nsyms[4]; /* number of symtab entries */
-};
+
+ Copyright 2000 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. */
+
+#define DO_NOT_DEFINE_AOUTHDR
+#define DO_NOT_DEFINE_SCNHDR
+#define DO_NOT_DEFINE_LINENO
+#define DO_NOT_DEFINE_AUXENT
+#include "coff/external.h"
/* IBM RS/6000 */
#define U803XTOCMAGIC 0757 /* readonly text segments and TOC, XCOFF64 */
#define BADMAG(x) ((x).f_magic != U803XTOCMAGIC)
-#define FILHDR struct external_filehdr
-#define FILHSZ 24
-
/********************** AOUT "OPTIONAL HEADER" **********************/
-
typedef struct
{
- unsigned char magic[2]; /* type of file */
- unsigned char vstamp[2]; /* version stamp */
- unsigned char o_debugger[4]; /* reserved */
+ unsigned char magic[2]; /* type of file */
+ unsigned char vstamp[2]; /* version stamp */
+ unsigned char o_debugger[4]; /* reserved */
unsigned char text_start[8]; /* base of text used for this file */
unsigned char data_start[8]; /* base of data used for this file */
unsigned char o_toc[8]; /* address of TOC */
- unsigned char o_snentry[2]; /* section number of entry point */
- unsigned char o_sntext[2]; /* section number of .text section */
- unsigned char o_sndata[2]; /* section number of .data section */
- unsigned char o_sntoc[2]; /* section number of TOC */
- unsigned char o_snloader[2]; /* section number of .loader section */
- unsigned char o_snbss[2]; /* section number of .bss section */
- unsigned char o_algntext[2]; /* .text alignment */
- unsigned char o_algndata[2]; /* .data alignment */
- unsigned char o_modtype[2]; /* module type (??) */
- unsigned char o_cputype[2]; /* cpu type */
- unsigned char o_resv2[4]; /* reserved */
- unsigned char tsize[8]; /* text size bytes, padded to FW bdry */
- unsigned char dsize[8]; /* initialized data " " */
- unsigned char bsize[8]; /* uninitialized data " " */
- unsigned char entry[8]; /* entry pt. */
+ unsigned char o_snentry[2]; /* section number of entry point */
+ unsigned char o_sntext[2]; /* section number of .text section */
+ unsigned char o_sndata[2]; /* section number of .data section */
+ unsigned char o_sntoc[2]; /* section number of TOC */
+ unsigned char o_snloader[2]; /* section number of .loader section */
+ unsigned char o_snbss[2]; /* section number of .bss section */
+ unsigned char o_algntext[2]; /* .text alignment */
+ unsigned char o_algndata[2]; /* .data alignment */
+ unsigned char o_modtype[2]; /* module type (??) */
+ unsigned char o_cputype[2]; /* cpu type */
+ unsigned char o_resv2[4]; /* reserved */
+ unsigned char tsize[8]; /* text size bytes, padded to FW bdry */
+ unsigned char dsize[8]; /* initialized data " " */
+ unsigned char bsize[8]; /* uninitialized data " " */
+ unsigned char entry[8]; /* entry pt. */
unsigned char o_maxstack[8]; /* max stack size (??) */
unsigned char o_maxdata[8]; /* max data size (??) */
- unsigned char o_resv3[16]; /* reserved */
+ unsigned char o_resv3[16]; /* reserved */
}
AOUTHDR;
@@ -63,10 +68,9 @@ AOUTHDR;
/********************** SECTION HEADER **********************/
-
-
-struct external_scnhdr {
- char s_name[8]; /* section name */
+struct external_scnhdr
+{
+ char s_name[8]; /* section name */
char s_paddr[8]; /* physical address, aliased s_nlib */
char s_vaddr[8]; /* virtual address */
char s_size[8]; /* section size */
@@ -75,8 +79,8 @@ struct external_scnhdr {
char s_lnnoptr[8]; /* file ptr to line numbers */
char s_nreloc[4]; /* number of relocation entries */
char s_nlnno[4]; /* number of line number entries*/
- char s_flags[4]; /* flags */
- char s_pad[4]; /* padding */
+ char s_flags[4]; /* flags */
+ char s_pad[4]; /* padding */
};
/*
@@ -105,104 +109,91 @@ struct external_scnhdr {
/********************** 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[8];/* 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 */
-};
+ 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[8];/* 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 */
+};
#define LINENO struct external_lineno
-
#define LINESZ 12
-/********************** 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 external_auxent
{
- union {
- char e_value[8];
- } e;
- char e_offset[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 {
- union {
- struct {
- char x_lnno[4]; /* declaration line number */
- char x_size[2]; /* str/union/array size */
- } x_lnsz;
- struct {
- char x_lnnoptr[8];/* ptr to fcn line */
- char x_fsize[4]; /* size of function */
- char x_endndx[4]; /* entry ndx past block end */
- } x_fcn;
- } x_fcnary;
- } x_sym;
+ struct
+ {
+ union
+ {
+ struct
+ {
+ char x_lnno[4]; /* declaration line number */
+ char x_size[2]; /* str/union/array size */
+ } x_lnsz;
+
+ struct
+ {
+ char x_lnnoptr[8];/* ptr to fcn line */
+ char x_fsize[4]; /* size of function */
+ char x_endndx[4]; /* entry ndx past block end */
+ } x_fcn;
+
+ } x_fcnary;
+
+ } x_sym;
- union {
- char x_fname[E_FILNMLEN];
- struct {
- char x_zeroes[4];
- char x_offset[4];
- char x_pad[6];
- unsigned char x_ftype[1];
- unsigned char x_resv[2];
- } x_n;
- } x_file;
-
- struct {
- char x_exptr[8];
- char x_fsize[4];
- char x_endndx[4];
- char x_pad[1];
- } x_except;
-
- struct {
- unsigned char x_scnlen_lo[4];
- unsigned char x_parmhash[4];
- unsigned char x_snhash[2];
- unsigned char x_smtyp[1];
- unsigned char x_smclas[1];
- unsigned char x_scnlen_hi[4];
- unsigned char x_pad[1];
- } x_csect;
-
- struct {
- char x_pad[17];
- char x_auxtype[1];
- } x_auxtype;
+ union
+ {
+ char x_fname[E_FILNMLEN];
+
+ struct
+ {
+ char x_zeroes[4];
+ char x_offset[4];
+ char x_pad[6];
+ unsigned char x_ftype[1];
+ unsigned char x_resv[2];
+ } x_n;
+
+ } x_file;
+
+ struct
+ {
+ char x_exptr[8];
+ char x_fsize[4];
+ char x_endndx[4];
+ char x_pad[1];
+ } x_except;
+
+ struct
+ {
+ unsigned char x_scnlen_lo[4];
+ unsigned char x_parmhash[4];
+ unsigned char x_snhash[2];
+ unsigned char x_smtyp[1];
+ unsigned char x_smclas[1];
+ unsigned char x_scnlen_hi[4];
+ unsigned char x_pad[1];
+ } x_csect;
+
+ struct
+ {
+ char x_pad[17];
+ char x_auxtype[1];
+ } x_auxtype;
};
-#define SYMENT struct external_syment
-#define SYMESZ 18
#define AUXENT union external_auxent
#define AUXESZ 18
+
#define DBXMASK 0x80 /* for dbx storage mask */
#define SYMNAME_IN_DEBUG(symptr) ((symptr)->n_sclass & DBXMASK)
@@ -213,19 +204,16 @@ union external_auxent {
#define _AUX_FILE 252
#define _AUX_CSECT 251
-
-
/********************** RELOCATION DIRECTIVES **********************/
-
-struct external_reloc {
+struct external_reloc
+{
char r_vaddr[8];
char r_symndx[4];
char r_size[1];
char r_type[1];
};
-
#define RELOC struct external_reloc
#define RELSZ 14
diff --git a/include/coff/sh.h b/include/coff/sh.h
index 2ea0d26..c77316e 100644
--- a/include/coff/sh.h
+++ b/include/coff/sh.h
@@ -1,55 +1,38 @@
-/*** coff information for Hitachi SH */
-
-/********************** 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 */
-};
-
+/* coff information for Hitachi SH
+
+ 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. */
+#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 */
@@ -58,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];
@@ -220,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/include/coff/sparc.h b/include/coff/sparc.h
index 82a24f0..ac524d6 100644
--- a/include/coff/sparc.h
+++ b/include/coff/sparc.h
@@ -1,4 +1,20 @@
-/*** coff information for Sparc. */
+/* coff information for Sparc.
+
+ 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. */
/* This file is an amalgamation of several standard include files that
define coff format, such as filehdr.h, aouthdr.h, and so forth. In
@@ -6,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 */
@@ -30,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 **********************/
@@ -197,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/include/coff/ti.h b/include/coff/ti.h
index 445707c..57e0dec 100644
--- a/include/coff/ti.h
+++ b/include/coff/ti.h
@@ -1,21 +1,40 @@
/* COFF information for TI COFF support. Definitions in this file should be
customized in a target-specific file, and then this file included (see
- tic54x.h for an example). */
+ tic54x.h for an example).
+
+ 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_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
@@ -404,14 +423,16 @@ bfd_h_put_32(abfd,src->n_value * 8,(bfd_byte *)dst->e_value); \
/********************** 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/include/coff/tic30.h b/include/coff/tic30.h
index 10b026c..30bf9dc 100644
--- a/include/coff/tic30.h
+++ b/include/coff/tic30.h
@@ -1,180 +1,27 @@
-/*** coff information for Texas Instruments TMS320C3X */
-
-/********************** 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 */
-};
-
+/* coff information for Texas Instruments TMS320C3X
+
+ 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. */
+
+#define L_LNNO_SIZE 4
+#include "coff/external.h"
#define TIC30MAGIC 0xC000
-#define TIC30BADMAG(x) (((x).f_magic!=TIC30MAGIC))
-
-#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
-
-
-
-
-/********************** 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;
- char l_lnno[4]; /* line number */
-};
-
-#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
-#define LINESZ 8
-
-
-/********************** 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 */
- } 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 TIC30BADMAG(x) (((x).f_magic != TIC30MAGIC))
/********************** RELOCATION DIRECTIVES **********************/
@@ -182,7 +29,8 @@ union external_auxent {
types on the z8k don't have room in the instruction for the entire
offset - eg with segments */
-struct external_reloc {
+struct external_reloc
+{
char r_vaddr[4];
char r_symndx[4];
char r_offset[4];
@@ -190,7 +38,6 @@ struct external_reloc {
char r_stuff[2];
};
-
#define RELOC struct external_reloc
#define RELSZ 16
diff --git a/include/coff/tic54x.h b/include/coff/tic54x.h
index 433a42a..a41c8d2 100644
--- a/include/coff/tic54x.h
+++ b/include/coff/tic54x.h
@@ -1,6 +1,24 @@
-/* TI COFF information for Texas Instruments TMS320C54X. This file customizes
- the settings in coff/ti.h. */
+/* TI COFF information for Texas Instruments TMS320C54X.
+ This file customizes the settings in coff/ti.h.
+
+ 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_TIC54X_H
+
#define COFF_TIC54X_H
#define TIC54X_TARGET_ID 0x98
#define TIC54XALGMAGIC 0x009B /* c54x algebraic assembler output */
@@ -10,5 +28,7 @@
#define HOWTO_BANK 6 /* add to howto to get absolute/sect-relative version */
#define TICOFF_TARGET_ARCH bfd_arch_tic54x
#define TICOFF_DEFAULT_MAGIC TICOFF1MAGIC /* we use COFF1 for compatibility */
+
#include "coff/ti.h"
+
#endif /* COFF_TIC54X_H */
diff --git a/include/coff/tic80.h b/include/coff/tic80.h
index 5d938f7..c9347eb 100644
--- a/include/coff/tic80.h
+++ b/include/coff/tic80.h
@@ -1,16 +1,38 @@
-/*** coff information for TI TMS320C80 (MVP) */
+/* coff information for TI TMS320C80 (MVP)
+
+ 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. */
+
+#define DO_NOT_DEFINE_FILHDR
+#define DO_NOT_DEFINE_SCNHDR
+#define L_LNNO_SIZE 2
+#include "coff/external.h"
/********************** 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]; /* target id (TIc80 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];/* target id (TIc80 specific) */
};
#define TIC80_ARCH_MAGIC 0x0C1 /* Goes in the file header magic number field */
@@ -21,35 +43,12 @@ struct external_filehdr {
#define FILHDR struct external_filehdr
#define FILHSZ 22
-
-/********************** 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 TIC80_AOUTHDR_MAGIC 0x108 /* Goes in the optional file header magic number field */
-#define AOUTHDRSZ 28
-#define AOUTSZ 28
-
-
-
-
/********************** SECTION HEADER **********************/
-
-struct external_scnhdr {
+struct external_scnhdr
+{
char s_name[8]; /* section name */
char s_paddr[4]; /* physical address, aliased s_nlib */
char s_vaddr[4]; /* virtual address */
@@ -64,9 +63,7 @@ struct external_scnhdr {
char s_mempage[1]; /* memory page number (TIc80) */
};
-/*
- * names of "special" sections
- */
+/* Names of "special" sections. */
#define _TEXT ".text"
#define _DATA ".data"
#define _BSS ".bss"
@@ -76,129 +73,26 @@ struct external_scnhdr {
#define _STACK ".stack"
#define _SYSMEM ".sysmem"
-
#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;
- char l_lnno[2]; /* line number */
-};
-
-#define GET_LINENO_LNNO(abfd, ext) bfd_h_get_16(abfd, (bfd_byte *) (ext->l_lnno));
-#define PUT_LINENO_LNNO(abfd,val, ext) bfd_h_put_16(abfd,val, (bfd_byte *) (ext->l_lnno));
-
-#define 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 (017)
-#define N_TMASK (060)
-#define N_BTSHFT (4)
-#define N_TSHIFT (2)
-/* FIXME - need to correlate with TIc80 Code Generation Tools User's Guide, CG:A-25 */
-union external_auxent {
- struct {
- char x_tagndx[4]; /* str, un, or enum tag indx */
- union {
- struct {
- char x_lnno[2]; /* declaration line number */
- char x_size[2]; /* str/union/array size */
- } x_lnsz;
- char x_fsize[4]; /* size of function */
- } x_misc;
- union {
- struct { /* if ISFCN, tag, or .bb */
- char x_lnnoptr[4]; /* ptr to fcn line # */
- char x_endndx[4]; /* entry ndx past block end */
- } x_fcn;
- struct { /* if ISARY, up to 4 dimen. */
- char x_dimen[E_DIMNUM][2];
- } x_ary;
- } x_fcnary;
- char x_tvndx[2]; /* tv index */
- } x_sym;
-
- union {
- char x_fname[E_FILNMLEN];
- struct {
- char x_zeroes[4];
- char x_offset[4];
- } x_n;
- } x_file;
-
- struct {
- char x_scnlen[4]; /* section length */
- char x_nreloc[2]; /* # relocation entries */
- char x_nlinno[2]; /* # line numbers */
- } x_scn;
-
- struct {
- char x_tvfill[4]; /* tv fill value */
- char x_tvlen[2]; /* length of .tv */
- char x_tvran[2][2]; /* tv range */
- } x_tv; /* info about .tv section (in auxent of symbol .tv)) */
-
-
-};
-
-#define SYMENT struct external_syment
-#define SYMESZ 18
-#define AUXENT union external_auxent
-#define AUXESZ 18
-
-
+/* FIXME - need to correlate external_auxent with
+ TIc80 Code Generation Tools User's Guide, CG:A-25 */
/********************** 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. */
-struct external_reloc {
+struct external_reloc
+{
char r_vaddr[4];
char r_symndx[4];
char r_reserved[2];
char r_type[2];
};
-
#define RELOC struct external_reloc
#define RELSZ 12
diff --git a/include/coff/w65.h b/include/coff/w65.h
index 3378c23..0baa3d3 100644
--- a/include/coff/w65.h
+++ b/include/coff/w65.h
@@ -1,182 +1,27 @@
-/*** coff information for WDC 65816 */
-
-/********************** 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 */
-};
-
-
+/* coff information for WDC 65816
+
+ 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. */
+
+#define L_LNNO_SIZE 4
+#include "coff/external.h"
#define W65MAGIC 0x6500
-
-#define W65BADMAG(x) (((x).f_magic!=W65MAGIC))
-
-#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
-
-
-
-
-/********************** 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;
- char l_lnno[4]; /* line number */
-};
-
-#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
-#define LINESZ 8
-
-
-/********************** 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 */
- } 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 W65BADMAG(x) (((x).f_magic != W65MAGIC))
/********************** RELOCATION DIRECTIVES **********************/
@@ -184,7 +29,8 @@ union external_auxent {
types on the w65 don't have room in the instruction for the entire
offset - eg the strange jump and high page addressing modes */
-struct external_reloc {
+struct external_reloc
+{
char r_vaddr[4];
char r_symndx[4];
char r_offset[4];
@@ -192,7 +38,6 @@ struct external_reloc {
char r_stuff[2];
};
-
#define RELOC struct external_reloc
#define RELSZ 16
diff --git a/include/coff/we32k.h b/include/coff/we32k.h
index 553fa35..7e2791c 100644
--- a/include/coff/we32k.h
+++ b/include/coff/we32k.h
@@ -1,25 +1,29 @@
-/*** coff information for we32k */
-
-/********************** 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 */
-};
-
+/* coff information for we32k
+
+ 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. */
+#define L_LNNO_SIZE 2
+#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)
@@ -32,175 +36,25 @@ struct external_filehdr {
#define FBOMAGIC 0x170 /* we32k sans transfer vector */
#define MTVMAGIC 0x171 /* we32k with transfer vector */
#define RBOMAGIC 0x172 /* reserved */
-#define WE32KBADMAG(x) (((x).f_magic != WE32KMAGIC) \
+#define WE32KBADMAG(x) ( ((x).f_magic != WE32KMAGIC) \
&& ((x).f_magic != FBOMAGIC) \
&& ((x).f_magic != RBOMAGIC) \
&& ((x).f_magic != MTVMAGIC))
-#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
-
-/********************** 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"
+/* More names of "special" sections. */
#define _TV ".tv"
#define _INIT ".init"
#define _FINI ".fini"
-/********************** 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 */
- } 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/include/coff/z8k.h b/include/coff/z8k.h
index 19b846c..50cbd6b 100644
--- a/include/coff/z8k.h
+++ b/include/coff/z8k.h
@@ -1,193 +1,41 @@
-/*** coff information for Zilog Z800N */
-
-/********************** 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 */
-};
-
+/* coff information for Zilog Z800N
+
+ 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. */
+
+#define L_LNNO_SIZE 4
+#include "coff/external.h"
/* Type of cpu is stored in flags */
#define F_Z8001 0x1000
#define F_Z8002 0x2000
#define F_MACHMASK 0xf000
-#define Z8KMAGIC 0x8000
-
-#define Z8KBADMAG(x) (((x).f_magic!=Z8KMAGIC))
-
-#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
-
-
-
-
-/********************** 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 **********************/
+#define Z8KMAGIC 0x8000
-/* 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[4]; /* line number */
-};
-
-#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
-#define LINESZ 8
-
-
-/********************** 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)
+#define Z8KBADMAG(x) (((x).f_magic != Z8KMAGIC))
-
-union external_auxent {
- struct {
- char x_tagndx[4]; /* str, un, or enum tag indx */
- union {
- struct {
- char x_lnno[2]; /* declaration line number */
- char x_size[2]; /* str/union/array size */
- } x_lnsz;
- char x_fsize[4]; /* size of function */
- } x_misc;
- union {
- struct { /* if ISFCN, tag, or .bb */
- char x_lnnoptr[4]; /* ptr to fcn line # */
- char x_endndx[4]; /* entry ndx past block end */
- } x_fcn;
- struct { /* if ISARY, up to 4 dimen. */
- char x_dimen[E_DIMNUM][2];
- } x_ary;
- } x_fcnary;
- char x_tvndx[2]; /* tv index */
- } x_sym;
-
- union {
- char x_fname[E_FILNMLEN];
- struct {
- char x_zeroes[4];
- char x_offset[4];
- } x_n;
- } x_file;
-
- struct {
- char x_scnlen[4]; /* section length */
- char x_nreloc[2]; /* # relocation entries */
- char x_nlinno[2]; /* # line numbers */
- } x_scn;
-
- struct {
- char x_tvfill[4]; /* tv fill value */
- char x_tvlen[2]; /* length of .tv */
- char x_tvran[2][2]; /* tv range */
- } x_tv; /* info about .tv section (in auxent of symbol .tv)) */
-
-
-};
-
-#define 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 z8k don't have room in the instruction for the entire
- offset - eg with segments */
+ offset - eg with segments. */
-struct external_reloc {
+struct external_reloc
+{
char r_vaddr[4];
char r_symndx[4];
char r_offset[4];
@@ -195,7 +43,6 @@ struct external_reloc {
char r_stuff[2];
};
-
#define RELOC struct external_reloc
#define RELSZ 16
diff --git a/include/demangle.h b/include/demangle.h
index a3b664b..9cb1d96 100644
--- a/include/demangle.h
+++ b/include/demangle.h
@@ -1,5 +1,6 @@
/* Defs for interface to demanglers.
- Copyright 1992, 1995, 1996 Free Software Foundation, Inc.
+ Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000
+ 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
diff --git a/include/dis-asm.h b/include/dis-asm.h
index 1cc3fce..bf6dafc 100644
--- a/include/dis-asm.h
+++ b/include/dis-asm.h
@@ -1,4 +1,22 @@
/* Interface between the opcode library and its callers.
+
+ 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, 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.
+
Written by Cygnus Support, 1993.
The opcode library (libopcodes.a) provides instruction decoders for
diff --git a/include/dyn-string.h b/include/dyn-string.h
index 67f7ab7..cbfdaa2 100644
--- a/include/dyn-string.h
+++ b/include/dyn-string.h
@@ -1,5 +1,5 @@
/* An abstract string datatype.
- Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
Contributed by Mark Mitchell (mark@markmitchell.com).
This file is part of GNU CC.
diff --git a/include/elf/ChangeLog b/include/elf/ChangeLog
index f95b19c..e6d0431 100644
--- a/include/elf/ChangeLog
+++ b/include/elf/ChangeLog
@@ -112,9 +112,14 @@
2000-08-14 Jim Wilson <wilson@cygnus.com>
- * elf/ia64.h (EF_IA_64_REDUCEDFP, EF_IA_64_CONS_GP,
+ * ia64.h (EF_IA_64_REDUCEDFP, EF_IA_64_CONS_GP,
EF_IA_64_NOFUNCDESC_CONS_GP, EF_IA_64_ABSOLUTE): Define.
+2000-07-22 Jason Eckhardt <jle@cygnus.com>
+
+ * i860.h: New file.
+ (elf_i860_reloc_type): Defined ELF32 i860 relocations.
+
2000-07-20 Hans-Peter Nilsson <hp@axis.com>
common.h (EM_CRIS): New machine number.
@@ -540,7 +545,7 @@ Thu Feb 18 18:58:26 1999 Ian Lance Taylor <ian@cygnus.com>
Patch submitted by: Scott Bambrough <scottb@corelcomputer.com>
- * elf/external.h: struct Elf_External_Versym must be packed on
+ * external.h: struct Elf_External_Versym must be packed on
ARM. Code uses sizeof(Elf_External_Versym) and assumes it is
equal to sizeof(char[2]). Reported by Jim Pick <jim@jimpick.com>
@@ -585,6 +590,11 @@ Mon Feb 1 11:33:56 1999 Catherine Moore <clm@cygnus.com>
* mips.h: Add R_MIPS_JALR and adjust R_MIPS_max appropriately.
+Mon Nov 30 15:25:58 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * sh.h (elf_sh_reloc_type): Add R_SH_FIRST_INVALID_RELOC,
+ R_SH_LAST_INVALID_RELOC, R_SH_SWITCH8 and R_SH_max.
+
Tue Nov 10 15:12:28 1998 Nick Clifton <nickc@cygnus.com>
* common.h (EM_CYGNUS_FR30): Reduce to a 16 bit value.
diff --git a/include/elf/alpha.h b/include/elf/alpha.h
index d353434..8bf67bd 100644
--- a/include/elf/alpha.h
+++ b/include/elf/alpha.h
@@ -1,5 +1,5 @@
/* ALPHA ELF support for BFD.
- Copyright (C) 1996, 98, 2000 Free Software Foundation, Inc.
+ Copyright 1996, 1998, 2000 Free Software Foundation, Inc.
By Eric Youngdale, <eric@aib.com>. No processor supplement available
for this platform.
diff --git a/include/elf/arc.h b/include/elf/arc.h
index a8d0a74..6e94c29d 100644
--- a/include/elf/arc.h
+++ b/include/elf/arc.h
@@ -1,5 +1,5 @@
/* ARC ELF support for BFD.
- Copyright (C) 1995, 97, 98, 2000 Free Software Foundation, Inc.
+ Copyright 1995, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
Contributed by Doug Evans, (dje@cygnus.com)
This file is part of BFD, the Binary File Descriptor library.
diff --git a/include/elf/arm.h b/include/elf/arm.h
index c65df64..89dffe1 100644
--- a/include/elf/arm.h
+++ b/include/elf/arm.h
@@ -1,5 +1,5 @@
/* ARM ELF support for BFD.
- Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
diff --git a/include/elf/avr.h b/include/elf/avr.h
index 09cdf7b..59cf073 100644
--- a/include/elf/avr.h
+++ b/include/elf/avr.h
@@ -1,5 +1,5 @@
/* AVR ELF support for BFD.
- Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1999, 2000 Free Software Foundation, Inc.
Contributed by Denis Chertykov <denisc@overta.ru>
This file is part of BFD, the Binary File Descriptor library.
diff --git a/include/elf/common.h b/include/elf/common.h
index 991e57e..913e34f 100644
--- a/include/elf/common.h
+++ b/include/elf/common.h
@@ -1,5 +1,6 @@
/* ELF support for BFD.
- Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+ 2001
Free Software Foundation, Inc.
Written by Fred Fish @ Cygnus Support, from information published
diff --git a/include/elf/cris.h b/include/elf/cris.h
index 957f194..e467e4e 100644
--- a/include/elf/cris.h
+++ b/include/elf/cris.h
@@ -1,5 +1,5 @@
/* CRIS ELF support for BFD.
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright 2000 Free Software Foundation, Inc.
Contributed by Axis Communications AB, Lund, Sweden.
Written by Hans-Peter Nilsson.
diff --git a/include/elf/d10v.h b/include/elf/d10v.h
index 96bfaf2..5bc613b 100644
--- a/include/elf/d10v.h
+++ b/include/elf/d10v.h
@@ -1,5 +1,5 @@
/* d10v ELF support for BFD.
- Copyright (C) 1998, 2000 Free Software Foundation, Inc.
+ Copyright 1998, 2000 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
diff --git a/include/elf/d30v.h b/include/elf/d30v.h
index 369aa4b..5abb06a 100644
--- a/include/elf/d30v.h
+++ b/include/elf/d30v.h
@@ -1,5 +1,5 @@
/* d30v ELF support for BFD.
- Copyright (C) 1998, 2000 Free Software Foundation, Inc.
+ Copyright 1998, 2000 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
diff --git a/include/elf/dwarf.h b/include/elf/dwarf.h
index 1e72cd7..f793972 100644
--- a/include/elf/dwarf.h
+++ b/include/elf/dwarf.h
@@ -3,7 +3,7 @@
Written by Ron Guilmette (rfg@ncd.com)
-Copyright (C) 1992, 1999 Free Software Foundation, Inc.
+Copyright 1992, 1993, 1995, 1999 Free Software Foundation, Inc.
This file is part of GNU CC.
diff --git a/include/elf/dwarf2.h b/include/elf/dwarf2.h
index 1bd4fa6..82586bb 100644
--- a/include/elf/dwarf2.h
+++ b/include/elf/dwarf2.h
@@ -1,6 +1,6 @@
/* Declarations and definitions of codes relating to the DWARF symbolic
debugging information format.
- Copyright (C) 1992, 1993, 1995, 1996, 1999 Free Software Foundation, Inc.
+ Copyright 1992, 1993, 1995, 1996, 1999 Free Software Foundation, Inc.
Written by Gary Funck (gary@intrepid.com) The Ada Joint Program
Office (AJPO), Florida State Unviversity and Silicon Graphics Inc.
diff --git a/include/elf/external.h b/include/elf/external.h
index 5cab77e..fae3381 100644
--- a/include/elf/external.h
+++ b/include/elf/external.h
@@ -1,5 +1,6 @@
/* ELF support for BFD.
- Copyright (C) 1991, 92, 93, 95, 97, 98, 1999 Free Software Foundation, Inc.
+ Copyright 1991, 1992, 1993, 1995, 1997, 1998, 1999
+ Free Software Foundation, Inc.
Written by Fred Fish @ Cygnus Support, from information published
in "UNIX System V Release 4, Programmers Guide: ANSI C and
diff --git a/include/elf/fr30.h b/include/elf/fr30.h
index 54c1ae6..12a450d 100644
--- a/include/elf/fr30.h
+++ b/include/elf/fr30.h
@@ -1,5 +1,5 @@
/* FR30 ELF support for BFD.
- Copyright (C) 1998, 99, 2000 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
diff --git a/include/elf/hppa.h b/include/elf/hppa.h
index e9ec03a..45e0b9f 100644
--- a/include/elf/hppa.h
+++ b/include/elf/hppa.h
@@ -1,5 +1,6 @@
/* HPPA ELF support for BFD.
- Copyright (C) 1993, 94, 95, 99, 2000 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1998, 1999, 2000
+ Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
diff --git a/include/elf/i370.h b/include/elf/i370.h
index b4e21aa..b6f4785 100644
--- a/include/elf/i370.h
+++ b/include/elf/i370.h
@@ -1,5 +1,5 @@
/* i370 ELF support for BFD.
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright 2000 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
diff --git a/include/elf/i386.h b/include/elf/i386.h
index c91f4be..4a15efc 100644
--- a/include/elf/i386.h
+++ b/include/elf/i386.h
@@ -1,5 +1,5 @@
/* ix86 ELF support for BFD.
- Copyright (C) 1998, 99, 2000 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
diff --git a/include/elf/i860.h b/include/elf/i860.h
index 08b2ff5..de34aeb 100644
--- a/include/elf/i860.h
+++ b/include/elf/i860.h
@@ -1,5 +1,5 @@
/* i860 ELF support for BFD.
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright 2000 Free Software Foundation, Inc.
Contributed by Jason Eckhardt <jle@cygnus.com>.
diff --git a/include/elf/i960.h b/include/elf/i960.h
index cbf67d7..253e438 100644
--- a/include/elf/i960.h
+++ b/include/elf/i960.h
@@ -1,5 +1,5 @@
/* Intel 960 ELF support for BFD.
- Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1999, 2000 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
diff --git a/include/elf/ia64.h b/include/elf/ia64.h
index 3b18288..ecd74b0 100644
--- a/include/elf/ia64.h
+++ b/include/elf/ia64.h
@@ -1,5 +1,5 @@
/* IA-64 ELF support for BFD.
- Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
This file is part of BFD, the Binary File Descriptor library.
diff --git a/include/elf/internal.h b/include/elf/internal.h
index 6ca316b..eb79917 100644
--- a/include/elf/internal.h
+++ b/include/elf/internal.h
@@ -1,5 +1,5 @@
/* ELF support for BFD.
- Copyright (C) 1991, 92, 93, 94, 95, 97, 98, 2000
+ Copyright 1991, 1992, 1993, 1994, 1995, 1997, 1998, 2000
Free Software Foundation, Inc.
Written by Fred Fish @ Cygnus Support, from information published
diff --git a/include/elf/m32r.h b/include/elf/m32r.h
index 9b6c4e9..2cb308d 100644
--- a/include/elf/m32r.h
+++ b/include/elf/m32r.h
@@ -1,5 +1,5 @@
/* M32R ELF support for BFD.
- Copyright (C) 1996, 97, 98, 99, 2000 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
diff --git a/include/elf/m68hc11.h b/include/elf/m68hc11.h
index 30e0556..0f9546d 100644
--- a/include/elf/m68hc11.h
+++ b/include/elf/m68hc11.h
@@ -1,5 +1,5 @@
/* m68hc11 & m68hc12 ELF support for BFD.
- Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1999, 2000 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
diff --git a/include/elf/m68k.h b/include/elf/m68k.h
index a6aab10..03bf465 100644
--- a/include/elf/m68k.h
+++ b/include/elf/m68k.h
@@ -1,5 +1,5 @@
/* MC68k ELF support for BFD.
- Copyright (C) 1998, 99, 2000 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
diff --git a/include/elf/mcore.h b/include/elf/mcore.h
index f97a682..387a57d 100644
--- a/include/elf/mcore.h
+++ b/include/elf/mcore.h
@@ -1,5 +1,5 @@
/* Motorola MCore support for BFD.
- Copyright (C) 1995, 99, 2000 Free Software Foundation, Inc.
+ Copyright 1995, 1999, 2000 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
diff --git a/include/elf/mips.h b/include/elf/mips.h
index 4446512..9d04d21 100644
--- a/include/elf/mips.h
+++ b/include/elf/mips.h
@@ -1,5 +1,5 @@
/* MIPS ELF support for BFD.
- Copyright (C) 1993, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
Free Software Foundation, Inc.
By Ian Lance Taylor, Cygnus Support, <ian@cygnus.com>, from
diff --git a/include/elf/mn10200.h b/include/elf/mn10200.h
index 1a14ee7..1dfade5 100644
--- a/include/elf/mn10200.h
+++ b/include/elf/mn10200.h
@@ -1,5 +1,5 @@
/* MN10200 ELF support for BFD.
- Copyright (C) 1998, 2000 Free Software Foundation, Inc.
+ Copyright 1998, 2000 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
diff --git a/include/elf/mn10300.h b/include/elf/mn10300.h
index 74f2da8..e10be90 100644
--- a/include/elf/mn10300.h
+++ b/include/elf/mn10300.h
@@ -1,5 +1,5 @@
/* MN10300 ELF support for BFD.
- Copyright (C) 1998, 99, 2000 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
diff --git a/include/elf/pj.h b/include/elf/pj.h
index 7690ea6ae..586fd3a 100644
--- a/include/elf/pj.h
+++ b/include/elf/pj.h
@@ -1,5 +1,5 @@
/* picoJava ELF support for BFD.
- Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1999, 2000 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
diff --git a/include/elf/ppc.h b/include/elf/ppc.h
index f53bacd..426961e 100644
--- a/include/elf/ppc.h
+++ b/include/elf/ppc.h
@@ -1,5 +1,5 @@
/* PPC ELF support for BFD.
- Copyright (C) 1995, 96, 98, 2000 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1998, 2000 Free Software Foundation, Inc.
By Michael Meissner, Cygnus Support, <meissner@cygnus.com>, from information
in the System V Application Binary Interface, PowerPC Processor Supplement
diff --git a/include/elf/reloc-macros.h b/include/elf/reloc-macros.h
index df5e0e3..9ad346c 100644
--- a/include/elf/reloc-macros.h
+++ b/include/elf/reloc-macros.h
@@ -1,5 +1,5 @@
/* Generic relocation support for BFD.
- Copyright (C) 1998, 99, 2000 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
diff --git a/include/elf/s390.h b/include/elf/s390.h
index 3cd9976..8b67c96 100644
--- a/include/elf/s390.h
+++ b/include/elf/s390.h
@@ -1,5 +1,5 @@
/* 390 ELF support for BFD.
- Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+ 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.
diff --git a/include/elf/sh.h b/include/elf/sh.h
index 6a1e561..700ca3e 100644
--- a/include/elf/sh.h
+++ b/include/elf/sh.h
@@ -1,5 +1,5 @@
/* SH ELF support for BFD.
- Copyright (C) 1998, 2000 Free Software Foundation, Inc.
+ Copyright 1998, 2000 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
diff --git a/include/elf/sparc.h b/include/elf/sparc.h
index f4a199e..a9b7573 100644
--- a/include/elf/sparc.h
+++ b/include/elf/sparc.h
@@ -1,5 +1,5 @@
/* SPARC ELF support for BFD.
- Copyright (C) 1996, 97, 98, 99, 2000 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
By Doug Evans, Cygnus Support, <dje@cygnus.com>.
This file is part of BFD, the Binary File Descriptor library.
diff --git a/include/elf/v850.h b/include/elf/v850.h
index 7b22340..62b9541 100644
--- a/include/elf/v850.h
+++ b/include/elf/v850.h
@@ -1,5 +1,5 @@
/* V850 ELF support for BFD.
- Copyright (C) 1997, 98, 2000 Free Software Foundation, Inc.
+ Copyright 1997, 1998, 2000 Free Software Foundation, Inc.
Created by Michael Meissner, Cygnus Support <meissner@cygnus.com>
This file is part of BFD, the Binary File Descriptor library.
diff --git a/include/floatformat.h b/include/floatformat.h
index e4d1d15..4335401 100644
--- a/include/floatformat.h
+++ b/include/floatformat.h
@@ -1,5 +1,5 @@
/* IEEE floating point support declarations, for GDB, the GNU Debugger.
- Copyright (C) 1991, 2000 Free Software Foundation, Inc.
+ Copyright 1991, 1994, 1995, 1997, 2000 Free Software Foundation, Inc.
This file is part of GDB.
diff --git a/include/fnmatch.h b/include/fnmatch.h
index d5eb700..37d23ee 100644
--- a/include/fnmatch.h
+++ b/include/fnmatch.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
+/* Copyright 1991, 1992, 1993, 1996 Free Software Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C Library.
Bugs can be reported to bug-glibc@prep.ai.mit.edu.
diff --git a/include/getopt.h b/include/getopt.h
index bf65c6e..04e1d9e 100644
--- a/include/getopt.h
+++ b/include/getopt.h
@@ -1,5 +1,5 @@
/* Declarations for getopt.
- Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997
+ Copyright 1989, 1990, 1991, 1992, 1993, 1998, 2000
Free Software Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C Library.
diff --git a/include/hashtab.h b/include/hashtab.h
index a577c5e..662254c 100644
--- a/include/hashtab.h
+++ b/include/hashtab.h
@@ -1,5 +1,5 @@
/* An expandable hash tables datatype.
- Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1999, 2000 Free Software Foundation, Inc.
Contributed by Vladimir Makarov (vmakarov@cygnus.com).
This program is free software; you can redistribute it and/or modify
diff --git a/include/hp-symtab.h b/include/hp-symtab.h
index cf626c0..0c9a48a 100644
--- a/include/hp-symtab.h
+++ b/include/hp-symtab.h
@@ -4,7 +4,7 @@
Written by the Center for Software Science at the University of Utah
and by Cygnus Support.
- Copyright 1994 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1998, 1999 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
diff --git a/include/ieee.h b/include/ieee.h
index 5ade39d..5abc32b 100644
--- a/include/ieee.h
+++ b/include/ieee.h
@@ -1,138 +1,164 @@
/* IEEE Standard 695-1980 "Universal Format for Object Modules" header file
+
+ 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, 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.
+
Contributed by Cygnus Support. */
#define N_W_VARIABLES 8
#define Module_Beginning 0xe0
-typedef struct ieee_module {
- char *processor;
- char *module_name;
-} ieee_module_begin_type;
+typedef struct ieee_module
+ {
+ char *processor;
+ char *module_name;
+ }
+ieee_module_begin_type;
#define Address_Descriptor 0xec
-typedef struct ieee_address {
-bfd_vma number_of_bits_mau;
- bfd_vma number_of_maus_in_address;
+typedef struct ieee_address
+ {
+ bfd_vma number_of_bits_mau;
+ bfd_vma number_of_maus_in_address;
- unsigned char byte_order;
+ unsigned char byte_order;
#define IEEE_LITTLE 0xcc
#define IEEE_BIG 0xcd
-} ieee_address_descriptor_type;
-
-typedef union ieee_w_variable {
- file_ptr offset[N_W_VARIABLES];
- struct {
- file_ptr extension_record;
- file_ptr environmental_record;
- file_ptr section_part;
- file_ptr external_part;
- file_ptr debug_information_part;
- file_ptr data_part;
- file_ptr trailer_part;
- file_ptr me_record;
- } r;
-} ieee_w_variable_type;
-
-
-
-
+ }
+ieee_address_descriptor_type;
+
+typedef union ieee_w_variable
+ {
+ file_ptr offset[N_W_VARIABLES];
+
+ struct
+ {
+ file_ptr extension_record;
+ file_ptr environmental_record;
+ file_ptr section_part;
+ file_ptr external_part;
+ file_ptr debug_information_part;
+ file_ptr data_part;
+ file_ptr trailer_part;
+ file_ptr me_record;
+ }
+ r;
+ }
+ieee_w_variable_type;
typedef enum ieee_record
-{
- ieee_number_start_enum = 0x00,
- ieee_number_end_enum=0x7f,
- ieee_number_repeat_start_enum = 0x80,
- ieee_number_repeat_end_enum = 0x88,
- ieee_number_repeat_4_enum = 0x84,
- ieee_number_repeat_3_enum = 0x83,
- ieee_number_repeat_2_enum = 0x82,
- ieee_number_repeat_1_enum = 0x81,
- ieee_module_beginning_enum = 0xe0,
- ieee_module_end_enum = 0xe1,
- ieee_extension_length_1_enum = 0xde,
- ieee_extension_length_2_enum = 0xdf,
- ieee_section_type_enum = 0xe6,
- ieee_section_alignment_enum = 0xe7,
- ieee_external_symbol_enum = 0xe8,
- ieee_comma = 0x90,
- ieee_external_reference_enum = 0xe9,
- ieee_set_current_section_enum = 0xe5,
- ieee_address_descriptor_enum = 0xec,
- ieee_load_constant_bytes_enum = 0xed,
- ieee_load_with_relocation_enum = 0xe4,
-
- ieee_variable_A_enum = 0xc1,
- ieee_variable_B_enum = 0xc2,
- ieee_variable_C_enum = 0xc3,
- ieee_variable_D_enum = 0xc4,
- ieee_variable_E_enum = 0xc5,
- ieee_variable_F_enum = 0xc6,
- ieee_variable_G_enum = 0xc7,
- ieee_variable_H_enum = 0xc8,
- ieee_variable_I_enum = 0xc9,
- ieee_variable_J_enum = 0xca,
- ieee_variable_K_enum = 0xcb,
- ieee_variable_L_enum = 0xcc,
- ieee_variable_M_enum = 0xcd,
- ieee_variable_N_enum = 0xce,
- ieee_variable_O_enum = 0xcf,
- ieee_variable_P_enum = 0xd0,
- ieee_variable_Q_enum = 0xd1,
- ieee_variable_R_enum = 0xd2,
- ieee_variable_S_enum = 0xd3,
- ieee_variable_T_enum = 0xd4,
- ieee_variable_U_enum = 0xd5,
- ieee_variable_V_enum = 0xd6,
- ieee_variable_W_enum = 0xd7,
- ieee_variable_X_enum = 0xd8,
- ieee_variable_Y_enum = 0xd9,
- ieee_variable_Z_enum = 0xda,
- ieee_function_plus_enum = 0xa5,
- ieee_function_minus_enum = 0xa6,
- ieee_function_signed_open_b_enum = 0xba,
- ieee_function_signed_close_b_enum = 0xbb,
-
- ieee_function_unsigned_open_b_enum = 0xbc,
- ieee_function_unsigned_close_b_enum = 0xbd,
-
- ieee_function_either_open_b_enum = 0xbe,
- ieee_function_either_close_b_enum = 0xbf,
- ieee_record_seperator_enum = 0xdb,
-
- ieee_e2_first_byte_enum = 0xe2,
- ieee_section_size_enum = 0xe2d3,
- ieee_physical_region_size_enum = 0xe2c1,
- ieee_region_base_address_enum = 0xe2c2,
- ieee_mau_size_enum = 0xe2c6,
- ieee_m_value_enum = 0xe2cd,
- ieee_section_base_address_enum = 0xe2cc,
- ieee_asn_record_enum = 0xe2ce,
- ieee_section_offset_enum = 0xe2d2,
- ieee_value_starting_address_enum = 0xe2c7,
- ieee_assign_value_to_variable_enum = 0xe2d7,
- ieee_set_current_pc_enum = 0xe2d0,
- ieee_value_record_enum = 0xe2c9,
- ieee_nn_record = 0xf0,
- ieee_at_record_enum = 0xf1,
- ieee_ty_record_enum = 0xf2,
- ieee_attribute_record_enum = 0xf1c9,
- ieee_atn_record_enum = 0xf1ce,
- ieee_external_reference_info_record_enum = 0xf1d8,
- ieee_weak_external_reference_enum= 0xf4,
- ieee_repeat_data_enum = 0xf7,
- ieee_bb_record_enum = 0xf8,
- ieee_be_record_enum = 0xf9
-} ieee_record_enum_type;
-
-
-typedef struct ieee_section {
- unsigned int section_index;
- unsigned int section_type;
- char *section_name;
- unsigned int parent_section_index;
- unsigned int sibling_section_index;
- unsigned int context_index;
-} ieee_section_type;
+ {
+ ieee_number_start_enum = 0x00,
+ ieee_number_end_enum=0x7f,
+ ieee_number_repeat_start_enum = 0x80,
+ ieee_number_repeat_end_enum = 0x88,
+ ieee_number_repeat_4_enum = 0x84,
+ ieee_number_repeat_3_enum = 0x83,
+ ieee_number_repeat_2_enum = 0x82,
+ ieee_number_repeat_1_enum = 0x81,
+ ieee_module_beginning_enum = 0xe0,
+ ieee_module_end_enum = 0xe1,
+ ieee_extension_length_1_enum = 0xde,
+ ieee_extension_length_2_enum = 0xdf,
+ ieee_section_type_enum = 0xe6,
+ ieee_section_alignment_enum = 0xe7,
+ ieee_external_symbol_enum = 0xe8,
+ ieee_comma = 0x90,
+ ieee_external_reference_enum = 0xe9,
+ ieee_set_current_section_enum = 0xe5,
+ ieee_address_descriptor_enum = 0xec,
+ ieee_load_constant_bytes_enum = 0xed,
+ ieee_load_with_relocation_enum = 0xe4,
+
+ ieee_variable_A_enum = 0xc1,
+ ieee_variable_B_enum = 0xc2,
+ ieee_variable_C_enum = 0xc3,
+ ieee_variable_D_enum = 0xc4,
+ ieee_variable_E_enum = 0xc5,
+ ieee_variable_F_enum = 0xc6,
+ ieee_variable_G_enum = 0xc7,
+ ieee_variable_H_enum = 0xc8,
+ ieee_variable_I_enum = 0xc9,
+ ieee_variable_J_enum = 0xca,
+ ieee_variable_K_enum = 0xcb,
+ ieee_variable_L_enum = 0xcc,
+ ieee_variable_M_enum = 0xcd,
+ ieee_variable_N_enum = 0xce,
+ ieee_variable_O_enum = 0xcf,
+ ieee_variable_P_enum = 0xd0,
+ ieee_variable_Q_enum = 0xd1,
+ ieee_variable_R_enum = 0xd2,
+ ieee_variable_S_enum = 0xd3,
+ ieee_variable_T_enum = 0xd4,
+ ieee_variable_U_enum = 0xd5,
+ ieee_variable_V_enum = 0xd6,
+ ieee_variable_W_enum = 0xd7,
+ ieee_variable_X_enum = 0xd8,
+ ieee_variable_Y_enum = 0xd9,
+ ieee_variable_Z_enum = 0xda,
+ ieee_function_plus_enum = 0xa5,
+ ieee_function_minus_enum = 0xa6,
+ ieee_function_signed_open_b_enum = 0xba,
+ ieee_function_signed_close_b_enum = 0xbb,
+
+ ieee_function_unsigned_open_b_enum = 0xbc,
+ ieee_function_unsigned_close_b_enum = 0xbd,
+
+ ieee_function_either_open_b_enum = 0xbe,
+ ieee_function_either_close_b_enum = 0xbf,
+ ieee_record_seperator_enum = 0xdb,
+
+ ieee_e2_first_byte_enum = 0xe2,
+ ieee_section_size_enum = 0xe2d3,
+ ieee_physical_region_size_enum = 0xe2c1,
+ ieee_region_base_address_enum = 0xe2c2,
+ ieee_mau_size_enum = 0xe2c6,
+ ieee_m_value_enum = 0xe2cd,
+ ieee_section_base_address_enum = 0xe2cc,
+ ieee_asn_record_enum = 0xe2ce,
+ ieee_section_offset_enum = 0xe2d2,
+ ieee_value_starting_address_enum = 0xe2c7,
+ ieee_assign_value_to_variable_enum = 0xe2d7,
+ ieee_set_current_pc_enum = 0xe2d0,
+ ieee_value_record_enum = 0xe2c9,
+ ieee_nn_record = 0xf0,
+ ieee_at_record_enum = 0xf1,
+ ieee_ty_record_enum = 0xf2,
+ ieee_attribute_record_enum = 0xf1c9,
+ ieee_atn_record_enum = 0xf1ce,
+ ieee_external_reference_info_record_enum = 0xf1d8,
+ ieee_weak_external_reference_enum= 0xf4,
+ ieee_repeat_data_enum = 0xf7,
+ ieee_bb_record_enum = 0xf8,
+ ieee_be_record_enum = 0xf9
+ }
+ieee_record_enum_type;
+
+typedef struct ieee_section
+ {
+ unsigned int section_index;
+ unsigned int section_type;
+ char * section_name;
+ unsigned int parent_section_index;
+ unsigned int sibling_section_index;
+ unsigned int context_index;
+ }
+ieee_section_type;
+
#define IEEE_REFERENCE_BASE 11
#define IEEE_PUBLIC_BASE 32
#define IEEE_SECTION_NUMBER_BASE 1
diff --git a/include/libiberty.h b/include/libiberty.h
index c61c1f0..42b01c9 100644
--- a/include/libiberty.h
+++ b/include/libiberty.h
@@ -1,4 +1,22 @@
/* Function declarations for libiberty.
+
+ 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, 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.
+
Written by Cygnus Support, 1994.
The libiberty library provides a number of functions which are
diff --git a/include/md5.h b/include/md5.h
index 0840b31..ad51f19 100644
--- a/include/md5.h
+++ b/include/md5.h
@@ -1,6 +1,6 @@
/* md5.h - Declaration of functions and data types used for MD5 sum
computing library functions.
- Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 2000 Free Software Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C
Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu.
diff --git a/include/mpw/spin.h b/include/mpw/spin.h
index 867d145..674b00a 100644
--- a/include/mpw/spin.h
+++ b/include/mpw/spin.h
@@ -1,5 +1,5 @@
/* Progress macros that use SpinCursor in MPW.
- Copyright (C) 1994 Free Software Foundation, Inc.
+ Copyright 1994 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
diff --git a/include/nlm/alpha-ext.h b/include/nlm/alpha-ext.h
index 37199dd..ae67524 100644
--- a/include/nlm/alpha-ext.h
+++ b/include/nlm/alpha-ext.h
@@ -1,5 +1,5 @@
/* Alpha NLM (NetWare Loadable Module) support for BFD.
- Copyright (C) 1993 Free Software Foundation, Inc.
+ Copyright 1993 Free Software Foundation, Inc.
By Ian Lance Taylor, Cygnus Support
This file is part of BFD, the Binary File Descriptor library.
diff --git a/include/nlm/common.h b/include/nlm/common.h
index e96550a..70ec186 100644
--- a/include/nlm/common.h
+++ b/include/nlm/common.h
@@ -1,5 +1,5 @@
/* NLM (NetWare Loadable Module) support for BFD.
- Copyright (C) 1993 Free Software Foundation, Inc.
+ Copyright 1993 Free Software Foundation, Inc.
Written by Fred Fish @ Cygnus Support
diff --git a/include/nlm/external.h b/include/nlm/external.h
index f77a5bb..12a486f 100644
--- a/include/nlm/external.h
+++ b/include/nlm/external.h
@@ -1,5 +1,5 @@
/* NLM (NetWare Loadable Module) support for BFD.
- Copyright (C) 1993 Free Software Foundation, Inc.
+ Copyright 1993, 1994 Free Software Foundation, Inc.
Written by Fred Fish @ Cygnus Support
diff --git a/include/nlm/i386-ext.h b/include/nlm/i386-ext.h
index d33ad2d..c738012 100644
--- a/include/nlm/i386-ext.h
+++ b/include/nlm/i386-ext.h
@@ -1,5 +1,5 @@
/* i386 NLM (NetWare Loadable Module) support for BFD.
- Copyright (C) 1993 Free Software Foundation, Inc.
+ Copyright 1993 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
diff --git a/include/nlm/internal.h b/include/nlm/internal.h
index dd27dc4..cae93f8 100644
--- a/include/nlm/internal.h
+++ b/include/nlm/internal.h
@@ -1,5 +1,5 @@
/* NLM (NetWare Loadable Module) support for BFD.
- Copyright (C) 1993 Free Software Foundation, Inc.
+ Copyright 1993, 1994 Free Software Foundation, Inc.
Written by Fred Fish @ Cygnus Support.
diff --git a/include/nlm/sparc32-ext.h b/include/nlm/sparc32-ext.h
index 0deb2de..d73b644 100644
--- a/include/nlm/sparc32-ext.h
+++ b/include/nlm/sparc32-ext.h
@@ -1,5 +1,5 @@
/* SPARC NLM (NetWare Loadable Module) support for BFD.
- Copyright (C) 1993 Free Software Foundation, Inc.
+ Copyright 1993 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
diff --git a/include/oasys.h b/include/oasys.h
index 867d250..c8f737a 100644
--- a/include/oasys.h
+++ b/include/oasys.h
@@ -1,120 +1,154 @@
/* Oasys object format header file for BFD.
+
+ 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, 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.
+
Contributed by Cygnus Support. */
#define OASYS_MAX_SEC_COUNT 16
/* **** */
-typedef struct oasys_archive_header {
- unsigned int version;
- char create_date[12];
- char revision_date[12];
- unsigned int mod_count;
- file_ptr mod_tbl_offset;
- unsigned int sym_tbl_size;
- unsigned int sym_count;
- file_ptr sym_tbl_offset;
- unsigned int xref_count;
- file_ptr xref_lst_offset;
-} oasys_archive_header_type;
-
-typedef struct oasys_extarchive_header {
- bfd_byte version[4];
- bfd_byte create_date[12];
- bfd_byte revision_date[12];
- bfd_byte mod_count[4];
- bfd_byte mod_tbl_offset[4];
- bfd_byte sym_tbl_size[4];
- bfd_byte sym_count[4];
- bfd_byte sym_tbl_offset[4];
- bfd_byte xref_count[4];
- bfd_byte xref_lst_offset[4];
-} oasys_extarchive_header_type;
-
-typedef struct oasys_module_table {
- int mod_number;
- char mod_date[12];
- unsigned int mod_size;
- unsigned int dep_count;
- unsigned int depee_count;
- file_ptr file_offset;
- unsigned int sect_count;
- char *module_name;
- unsigned int module_name_size;
-} oasys_module_table_type;
-
-
-typedef struct oasys_extmodule_table_a {
- bfd_byte mod_number[4];
- bfd_byte mod_date[12];
- bfd_byte mod_size[4];
- bfd_byte dep_count[4];
- bfd_byte depee_count[4];
- bfd_byte sect_count[4];
- bfd_byte file_offset[4];
- bfd_byte mod_name[32];
-} oasys_extmodule_table_type_a_type;
-
-typedef struct oasys_extmodule_table_b {
- bfd_byte mod_number[4];
- bfd_byte mod_date[12];
- bfd_byte mod_size[4];
- bfd_byte dep_count[4];
- bfd_byte depee_count[4];
- bfd_byte sect_count[4];
- bfd_byte file_offset[4];
- bfd_byte mod_name_length[4];
-} oasys_extmodule_table_type_b_type;
-
-
-typedef enum oasys_record {
- oasys_record_is_end_enum = 0,
- oasys_record_is_data_enum = 1,
- oasys_record_is_symbol_enum = 2,
- oasys_record_is_header_enum = 3,
- oasys_record_is_named_section_enum = 4,
- oasys_record_is_com_enum = 5,
- oasys_record_is_debug_enum = 6,
- oasys_record_is_section_enum = 7,
- oasys_record_is_debug_file_enum = 8,
- oasys_record_is_module_enum = 9,
- oasys_record_is_local_enum = 10
-} oasys_record_enum_type;
-
-
-
-typedef struct oasys_record_header {
- unsigned char length;
- unsigned char check_sum;
- unsigned char type;
- unsigned char fill;
-} oasys_record_header_type;
-
-typedef struct oasys_data_record {
- oasys_record_header_type header;
- unsigned char relb;
- bfd_byte addr[4];
- /* maximum total size of data record is 255 bytes */
- bfd_byte data[246];
-} oasys_data_record_type;
-
-typedef struct oasys_header_record {
- oasys_record_header_type header;
- unsigned char version_number;
- unsigned char rev_number;
- char module_name[26-6];
- char description[64-26];
-} oasys_header_record_type;
+typedef struct oasys_archive_header
+ {
+ unsigned int version;
+ char create_date[12];
+ char revision_date[12];
+ unsigned int mod_count;
+ file_ptr mod_tbl_offset;
+ unsigned int sym_tbl_size;
+ unsigned int sym_count;
+ file_ptr sym_tbl_offset;
+ unsigned int xref_count;
+ file_ptr xref_lst_offset;
+ }
+oasys_archive_header_type;
+
+typedef struct oasys_extarchive_header
+ {
+ bfd_byte version[4];
+ bfd_byte create_date[12];
+ bfd_byte revision_date[12];
+ bfd_byte mod_count[4];
+ bfd_byte mod_tbl_offset[4];
+ bfd_byte sym_tbl_size[4];
+ bfd_byte sym_count[4];
+ bfd_byte sym_tbl_offset[4];
+ bfd_byte xref_count[4];
+ bfd_byte xref_lst_offset[4];
+ }
+oasys_extarchive_header_type;
+
+typedef struct oasys_module_table
+ {
+ int mod_number;
+ char mod_date[12];
+ unsigned int mod_size;
+ unsigned int dep_count;
+ unsigned int depee_count;
+ file_ptr file_offset;
+ unsigned int sect_count;
+ char *module_name;
+ unsigned int module_name_size;
+ }
+oasys_module_table_type;
+
+typedef struct oasys_extmodule_table_a
+ {
+ bfd_byte mod_number[4];
+ bfd_byte mod_date[12];
+ bfd_byte mod_size[4];
+ bfd_byte dep_count[4];
+ bfd_byte depee_count[4];
+ bfd_byte sect_count[4];
+ bfd_byte file_offset[4];
+ bfd_byte mod_name[32];
+ }
+oasys_extmodule_table_type_a_type;
+
+typedef struct oasys_extmodule_table_b
+ {
+ bfd_byte mod_number[4];
+ bfd_byte mod_date[12];
+ bfd_byte mod_size[4];
+ bfd_byte dep_count[4];
+ bfd_byte depee_count[4];
+ bfd_byte sect_count[4];
+ bfd_byte file_offset[4];
+ bfd_byte mod_name_length[4];
+ }
+oasys_extmodule_table_type_b_type;
+
+typedef enum oasys_record
+ {
+ oasys_record_is_end_enum = 0,
+ oasys_record_is_data_enum = 1,
+ oasys_record_is_symbol_enum = 2,
+ oasys_record_is_header_enum = 3,
+ oasys_record_is_named_section_enum = 4,
+ oasys_record_is_com_enum = 5,
+ oasys_record_is_debug_enum = 6,
+ oasys_record_is_section_enum = 7,
+ oasys_record_is_debug_file_enum = 8,
+ oasys_record_is_module_enum = 9,
+ oasys_record_is_local_enum = 10
+ }
+oasys_record_enum_type;
+
+typedef struct oasys_record_header
+ {
+ unsigned char length;
+ unsigned char check_sum;
+ unsigned char type;
+ unsigned char fill;
+ }
+oasys_record_header_type;
+
+typedef struct oasys_data_record
+ {
+ oasys_record_header_type header;
+ unsigned char relb;
+ bfd_byte addr[4];
+ /* maximum total size of data record is 255 bytes */
+ bfd_byte data[246];
+ }
+oasys_data_record_type;
+
+typedef struct oasys_header_record
+ {
+ oasys_record_header_type header;
+ unsigned char version_number;
+ unsigned char rev_number;
+ char module_name[26-6];
+ char description[64-26];
+ }
+oasys_header_record_type;
#define OASYS_VERSION_NUMBER 0
#define OASYS_REV_NUMBER 0
-typedef struct oasys_symbol_record {
- oasys_record_header_type header;
- unsigned char relb;
- bfd_byte value[4];
- bfd_byte refno[2];
- char name[64];
-} oasys_symbol_record_type;
+typedef struct oasys_symbol_record
+ {
+ oasys_record_header_type header;
+ unsigned char relb;
+ bfd_byte value[4];
+ bfd_byte refno[2];
+ char name[64];
+ }
+oasys_symbol_record_type;
#define RELOCATION_PCREL_BIT 0x80
#define RELOCATION_32BIT_BIT 0x40
@@ -125,28 +159,34 @@ typedef struct oasys_symbol_record {
#define RELOCATION_TYPE_COM 0x30
#define RELOCATION_SECT_BITS 0x0f
-typedef struct oasys_section_record {
- oasys_record_header_type header;
- unsigned char relb;
- bfd_byte value[4];
- bfd_byte vma[4];
- bfd_byte fill[3];
-} oasys_section_record_type;
-
-typedef struct oasys_end_record {
- oasys_record_header_type header;
- unsigned char relb;
- bfd_byte entry[4];
- bfd_byte fill[2];
- bfd_byte zero;
-} oasys_end_record_type;
-
-typedef union oasys_record_union {
- oasys_record_header_type header;
- oasys_data_record_type data;
- oasys_section_record_type section;
- oasys_symbol_record_type symbol;
- oasys_header_record_type first;
- oasys_end_record_type end;
- bfd_byte pad[256];
-} oasys_record_union_type;
+typedef struct oasys_section_record
+ {
+ oasys_record_header_type header;
+ unsigned char relb;
+ bfd_byte value[4];
+ bfd_byte vma[4];
+ bfd_byte fill[3];
+ }
+oasys_section_record_type;
+
+typedef struct oasys_end_record
+ {
+ oasys_record_header_type header;
+ unsigned char relb;
+ bfd_byte entry[4];
+ bfd_byte fill[2];
+ bfd_byte zero;
+ }
+oasys_end_record_type;
+
+typedef union oasys_record_union
+ {
+ oasys_record_header_type header;
+ oasys_data_record_type data;
+ oasys_section_record_type section;
+ oasys_symbol_record_type symbol;
+ oasys_header_record_type first;
+ oasys_end_record_type end;
+ bfd_byte pad[256];
+ }
+oasys_record_union_type;
diff --git a/include/obstack.h b/include/obstack.h
index 314a27a..d86d9f2 100644
--- a/include/obstack.h
+++ b/include/obstack.h
@@ -1,5 +1,6 @@
/* obstack.h - object stack macros
- Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997, 1998
+ Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997, 1998,
+ 1999, 2000
Free Software Foundation, Inc.
diff --git a/include/opcode/ChangeLog b/include/opcode/ChangeLog
index 93cd894..ce26821 100644
--- a/include/opcode/ChangeLog
+++ b/include/opcode/ChangeLog
@@ -169,6 +169,10 @@
* i386.h: Swap the Intel syntax "movsx"/"movzx" due to the
IgnoreSize change.
+2000-08-08 Jason Eckhardt <jle@cygnus.com>
+
+ * i860.h: Small formatting adjustments.
+
2000-07-29 Marek Michalkiewicz <marekm@linux.org.pl>
* avr.h (AVR_UNDEF_P, AVR_SKIP_P, AVR_DISP0_P): New macros.
@@ -179,6 +183,29 @@
* cgen.h (cgen_hw_lookup_by_num): Second parameter is unsigned.
+2000-07-22 Jason Eckhardt <jle@cygnus.com>
+
+ * i860.h (btne, bte, bla): Changed these opcodes
+ to use sbroff ('r') instead of split16 ('s').
+ (J, K, L, M): New operand types for 16-bit aligned fields.
+ (ld.x, {p}fld.x, fst.x, pst.d): Changed these opcodes to
+ use I, J, K, L, M instead of just I.
+ (T, U): New operand types for split 16-bit aligned fields.
+ (st.x): Changed these opcodes to use S, T, U instead of just S.
+ (andh, andnoth, orh, xorh): Deleted 3-register forms as they do not
+ exist on the i860.
+ (pfgt.sd, pfle.sd): Deleted these as they do not exist on the i860.
+ (pfeq.ss, pfeq.dd): New opcodes.
+ (st.s): Fixed incorrect mask bits.
+ (fmlow): Fixed incorrect mask bits.
+ (fzchkl, pfzchkl): Fixed incorrect mask bits.
+ (faddz, pfaddz): Fixed incorrect mask bits.
+ (form, pform): Fixed incorrect mask bits.
+ (pfld.l): Fixed incorrect mask bits.
+ (fst.q): Fixed incorrect mask bits.
+ (all floating point opcodes): Fixed incorrect mask bits for
+ handling of dual bit.
+
2000-07-20 Hans-Peter Nilsson <hp@axis.com>
cris.h: New file.
@@ -316,6 +343,11 @@ Fri Apr 21 13:20:53 2000 Richard Henderson <rth@cygnus.com>
* i370.h: New file.
+2000-02-22 Chandra Chavva <cchavva@cygnus.com>
+
+ * d30v.h (FLAG_NOT_WITH_ADDSUBppp): Redefined as operation
+ cannot be combined in parallel with ADD/SUBppp.
+
2000-02-22 Andrew Haley <aph@cygnus.com>
* mips.h: (OPCODE_IS_MEMBER): Add comment.
@@ -1835,8 +1867,8 @@ Mon Jan 23 16:45:43 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
Sat Jan 21 17:50:38 1995 Pat Rankin (rankin@eql.caltech.edu)
- * ../include/opcode/vax.h (struct vot_wot, field `args'): make
- it pointer to const char;
+ * vax.h (struct vot_wot, field `args'): Make it pointer to const
+ char.
(struct vot, field `name'): ditto.
Thu Jan 19 14:47:53 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
@@ -2157,6 +2189,15 @@ Fri Jun 11 18:38:44 1993 Ken Raeburn (raeburn@cygnus.com)
* hppa.h: Update "free list" of letters and update
comments describing each letter's function.
+Thu Jul 8 09:05:26 1993 Doug Evans (dje@canuck.cygnus.com)
+
+ * h8300.h: Lots of little fixes for the h8/300h.
+
+Tue Jun 8 12:16:03 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
+
+ Support for H8/300-H
+ * h8300.h: Lots of new opcodes.
+
Fri Jun 4 15:41:37 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
* h8300.h: checkpoint, includes H8/300-H opcodes.
@@ -2428,6 +2469,10 @@ Sun Dec 22 12:18:18 1991 Michael Tiemann (tiemann at cygnus.com)
* sparc.h (nop): Add RD_GO to `lose' so that only %g0 in dest is
disassembled as a nop.
+Wed Dec 18 17:19:44 1991 Stu Grossman (grossman at cygnus.com)
+
+ * m68k.h, sparc.h: ANSIfy enums.
+
Tue Dec 10 00:22:20 1991 K. Richard Pixley (rich at rtl.cygnus.com)
* sparc.h: fix a typo.
@@ -2436,7 +2481,7 @@ Sat Nov 30 20:40:51 1991 Steve Chamberlain (sac at rtl.cygnus.com)
* a29k.h, arm.h, h8300.h, i386.h, i860.h, i960.h , m68k.h,
m88k.h, mips.h , np1.h, ns32k.h, pn.h, pyr.h, sparc.h, tahoe.h,
- vax.h, ChangeLog: renamed from ../<foo>-opcode.h
+ vax.h: Renamed from ../<foo>-opcode.h.
Local Variables:
diff --git a/include/opcode/a29k.h b/include/opcode/a29k.h
index 002e127..399be67 100644
--- a/include/opcode/a29k.h
+++ b/include/opcode/a29k.h
@@ -1,5 +1,5 @@
/* Table of opcodes for the AMD 29000 family.
- Copyright 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1993, 1994 Free Software Foundation, Inc.
This file is part of GDB and GAS.
diff --git a/include/opcode/arc.h b/include/opcode/arc.h
index d396b2a..81e5bd8 100644
--- a/include/opcode/arc.h
+++ b/include/opcode/arc.h
@@ -1,5 +1,5 @@
/* Opcode table for the ARC.
- Copyright 1994, 1995, 1997, 2000 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1997, 2001 Free Software Foundation, Inc.
Contributed by Doug Evans (dje@cygnus.com).
This file is part of GAS, the GNU Assembler, GDB, the GNU debugger, and
diff --git a/include/opcode/arm.h b/include/opcode/arm.h
index c7087eb..99bb9a6 100644
--- a/include/opcode/arm.h
+++ b/include/opcode/arm.h
@@ -1,5 +1,5 @@
/* ARM opcode list.
- Copyright (C) 1989, Free Software Foundation, Inc.
+ Copyright 1989, 1991 Free Software Foundation, Inc.
This file is part of GDB and GAS.
diff --git a/include/opcode/cgen.h b/include/opcode/cgen.h
index e208a54..c5dd6d8 100644
--- a/include/opcode/cgen.h
+++ b/include/opcode/cgen.h
@@ -1,6 +1,6 @@
/* Header file for targets using CGEN: Cpu tools GENerator.
-Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+Copyright 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of GDB, the GNU debugger, and the GNU Binutils.
diff --git a/include/opcode/convex.h b/include/opcode/convex.h
index efaeebb..780b12d 100644
--- a/include/opcode/convex.h
+++ b/include/opcode/convex.h
@@ -1,5 +1,5 @@
/* Information for instruction disassembly on the Convex.
- Copyright 1989, 1993 Free Software Foundation.
+ Copyright 1989, 1993 Free Software Foundation, Inc.
This file is part of GDB.
diff --git a/include/opcode/d10v.h b/include/opcode/d10v.h
index 0abd9ee..a1fe770 100644
--- a/include/opcode/d10v.h
+++ b/include/opcode/d10v.h
@@ -1,5 +1,5 @@
/* d10v.h -- Header file for D10V opcode table
- Copyright 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
Written by Martin Hunt (hunt@cygnus.com), Cygnus Support
This file is part of GDB, GAS, and the GNU binutils.
diff --git a/include/opcode/d30v.h b/include/opcode/d30v.h
index f90b7a4..6cbc257 100644
--- a/include/opcode/d30v.h
+++ b/include/opcode/d30v.h
@@ -1,5 +1,5 @@
/* d30v.h -- Header file for D30V opcode table
- Copyright (C) 1997, 2000 Free Software Foundation, Inc.
+ Copyright 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
Written by Martin Hunt (hunt@cygnus.com), Cygnus Solutions
This file is part of GDB, GAS, and the GNU binutils.
diff --git a/include/opcode/h8300.h b/include/opcode/h8300.h
index 6def737..dd3bbe8 100644
--- a/include/opcode/h8300.h
+++ b/include/opcode/h8300.h
@@ -1,5 +1,6 @@
/* Opcode table for the H8-300
- Copyright (C) 1991, 92, 93, 95, 96, 97, 1998 Free Software Foundation.
+ Copyright 1991, 1992, 1993, 1994, 1996, 1997, 1998, 2000
+ Free Software Foundation, Inc.
Written by Steve Chamberlain, sac@cygnus.com.
This file is part of GDB, the GNU Debugger and GAS, the GNU Assembler.
diff --git a/include/opcode/hppa.h b/include/opcode/hppa.h
index 2ac11e4..f409ac9 100644
--- a/include/opcode/hppa.h
+++ b/include/opcode/hppa.h
@@ -1,5 +1,6 @@
/* Table of opcodes for the PA-RISC.
- Copyright (C) 1990, 1991, 1993, 1995, 1999, 2000, 2001
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000,
+ 2001
Free Software Foundation, Inc.
Contributed by the Center for Software Science at the
diff --git a/include/opcode/i370.h b/include/opcode/i370.h
index f2049e7..155a3cf 100644
--- a/include/opcode/i370.h
+++ b/include/opcode/i370.h
@@ -1,5 +1,5 @@
/* i370.h -- Header file for S/390 opcode table
- Copyright 1994, 95, 98, 99, 2000 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1998, 1999, 2000 Free Software Foundation, Inc.
PowerPC version written by Ian Lance Taylor, Cygnus Support
Rewritten for i370 ESA/390 support, Linas Vepstas <linas@linas.org>
diff --git a/include/opcode/i386.h b/include/opcode/i386.h
index 2ab783e..1af44fb 100644
--- a/include/opcode/i386.h
+++ b/include/opcode/i386.h
@@ -1,6 +1,7 @@
/* opcode/i386.h -- Intel 80386 opcode table
- Copyright 1989, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
- Free Software Foundation.
+ Copyright 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000, 2001
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler, and GDB, the GNU Debugger.
diff --git a/include/opcode/i860.h b/include/opcode/i860.h
index 7b24d2f..9f10cd8 100644
--- a/include/opcode/i860.h
+++ b/include/opcode/i860.h
@@ -1,5 +1,5 @@
/* Table of opcodes for the i860.
- Copyright (C) 1989, 2000 Free Software Foundation, Inc.
+ Copyright 1989, 1991, 2000 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler, and GDB, the GNU disassembler.
diff --git a/include/opcode/i960.h b/include/opcode/i960.h
index b52fc33..33b56e6 100644
--- a/include/opcode/i960.h
+++ b/include/opcode/i960.h
@@ -1,22 +1,38 @@
/* Basic 80960 instruction formats.
- *
- * The 'COJ' instructions are actually COBR instructions with the 'b' in
- * the mnemonic replaced by a 'j'; they are ALWAYS "de-optimized" if necessary:
- * if the displacement will not fit in 13 bits, the assembler will replace them
- * with the corresponding compare and branch instructions.
- *
- * All of the 'MEMn' instructions are the same format; the 'n' in the name
- * indicates the default index scale factor (the size of the datum operated on).
- *
- * The FBRA formats are not actually an instruction format. They are the
- * "convenience directives" for branching on floating-point comparisons,
- * each of which generates 2 instructions (a 'bno' and one other branch).
- *
- * The CALLJ format is not actually an instruction format. It indicates that
- * the instruction generated (a CTRL-format 'call') should have its relocation
- * specially flagged for link-time replacement with a 'bal' or 'calls' if
- * appropriate.
- */
+
+ 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, 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.
+
+ The 'COJ' instructions are actually COBR instructions with the 'b' in
+ the mnemonic replaced by a 'j'; they are ALWAYS "de-optimized" if necessary:
+ if the displacement will not fit in 13 bits, the assembler will replace them
+ with the corresponding compare and branch instructions.
+
+ All of the 'MEMn' instructions are the same format; the 'n' in the name
+ indicates the default index scale factor (the size of the datum operated on).
+
+ The FBRA formats are not actually an instruction format. They are the
+ "convenience directives" for branching on floating-point comparisons,
+ each of which generates 2 instructions (a 'bno' and one other branch).
+
+ The CALLJ format is not actually an instruction format. It indicates that
+ the instruction generated (a CTRL-format 'call') should have its relocation
+ specially flagged for link-time replacement with a 'bal' or 'calls' if
+ appropriate. */
#define CTRL 0
#define COBR 1
diff --git a/include/opcode/m68k.h b/include/opcode/m68k.h
index c4665ba..3371d38 100644
--- a/include/opcode/m68k.h
+++ b/include/opcode/m68k.h
@@ -1,5 +1,6 @@
/* Opcode table header for m680[01234]0/m6888[12]/m68851.
- Copyright 1989, 91, 92, 93, 94, 95, 96, 97, 1999, 2001 Free Software Foundation.
+ Copyright 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2001
+ Free Software Foundation, Inc.
This file is part of GDB, GAS, and the GNU binutils.
diff --git a/include/opcode/m88k.h b/include/opcode/m88k.h
index a17fa03..9d403e1 100644
--- a/include/opcode/m88k.h
+++ b/include/opcode/m88k.h
@@ -1,5 +1,5 @@
/* Table of opcodes for the motorola 88k family.
- Copyright 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
+ Copyright 1989, 1990, 1991, 1993 Free Software Foundation, Inc.
This file is part of GDB and GAS.
diff --git a/include/opcode/mips.h b/include/opcode/mips.h
index ab30d1c..e01e374 100644
--- a/include/opcode/mips.h
+++ b/include/opcode/mips.h
@@ -1,5 +1,6 @@
/* mips.h. Mips opcode list for GDB, the GNU debugger.
- Copyright 1993, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+ Free Software Foundation, Inc.
Contributed by Ralph Campbell and OSF
Commented and modified by Ian Lance Taylor, Cygnus Support
diff --git a/include/opcode/mn10300.h b/include/opcode/mn10300.h
index 12f0367..0de7f45 100644
--- a/include/opcode/mn10300.h
+++ b/include/opcode/mn10300.h
@@ -1,5 +1,5 @@
/* mn10300.h -- Header file for Matsushita 10300 opcode table
- Copyright 1996, 1997 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
Written by Jeff Law, Cygnus Support
This file is part of GDB, GAS, and the GNU binutils.
diff --git a/include/opcode/np1.h b/include/opcode/np1.h
index d23adc7..c3f7e29 100644
--- a/include/opcode/np1.h
+++ b/include/opcode/np1.h
@@ -1,5 +1,5 @@
/* Print GOULD NPL instructions for GDB, the GNU debugger.
- Copyright (C) 1986, 1987, 1989 Free Software Foundation, Inc.
+ Copyright 1986, 1987, 1989, 1991 Free Software Foundation, Inc.
This file is part of GDB.
diff --git a/include/opcode/ns32k.h b/include/opcode/ns32k.h
index 42bb8b8..6b3fc5e 100644
--- a/include/opcode/ns32k.h
+++ b/include/opcode/ns32k.h
@@ -1,5 +1,5 @@
/* ns32k-opcode.h -- Opcode table for National Semi 32k processor
- Copyright (C) 1987 Free Software Foundation, Inc.
+ Copyright 1987, 1991, 1994 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
diff --git a/include/opcode/pdp11.h b/include/opcode/pdp11.h
index 891b74f9..3cd7123 100644
--- a/include/opcode/pdp11.h
+++ b/include/opcode/pdp11.h
@@ -1,5 +1,5 @@
/* PDP-11 opcde list.
- Copyright (C) 2001 Free Software Foundation, Inc.
+ Copyright 2001 Free Software Foundation, Inc.
This file is part of GDB and GAS.
diff --git a/include/opcode/pj.h b/include/opcode/pj.h
index 8759b62..b768f11 100644
--- a/include/opcode/pj.h
+++ b/include/opcode/pj.h
@@ -1,5 +1,5 @@
/* Definitions for decoding the picoJava opcode table.
- Copyright (C) 1999 Free Software Foundation, Inc.
+ Copyright 1999 Free Software Foundation, Inc.
Contributed by Steve Chamberlain of Transmeta (sac@pobox.com).
This program is free software; you can redistribute it and/or modify
diff --git a/include/opcode/pn.h b/include/opcode/pn.h
index 0f59a2a..8c427a2 100644
--- a/include/opcode/pn.h
+++ b/include/opcode/pn.h
@@ -1,5 +1,5 @@
/* Print GOULD PN (PowerNode) instructions for GDB, the GNU debugger.
- Copyright (C) 1986, 1987, 1989 Free Software Foundation, Inc.
+ Copyright 1986, 1987, 1989, 1991 Free Software Foundation, Inc.
This file is part of GDB.
diff --git a/include/opcode/ppc.h b/include/opcode/ppc.h
index 246e3c7..d23e1c6 100644
--- a/include/opcode/ppc.h
+++ b/include/opcode/ppc.h
@@ -1,5 +1,5 @@
/* ppc.h -- Header file for PowerPC opcode table
- Copyright 1994, 1995 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1999, 2000 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support
This file is part of GDB, GAS, and the GNU binutils.
diff --git a/include/opcode/pyr.h b/include/opcode/pyr.h
index 06632b8..d0bed6a 100644
--- a/include/opcode/pyr.h
+++ b/include/opcode/pyr.h
@@ -1,5 +1,22 @@
-/* pyramid.opcode.h -- gdb initial attempt. */
+/* pyramid.opcode.h -- gdb initial attempt.
+ 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, 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. */
+
/* pyramid opcode table: wot to do with this
particular opcode */
@@ -12,7 +29,8 @@ struct pyr_datum
unsigned char code; /* op-code (always 6(?) bits */
};
-typedef struct pyr_insn_format {
+typedef struct pyr_insn_format
+{
unsigned int mode :4;
unsigned int operator :8;
unsigned int index_scale :2;
diff --git a/include/opcode/s390.h b/include/opcode/s390.h
index 8a7c00e..1a42be6 100644
--- a/include/opcode/s390.h
+++ b/include/opcode/s390.h
@@ -1,5 +1,5 @@
/* s390.h -- Header file for S390 opcode table
- Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+ Copyright 2000, 2001 Free Software Foundation, Inc.
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
This file is part of BFD, the Binary File Descriptor library.
diff --git a/include/opcode/sparc.h b/include/opcode/sparc.h
index 423cea7..5b6b5d1 100644
--- a/include/opcode/sparc.h
+++ b/include/opcode/sparc.h
@@ -1,5 +1,5 @@
/* Definitions for opcode table for the sparc.
- Copyright (C) 1989, 91, 92, 93, 94, 95, 96, 97, 2000
+ Copyright 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler, GDB, the GNU debugger, and
diff --git a/include/opcode/tic80.h b/include/opcode/tic80.h
index b99bc30..01159e4 100644
--- a/include/opcode/tic80.h
+++ b/include/opcode/tic80.h
@@ -1,5 +1,5 @@
/* tic80.h -- Header file for TI TMS320C80 (MV) opcode table
- Copyright 1996, 1997, 1999 Free Software Foundation, Inc.
+ Copyright 1996, 1997 Free Software Foundation, Inc.
Written by Fred Fish (fnf@cygnus.com), Cygnus Support
This file is part of GDB, GAS, and the GNU binutils.
diff --git a/include/opcode/v850.h b/include/opcode/v850.h
index 88916f1..737faf8 100644
--- a/include/opcode/v850.h
+++ b/include/opcode/v850.h
@@ -1,5 +1,5 @@
/* v850.h -- Header file for NEC V850 opcode table
- Copyright 1996 Free Software Foundation, Inc.
+ Copyright 1996, 1997 Free Software Foundation, Inc.
Written by J.T. Conklin, Cygnus Support
This file is part of GDB, GAS, and the GNU binutils.
diff --git a/include/opcode/vax.h b/include/opcode/vax.h
index f3afebd..6fda6b2 100644
--- a/include/opcode/vax.h
+++ b/include/opcode/vax.h
@@ -1,5 +1,5 @@
/* Vax opcde list.
- Copyright (C) 1989, 1995 Free Software Foundation, Inc.
+ Copyright 1989, 1991, 1992, 1995 Free Software Foundation, Inc.
This file is part of GDB and GAS.
diff --git a/include/os9k.h b/include/os9k.h
index df81886..596f56d 100644
--- a/include/os9k.h
+++ b/include/os9k.h
@@ -1,5 +1,5 @@
/* os9k.h - OS-9000 i386 module header definitions
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright 2000 Free Software Foundation, Inc.
This file is part of GNU CC.
diff --git a/include/partition.h b/include/partition.h
index f49d67a..995b11d 100644
--- a/include/partition.h
+++ b/include/partition.h
@@ -1,5 +1,5 @@
/* List implentation of a partition of consecutive integers.
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright 2000 Free Software Foundation, Inc.
Contributed by CodeSourcery, LLC.
This file is part of GNU CC.
diff --git a/include/progress.h b/include/progress.h
index f18318a..23b0960 100644
--- a/include/progress.h
+++ b/include/progress.h
@@ -1,5 +1,5 @@
/* Default definitions for progress macros.
- Copyright (C) 1994 Free Software Foundation, Inc.
+ Copyright 1994 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
diff --git a/include/remote-sim.h b/include/remote-sim.h
index b32f93f..726ec62 100644
--- a/include/remote-sim.h
+++ b/include/remote-sim.h
@@ -1,5 +1,6 @@
/* This file defines the interface between the simulator and gdb.
- Copyright (C) 1993, 1994, 1996, 1997 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1996, 1997, 1998, 2000
+ Free Software Foundation, Inc.
This file is part of GDB.
diff --git a/include/safe-ctype.h b/include/safe-ctype.h
index ccacda5..8f3f00a 100644
--- a/include/safe-ctype.h
+++ b/include/safe-ctype.h
@@ -1,6 +1,6 @@
/* <ctype.h> replacement macros.
- Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+ Copyright 2000, 2001 Free Software Foundation, Inc.
Contributed by Zack Weinberg <zackw@stanford.edu>.
This file is part of the libiberty library.
diff --git a/include/sim-d10v.h b/include/sim-d10v.h
index 84eab2a..9d29e05 100644
--- a/include/sim-d10v.h
+++ b/include/sim-d10v.h
@@ -1,5 +1,5 @@
/* This file defines the interface between the d10v simulator and gdb.
- Copyright (C) 1999 Free Software Foundation, Inc.
+ Copyright 1999 Free Software Foundation, Inc.
This file is part of GDB.
diff --git a/include/sort.h b/include/sort.h
index c8e1d55..e47d5fd 100644
--- a/include/sort.h
+++ b/include/sort.h
@@ -1,5 +1,5 @@
/* Sorting algorithms.
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright 2000 Free Software Foundation, Inc.
Contributed by Mark Mitchell <mark@codesourcery.com>.
This file is part of GNU CC.
diff --git a/include/splay-tree.h b/include/splay-tree.h
index f53f855..e43d4b6 100644
--- a/include/splay-tree.h
+++ b/include/splay-tree.h
@@ -1,5 +1,5 @@
/* A splay-tree datatype.
- Copyright (C) 1998, 2000 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
Contributed by Mark Mitchell (mark@markmitchell.com).
This file is part of GNU CC.
diff --git a/include/symcat.h b/include/symcat.h
index 61ce1e9..10496d5 100644
--- a/include/symcat.h
+++ b/include/symcat.h
@@ -1,6 +1,6 @@
/* Symbol concatenation utilities.
- Copyright (C) 1998, 2000 Free Software Foundation, Inc.
+ Copyright 1998, 2000 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