168673Sobrien/* MN10300 ELF support for BFD.
2218822Sdim   Copyright 1998, 1999, 2000, 2003 Free Software Foundation, Inc.
368673Sobrien
468673SobrienThis file is part of BFD, the Binary File Descriptor library.
568673Sobrien
668673SobrienThis program is free software; you can redistribute it and/or modify
768673Sobrienit under the terms of the GNU General Public License as published by
868673Sobrienthe Free Software Foundation; either version 2 of the License, or
968673Sobrien(at your option) any later version.
1068673Sobrien
1168673SobrienThis program is distributed in the hope that it will be useful,
1268673Sobrienbut WITHOUT ANY WARRANTY; without even the implied warranty of
1368673SobrienMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1468673SobrienGNU General Public License for more details.
1568673Sobrien
1668673SobrienYou should have received a copy of the GNU General Public License
1768673Sobrienalong with this program; if not, write to the Free Software
18218822SdimFoundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
1968673Sobrien
2068673Sobrien/* This file holds definitions specific to the MN10300 ELF ABI. */
2168673Sobrien
2268673Sobrien#ifndef _ELF_MN10300_H
2368673Sobrien#define _ELF_MN10300_H
2468673Sobrien
2568673Sobrien#include "elf/reloc-macros.h"
2668673Sobrien
2768673Sobrien/* Relocations.  */
2868673SobrienSTART_RELOC_NUMBERS (elf_mn10300_reloc_type)
2968673Sobrien  RELOC_NUMBER (R_MN10300_NONE, 0)
3068673Sobrien  RELOC_NUMBER (R_MN10300_32, 1)
3168673Sobrien  RELOC_NUMBER (R_MN10300_16, 2)
3268673Sobrien  RELOC_NUMBER (R_MN10300_8, 3)
3368673Sobrien  RELOC_NUMBER (R_MN10300_PCREL32, 4)
3468673Sobrien  RELOC_NUMBER (R_MN10300_PCREL16, 5)
3568673Sobrien  RELOC_NUMBER (R_MN10300_PCREL8, 6)
3668673Sobrien  RELOC_NUMBER (R_MN10300_GNU_VTINHERIT, 7)
3768673Sobrien  RELOC_NUMBER (R_MN10300_GNU_VTENTRY, 8)
3868673Sobrien  RELOC_NUMBER (R_MN10300_24, 9)
39130561Sobrien  RELOC_NUMBER (R_MN10300_GOTPC32, 10)
40130561Sobrien  RELOC_NUMBER (R_MN10300_GOTPC16, 11)
41130561Sobrien  RELOC_NUMBER (R_MN10300_GOTOFF32, 12)
42130561Sobrien  RELOC_NUMBER (R_MN10300_GOTOFF24, 13)
43130561Sobrien  RELOC_NUMBER (R_MN10300_GOTOFF16, 14)
44130561Sobrien  RELOC_NUMBER (R_MN10300_PLT32, 15)
45130561Sobrien  RELOC_NUMBER (R_MN10300_PLT16, 16)
46130561Sobrien  RELOC_NUMBER (R_MN10300_GOT32, 17)
47130561Sobrien  RELOC_NUMBER (R_MN10300_GOT24, 18)
48130561Sobrien  RELOC_NUMBER (R_MN10300_GOT16, 19)
49130561Sobrien  RELOC_NUMBER (R_MN10300_COPY, 20)
50130561Sobrien  RELOC_NUMBER (R_MN10300_GLOB_DAT, 21)
51130561Sobrien  RELOC_NUMBER (R_MN10300_JMP_SLOT, 22)
52130561Sobrien  RELOC_NUMBER (R_MN10300_RELATIVE, 23)
5377298SobrienEND_RELOC_NUMBERS (R_MN10300_MAX)
5468673Sobrien
5568673Sobrien/* Machine variant if we know it.  This field was invented at Cygnus,
5668673Sobrien   but it is hoped that other vendors will adopt it.  If some standard
5768673Sobrien   is developed, this code should be changed to follow it. */
5868673Sobrien
5968673Sobrien#define EF_MN10300_MACH		0x00FF0000
6068673Sobrien
6168673Sobrien/* Cygnus is choosing values between 80 and 9F;
6268673Sobrien   00 - 7F should be left for a future standard;
6368673Sobrien   the rest are open. */
6468673Sobrien
6568673Sobrien#define E_MN10300_MACH_MN10300	0x00810000
6668673Sobrien#define E_MN10300_MACH_AM33	0x00820000
67130561Sobrien#define E_MN10300_MACH_AM33_2   0x00830000
6868673Sobrien#endif /* _ELF_MN10300_H */
69