2003-08-23 Jason Eckhardt <jle@rice.edu>
[bfd/ChangeLog]
* coff-i860.c (coff_i860_reloc_nyi): New function.
(howto_table): Add entries for relocations PAIR, HIGHADJ, HIGH,
LOWn, SPLITn, and BRADDR.
(RTYPE2HOWTO): Check that the r_type is within the howto_table
before trying to access the entry.
(coff_i860_rtype_to_howto): Likewise.
(coff_i860_reloc_type_lookup): New function.
(i860_reloc_processing): New function.
(coff_bfd_reloc_type_lookup): Define macro.
(RELOC_PROCESSING): Define macro.
Minor formatting adjustments.
[include/coff/ChangeLog]
* coff/i860.h (COFF860_R_PAIR, COFF860_R_LOW0, COFF860_R_LOW1,
COFF860_R_LOW2, COFF860_R_LOW3, COFF860_R_LOW4, COFF860_R_SPLIT0,
COFF860_R_SPLIT1, COFF860_R_SPLIT2, COFF860_R_HIGHADJ,
COFF860_R_BRADDR): Define new relocation constants and document.
Minor formatting adjustments.
2003-08-24 01:00:09 +02:00
|
|
|
/* COFF information for the Intel i860.
|
2001-03-14 03:27:44 +01:00
|
|
|
|
2014-03-05 12:46:15 +01:00
|
|
|
Copyright (C) 2001-2014 Free Software Foundation, Inc.
|
2001-03-14 03:27:44 +01:00
|
|
|
|
|
|
|
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
|
2010-04-15 12:26:09 +02:00
|
|
|
the Free Software Foundation; either version 3 of the License, or
|
2001-03-14 03:27:44 +01:00
|
|
|
(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
|
2010-04-15 12:26:09 +02:00
|
|
|
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
|
|
|
|
MA 02110-1301, USA. */
|
1999-05-03 09:29:11 +02:00
|
|
|
|
2001-03-14 03:27:44 +01:00
|
|
|
/* This file was hacked from i386.h [dolan@ssd.intel.com] */
|
1999-05-03 09:29:11 +02:00
|
|
|
|
2001-03-14 03:27:44 +01:00
|
|
|
#define L_LNNO_SIZE 2
|
|
|
|
#include "coff/external.h"
|
1999-05-03 09:29:11 +02:00
|
|
|
|
|
|
|
/* Bits for f_flags:
|
2001-03-14 03:27:44 +01:00
|
|
|
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). */
|
1999-05-03 09:29:11 +02:00
|
|
|
|
|
|
|
#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)
|
|
|
|
|
2003-07-15 03:15:08 +02:00
|
|
|
#undef AOUTSZ
|
|
|
|
#define AOUTSZ 36
|
|
|
|
|
1999-05-03 09:29:11 +02:00
|
|
|
/* FIXME: What are the a.out magic numbers? */
|
|
|
|
|
2001-03-14 03:27:44 +01:00
|
|
|
#define _ETEXT "etext"
|
1999-05-03 09:29:11 +02:00
|
|
|
|
|
|
|
/********************** RELOCATION DIRECTIVES **********************/
|
|
|
|
|
2001-03-14 03:27:44 +01:00
|
|
|
struct external_reloc
|
|
|
|
{
|
1999-05-03 09:29:11 +02:00
|
|
|
char r_vaddr[4];
|
|
|
|
char r_symndx[4];
|
|
|
|
char r_type[2];
|
|
|
|
};
|
|
|
|
|
|
|
|
#define RELOC struct external_reloc
|
|
|
|
#define RELSZ 10
|
2003-08-23 Jason Eckhardt <jle@rice.edu>
[bfd/ChangeLog]
* coff-i860.c (coff_i860_reloc_nyi): New function.
(howto_table): Add entries for relocations PAIR, HIGHADJ, HIGH,
LOWn, SPLITn, and BRADDR.
(RTYPE2HOWTO): Check that the r_type is within the howto_table
before trying to access the entry.
(coff_i860_rtype_to_howto): Likewise.
(coff_i860_reloc_type_lookup): New function.
(i860_reloc_processing): New function.
(coff_bfd_reloc_type_lookup): Define macro.
(RELOC_PROCESSING): Define macro.
Minor formatting adjustments.
[include/coff/ChangeLog]
* coff/i860.h (COFF860_R_PAIR, COFF860_R_LOW0, COFF860_R_LOW1,
COFF860_R_LOW2, COFF860_R_LOW3, COFF860_R_LOW4, COFF860_R_SPLIT0,
COFF860_R_SPLIT1, COFF860_R_SPLIT2, COFF860_R_HIGHADJ,
COFF860_R_BRADDR): Define new relocation constants and document.
Minor formatting adjustments.
2003-08-24 01:00:09 +02:00
|
|
|
|
|
|
|
/* The relocation directory entry types.
|
2011-06-02 15:43:24 +02:00
|
|
|
PAIR : The low half that follows relates to the preceding HIGH[ADJ].
|
2003-08-23 Jason Eckhardt <jle@rice.edu>
[bfd/ChangeLog]
* coff-i860.c (coff_i860_reloc_nyi): New function.
(howto_table): Add entries for relocations PAIR, HIGHADJ, HIGH,
LOWn, SPLITn, and BRADDR.
(RTYPE2HOWTO): Check that the r_type is within the howto_table
before trying to access the entry.
(coff_i860_rtype_to_howto): Likewise.
(coff_i860_reloc_type_lookup): New function.
(i860_reloc_processing): New function.
(coff_bfd_reloc_type_lookup): Define macro.
(RELOC_PROCESSING): Define macro.
Minor formatting adjustments.
[include/coff/ChangeLog]
* coff/i860.h (COFF860_R_PAIR, COFF860_R_LOW0, COFF860_R_LOW1,
COFF860_R_LOW2, COFF860_R_LOW3, COFF860_R_LOW4, COFF860_R_SPLIT0,
COFF860_R_SPLIT1, COFF860_R_SPLIT2, COFF860_R_HIGHADJ,
COFF860_R_BRADDR): Define new relocation constants and document.
Minor formatting adjustments.
2003-08-24 01:00:09 +02:00
|
|
|
HIGH : The high half of a 32-bit constant.
|
|
|
|
LOWn : The low half, insn bits 15..(n-1), 2^n-byte aligned.
|
|
|
|
SPLITn : The low half, insn bits 20..16 and 10..(n-1), 2^n-byte aligned.
|
|
|
|
HIGHADJ: Similar to HIGH, but with adjustment.
|
|
|
|
BRADDR : 26-bit branch displacement.
|
|
|
|
|
|
|
|
Note: The Intel assembler manual lists LOW4 as one of the
|
|
|
|
relocation types, but it appears to be useless for the i860.
|
|
|
|
We will recognize it anyway, just in case it actually appears in
|
|
|
|
any object files. */
|
|
|
|
|
|
|
|
enum {
|
|
|
|
COFF860_R_PAIR = 0x1c,
|
|
|
|
COFF860_R_HIGH = 0x1e,
|
|
|
|
COFF860_R_LOW0 = 0x1f,
|
|
|
|
COFF860_R_LOW1 = 0x20,
|
|
|
|
COFF860_R_LOW2 = 0x21,
|
|
|
|
COFF860_R_LOW3 = 0x22,
|
|
|
|
COFF860_R_LOW4 = 0x23,
|
|
|
|
COFF860_R_SPLIT0 = 0x24,
|
|
|
|
COFF860_R_SPLIT1 = 0x25,
|
|
|
|
COFF860_R_SPLIT2 = 0x26,
|
|
|
|
COFF860_R_HIGHADJ = 0x27,
|
|
|
|
COFF860_R_BRADDR = 0x28
|
|
|
|
};
|
|
|
|
|