i370.h revision 218822
1121982Sjhb/* i370 ELF support for BFD.
2121982Sjhb   Copyright 2000, 2002 Free Software Foundation, Inc.
3121982Sjhb
4121982SjhbThis file is part of BFD, the Binary File Descriptor library.
5121982Sjhb
6121982SjhbThis program is free software; you can redistribute it and/or modify
7121982Sjhbit under the terms of the GNU General Public License as published by
8121982Sjhbthe Free Software Foundation; either version 2 of the License, or
9121982Sjhb(at your option) any later version.
10121982Sjhb
11121982SjhbThis program is distributed in the hope that it will be useful,
12121982Sjhbbut WITHOUT ANY WARRANTY; without even the implied warranty of
13121982SjhbMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14121982SjhbGNU General Public License for more details.
15121982Sjhb
16121982SjhbYou should have received a copy of the GNU General Public License
17121982Sjhbalong with this program; if not, write to the Free Software
18121982SjhbFoundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
19121982Sjhb
20121982Sjhb/* This file holds definitions specific to the i370 ELF ABI.  Note
21121982Sjhb   that most of this is not actually implemented by BFD.  */
22121982Sjhb
23121982Sjhb#ifndef _ELF_I370_H
24121982Sjhb#define _ELF_I370_H
25121982Sjhb
26121982Sjhb#include "elf/reloc-macros.h"
27121982Sjhb
28121982Sjhb/* Processor specific section headers, sh_type field */
29121982Sjhb
30121982Sjhb#define SHT_ORDERED		SHT_HIPROC	/* Link editor is to sort the \
31121982Sjhb						   entries in this section \
32121982Sjhb						   based on the address \
33121982Sjhb						   specified in the associated \
34121982Sjhb						   symbol table entry.  */
35121982Sjhb
36121982Sjhb#define	EF_I370_RELOCATABLE	0x00010000	/* i370 -mrelocatable flag */
37121982Sjhb#define	EF_I370_RELOCATABLE_LIB	0x00008000	/* i370 -mrelocatable-lib flag */
38121982Sjhb/* Processor specific section flags, sh_flags field */
39121982Sjhb
40121982Sjhb#define SHF_EXCLUDE		0x80000000	/* Link editor is to exclude \
41121982Sjhb						   this section from executable \
42121982Sjhb						   and shared objects that it \
43121982Sjhb						   builds when those objects \
44121982Sjhb						   are not to be furhter \
45121982Sjhb						   relocated.  */
46121982Sjhb
47121982Sjhb/* i370 relocations
48121982Sjhb   Note that there is really just one relocation that we currently
49121982Sjhb   support (and only one that we seem to need, at the moment), and
50121982Sjhb   that is the 31-bit address relocation.  Note that the 370/390
51121982Sjhb   only supports a 31-bit (2GB) address space.  */
52121982Sjhb
53121982SjhbSTART_RELOC_NUMBERS (i370_reloc_type)
54121982Sjhb  RELOC_NUMBER (R_I370_NONE,      0)
55121982Sjhb  RELOC_NUMBER (R_I370_ADDR31,    1)
56121982Sjhb  RELOC_NUMBER (R_I370_ADDR32,    2)
57121982Sjhb  RELOC_NUMBER (R_I370_ADDR16,    3)
58121982Sjhb  RELOC_NUMBER (R_I370_REL31,     4)
59121982Sjhb  RELOC_NUMBER (R_I370_REL32,     5)
60121982Sjhb  RELOC_NUMBER (R_I370_ADDR12,    6)
61121982Sjhb  RELOC_NUMBER (R_I370_REL12,     7)
62121982Sjhb  RELOC_NUMBER (R_I370_ADDR8,     8)
63121982Sjhb  RELOC_NUMBER (R_I370_REL8,      9)
64121982Sjhb  RELOC_NUMBER (R_I370_COPY,     10)
65121982Sjhb  RELOC_NUMBER (R_I370_RELATIVE, 11)
66121982SjhbEND_RELOC_NUMBERS (R_I370_max)
67121982Sjhb
68121982Sjhb#endif /* _ELF_I370_H */
69121982Sjhb