mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2024-11-27 14:00:30 +00:00
Fix typos in ChangeLogs; add coff/external.h; fix copyright dates
This commit is contained in:
parent
a728f04251
commit
4f1d9bd8e2
@ -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)
|
||||
|
||||
|
@ -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
|
||||
|
@ -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:
|
||||
|
@ -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__
|
||||
|
@ -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__
|
||||
|
@ -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. */
|
||||
|
@ -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 */
|
||||
|
@ -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
|
||||
|
@ -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)*/
|
||||
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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. */
|
||||
|
@ -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. */
|
||||
|
||||
|
@ -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.
|
||||
|
267
include/bout.h
267
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. */
|
||||
};
|
||||
|
@ -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:
|
||||
|
@ -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
|
||||
|
@ -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];
|
||||
|
@ -1,17 +1,24 @@
|
||||
/*** coff information for Apollo M68K */
|
||||
/* coff information for Apollo M68K
|
||||
|
||||
/********************** FILE HEADER **********************/
|
||||
Copyright 2001 Free Software Foundation, Inc.
|
||||
|
||||
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 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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
254
include/coff/external.h
Normal file
254
include/coff/external.h
Normal file
@ -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 */
|
@ -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
|
||||
|
@ -1,193 +1,40 @@
|
||||
/*** coff information for Hitachi H8/300 and H8/300-H */
|
||||
/* 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 */
|
||||
};
|
||||
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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -1,33 +1,37 @@
|
||||
/*** coff information for Intel 386/486. */
|
||||
/* 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. */
|
||||
|
||||
/********************** FILE HEADER **********************/
|
||||
|
||||
struct external_filehdr {
|
||||
char f_magic[2]; /* magic number */
|
||||
char f_nscns[2]; /* number of sections */
|
||||
char f_timdat[4]; /* time & date stamp */
|
||||
char f_symptr[4]; /* file pointer to symtab */
|
||||
char f_nsyms[4]; /* number of symtab entries */
|
||||
char f_opthdr[2]; /* sizeof(optional hdr) */
|
||||
char f_flags[2]; /* flags */
|
||||
};
|
||||
#define L_LNNO_SIZE 2
|
||||
#define INCLUDE_COMDAT_FIELDS_IN_AUXENT
|
||||
#include "coff/external.h"
|
||||
|
||||
/* Bits for f_flags:
|
||||
* F_RELFLG relocation info stripped from file
|
||||
* F_EXEC file is executable (no unresolved external references)
|
||||
* F_LNNO line numbers stripped from file
|
||||
* F_LSYMS local symbols stripped from file
|
||||
* F_AR32WR file has byte ordering of an AR32WR machine (e.g. vax)
|
||||
*/
|
||||
F_RELFLG relocation info stripped from file
|
||||
F_EXEC file is executable (no unresolved external references)
|
||||
F_LNNO line numbers stripped from file
|
||||
F_LSYMS local symbols stripped from file
|
||||
F_AR32WR file has byte ordering of an AR32WR machine (e.g. vax). */
|
||||
|
||||
#define F_RELFLG (0x0001)
|
||||
#define F_EXEC (0x0002)
|
||||
#define F_LNNO (0x0004)
|
||||
#define F_LSYMS (0x0008)
|
||||
|
||||
|
||||
|
||||
#define I386MAGIC 0x14c
|
||||
#define I386PTXMAGIC 0x154
|
||||
#define I386AIXMAGIC 0x175
|
||||
@ -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
|
||||
|
||||
|
@ -1,205 +1,54 @@
|
||||
/* 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. */
|
||||
|
||||
/* This file was hacked from i386.h [dolan@ssd.intel.com] */
|
||||
|
||||
/*** coff information for Intel 860. */
|
||||
|
||||
|
||||
/********************** 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"
|
||||
|
||||
/* 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
|
||||
|
@ -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 external_auxent
|
||||
{
|
||||
struct
|
||||
{
|
||||
char x_tagndx[4]; /* str, un, or enum tag indx */
|
||||
|
||||
union {
|
||||
char x_fname[E_FILNMLEN];
|
||||
struct {
|
||||
char x_zeroes[4];
|
||||
char x_offset[4];
|
||||
} x_n;
|
||||
} x_file;
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
char x_lnno[2]; /* declaration line number */
|
||||
char x_size[2]; /* str/union/array size */
|
||||
} x_lnsz;
|
||||
|
||||
struct {
|
||||
char x_scnlen[4]; /* section length */
|
||||
char x_nreloc[2]; /* # relocation entries */
|
||||
char x_nlinno[2]; /* # line numbers */
|
||||
} x_scn;
|
||||
char x_fsize[4]; /* size of function */
|
||||
|
||||
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)) */
|
||||
} x_misc;
|
||||
|
||||
/******************************************
|
||||
* I960-specific *2nd* aux. entry formats
|
||||
******************************************/
|
||||
struct {
|
||||
/* This is a very old typo that keeps getting propagated. */
|
||||
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];
|
||||
|
@ -1,17 +1,25 @@
|
||||
/*** coff information for HP/Intel IA-64. */
|
||||
/* 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. */
|
||||
|
||||
/********************** FILE HEADER **********************/
|
||||
|
||||
struct external_filehdr {
|
||||
char f_magic[2]; /* magic number */
|
||||
char f_nscns[2]; /* number of sections */
|
||||
char f_timdat[4]; /* time & date stamp */
|
||||
char f_symptr[4]; /* file pointer to symtab */
|
||||
char f_nsyms[4]; /* number of symtab entries */
|
||||
char f_opthdr[2]; /* sizeof(optional hdr) */
|
||||
char f_flags[2]; /* flags */
|
||||
};
|
||||
#define DO_NOT_DEFINE_AOUTHDR
|
||||
#define L_LNNO_SIZE 2
|
||||
#define INCLUDE_COMDAT_FIELDS_IN_AUXENT
|
||||
#include "coff/external.h"
|
||||
|
||||
#define IA64MAGIC 0x200
|
||||
|
||||
@ -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
|
||||
|
||||
|
@ -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 */
|
||||
|
@ -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
|
||||
|
@ -1,56 +1,40 @@
|
||||
/*** coff information for 88k bcs */
|
||||
/* coff information for 88k bcs
|
||||
|
||||
Copyright 2001 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[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 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 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 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];
|
||||
|
@ -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 */
|
||||
|
@ -1,17 +1,25 @@
|
||||
/* ECOFF support on MIPS 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.
|
||||
|
||||
/********************** FILE HEADER **********************/
|
||||
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. */
|
||||
|
||||
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 */
|
||||
};
|
||||
#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];
|
||||
|
@ -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
|
||||
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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)
|
||||
*/
|
||||
Based on coff/rs6000.h, coff/i386.h and others.
|
||||
|
||||
Copyright 2001 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[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
|
||||
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];
|
||||
|
@ -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];
|
||||
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 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;
|
||||
|
||||
};
|
||||
|
||||
#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
|
||||
|
||||
|
@ -1,55 +1,60 @@
|
||||
/* IBM RS/6000 "XCOFF64" file definitions for BFD.
|
||||
Copyright (C) 2000 Free Software Foundation, Inc. */
|
||||
|
||||
/********************** FILE HEADER **********************/
|
||||
Copyright 2000 Free Software Foundation, Inc.
|
||||
|
||||
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 */
|
||||
};
|
||||
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];
|
||||
};
|
||||
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;
|
||||
|
||||
|
||||
#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;
|
||||
} 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;
|
||||
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;
|
||||
|
||||
struct {
|
||||
char x_exptr[8];
|
||||
char x_fsize[4];
|
||||
char x_endndx[4];
|
||||
char x_pad[1];
|
||||
} x_except;
|
||||
} x_file;
|
||||
|
||||
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_exptr[8];
|
||||
char x_fsize[4];
|
||||
char x_endndx[4];
|
||||
char x_pad[1];
|
||||
} x_except;
|
||||
|
||||
struct {
|
||||
char x_pad[17];
|
||||
char x_auxtype[1];
|
||||
} x_auxtype;
|
||||
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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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 **********************/
|
||||
/* More names of "special" sections. */
|
||||
|
||||
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 _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];
|
||||
|
@ -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 */
|
||||
|
@ -1,180 +1,27 @@
|
||||
/*** coff information for Texas Instruments TMS320C3X */
|
||||
/* coff information for Texas Instruments TMS320C3X
|
||||
|
||||
Copyright 2001 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[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 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
|
||||
|
||||
|
@ -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 */
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -1,193 +1,41 @@
|
||||
/*** coff information for Zilog Z800N */
|
||||
/* coff information for Zilog Z800N
|
||||
|
||||
Copyright 2001 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[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 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 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 **********************/
|
||||
|
||||
/* 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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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>.
|
||||
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
256
include/ieee.h
256
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_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_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_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_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;
|
||||
|
||||
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;
|
||||
|
||||
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
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user