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