13070Spst/* COFF information for the Intel i860.
23070Spst
33070Spst   Copyright 2001, 2003 Free Software Foundation, Inc.
43070Spst
53070Spst   This program is free software; you can redistribute it and/or modify
63070Spst   it under the terms of the GNU General Public License as published by
73070Spst   the Free Software Foundation; either version 2 of the License, or
83070Spst   (at your option) any later version.
93070Spst
103070Spst   This program is distributed in the hope that it will be useful,
113070Spst   but WITHOUT ANY WARRANTY; without even the implied warranty of
123070Spst   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
133070Spst   GNU General Public License for more details.
143070Spst
153070Spst   You should have received a copy of the GNU General Public License
163070Spst   along with this program; if not, write to the Free Software
173070Spst   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
183070Spst
193070Spst/* This file was hacked from i386.h   [dolan@ssd.intel.com] */
203070Spst
213070Spst#define L_LNNO_SIZE 2
223070Spst#include "coff/external.h"
233070Spst
243070Spst/* Bits for f_flags:
253070Spst 	F_RELFLG	relocation info stripped from file
2692986Sobrien 	F_EXEC		file is executable (no unresolved external references)
2792986Sobrien 	F_LNNO		line numbers stripped from file
283070Spst 	F_LSYMS		local symbols stripped from file
293070Spst 	F_AR32WR	file has byte ordering of an AR32WR machine (e.g. vax).  */
303070Spst
313070Spst#define F_RELFLG	(0x0001)
323070Spst#define F_EXEC		(0x0002)
3343171Sgallatin#define F_LNNO		(0x0004)
343070Spst#define F_LSYMS		(0x0008)
353070Spst
3617141Sjkh#define	I860MAGIC	0x14d
373070Spst
383070Spst#define I860BADMAG(x)   ((x).f_magic != I860MAGIC)
393070Spst
4065532Snectar#undef AOUTSZ
4165532Snectar#define AOUTSZ 36
42145721Sume
4314639Swpaul/* FIXME: What are the a.out magic numbers?  */
4414639Swpaul
4514639Swpaul#define _ETEXT	"etext"
4614639Swpaul
4714639Swpaul/********************** RELOCATION DIRECTIVES **********************/
48145633Sume
493070Spststruct external_reloc
503070Spst{
51145633Sume  char r_vaddr[4];
52145633Sume  char r_symndx[4];
53145728Sume  char r_type[2];
543070Spst};
55145633Sume
5692889Sobrien#define RELOC struct external_reloc
573070Spst#define RELSZ 10
58145550Sume
59145633Sume/* The relocation directory entry types.
60157779Sume     PAIR   : The low half that follows relates to the preceeding HIGH[ADJ].
613070Spst     HIGH   : The high half of a 32-bit constant.
62157779Sume     LOWn   : The low half, insn bits 15..(n-1), 2^n-byte aligned.
6317903Speter     SPLITn : The low half, insn bits 20..16 and 10..(n-1), 2^n-byte aligned.
6417903Speter     HIGHADJ: Similar to HIGH, but with adjustment.
6543171Sgallatin     BRADDR : 26-bit branch displacement.
6617903Speter
6717903Speter   Note: The Intel assembler manual lists LOW4 as one of the
6843171Sgallatin   relocation types, but it appears to be useless for the i860.
69145550Sume   We will recognize it anyway, just in case it actually appears in
70145550Sume   any object files.  */
7117903Speter
72157779Sumeenum {
73157779Sume  COFF860_R_PAIR	= 0x1c,
7417903Speter  COFF860_R_HIGH	= 0x1e,
7517903Speter  COFF860_R_LOW0	= 0x1f,
76145633Sume  COFF860_R_LOW1	= 0x20,
77145633Sume  COFF860_R_LOW2	= 0x21,
78157779Sume  COFF860_R_LOW3	= 0x22,
79157779Sume  COFF860_R_LOW4	= 0x23,
8065702Snectar  COFF860_R_SPLIT0	= 0x24,
813070Spst  COFF860_R_SPLIT1	= 0x25,
82145633Sume  COFF860_R_SPLIT2	= 0x26,
83145633Sume  COFF860_R_HIGHADJ	= 0x27,
84157779Sume  COFF860_R_BRADDR	= 0x28
85157779Sume};
8665702Snectar
873070Spst