1*a9fa9459Szrj /* i370 ELF support for BFD.
2*a9fa9459Szrj    Copyright (C) 2000-2016 Free Software Foundation, Inc.
3*a9fa9459Szrj 
4*a9fa9459Szrj    This file is part of BFD, the Binary File Descriptor library.
5*a9fa9459Szrj 
6*a9fa9459Szrj    This program is free software; you can redistribute it and/or modify
7*a9fa9459Szrj    it under the terms of the GNU General Public License as published by
8*a9fa9459Szrj    the Free Software Foundation; either version 3 of the License, or
9*a9fa9459Szrj    (at your option) any later version.
10*a9fa9459Szrj 
11*a9fa9459Szrj    This program is distributed in the hope that it will be useful,
12*a9fa9459Szrj    but WITHOUT ANY WARRANTY; without even the implied warranty of
13*a9fa9459Szrj    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14*a9fa9459Szrj    GNU General Public License for more details.
15*a9fa9459Szrj 
16*a9fa9459Szrj    You should have received a copy of the GNU General Public License
17*a9fa9459Szrj    along with this program; if not, write to the Free Software
18*a9fa9459Szrj    Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
19*a9fa9459Szrj    MA 02110-1301, USA.  */
20*a9fa9459Szrj 
21*a9fa9459Szrj /* This file holds definitions specific to the i370 ELF ABI.  Note
22*a9fa9459Szrj    that most of this is not actually implemented by BFD.  */
23*a9fa9459Szrj 
24*a9fa9459Szrj #ifndef _ELF_I370_H
25*a9fa9459Szrj #define _ELF_I370_H
26*a9fa9459Szrj 
27*a9fa9459Szrj #include "elf/reloc-macros.h"
28*a9fa9459Szrj 
29*a9fa9459Szrj /* Processor specific section headers, sh_type field */
30*a9fa9459Szrj 
31*a9fa9459Szrj #define SHT_ORDERED		SHT_HIPROC	/* Link editor is to sort the \
32*a9fa9459Szrj 						   entries in this section \
33*a9fa9459Szrj 						   based on the address \
34*a9fa9459Szrj 						   specified in the associated \
35*a9fa9459Szrj 						   symbol table entry.  */
36*a9fa9459Szrj 
37*a9fa9459Szrj #define	EF_I370_RELOCATABLE	0x00010000	/* i370 -mrelocatable flag */
38*a9fa9459Szrj #define	EF_I370_RELOCATABLE_LIB	0x00008000	/* i370 -mrelocatable-lib flag */
39*a9fa9459Szrj 
40*a9fa9459Szrj /* i370 relocations
41*a9fa9459Szrj    Note that there is really just one relocation that we currently
42*a9fa9459Szrj    support (and only one that we seem to need, at the moment), and
43*a9fa9459Szrj    that is the 31-bit address relocation.  Note that the 370/390
44*a9fa9459Szrj    only supports a 31-bit (2GB) address space.  */
45*a9fa9459Szrj 
46*a9fa9459Szrj START_RELOC_NUMBERS (i370_reloc_type)
47*a9fa9459Szrj   RELOC_NUMBER (R_I370_NONE,      0)
48*a9fa9459Szrj   RELOC_NUMBER (R_I370_ADDR31,    1)
49*a9fa9459Szrj   RELOC_NUMBER (R_I370_ADDR32,    2)
50*a9fa9459Szrj   RELOC_NUMBER (R_I370_ADDR16,    3)
51*a9fa9459Szrj   RELOC_NUMBER (R_I370_REL31,     4)
52*a9fa9459Szrj   RELOC_NUMBER (R_I370_REL32,     5)
53*a9fa9459Szrj   RELOC_NUMBER (R_I370_ADDR12,    6)
54*a9fa9459Szrj   RELOC_NUMBER (R_I370_REL12,     7)
55*a9fa9459Szrj   RELOC_NUMBER (R_I370_ADDR8,     8)
56*a9fa9459Szrj   RELOC_NUMBER (R_I370_REL8,      9)
57*a9fa9459Szrj   RELOC_NUMBER (R_I370_COPY,     10)
58*a9fa9459Szrj   RELOC_NUMBER (R_I370_RELATIVE, 11)
59*a9fa9459Szrj END_RELOC_NUMBERS (R_I370_max)
60*a9fa9459Szrj 
61*a9fa9459Szrj #endif /* _ELF_I370_H */
62