xref: /netbsd-src/external/gpl3/binutils.old/dist/include/elf/i370.h (revision e992f068c547fd6e84b3f104dc2340adcc955732)
175fd0b74Schristos /* i370 ELF support for BFD.
2*e992f068Schristos    Copyright (C) 2000-2022 Free Software Foundation, Inc.
375fd0b74Schristos 
475fd0b74Schristos    This file is part of BFD, the Binary File Descriptor library.
575fd0b74Schristos 
675fd0b74Schristos    This program is free software; you can redistribute it and/or modify
775fd0b74Schristos    it under the terms of the GNU General Public License as published by
875fd0b74Schristos    the Free Software Foundation; either version 3 of the License, or
975fd0b74Schristos    (at your option) any later version.
1075fd0b74Schristos 
1175fd0b74Schristos    This program is distributed in the hope that it will be useful,
1275fd0b74Schristos    but WITHOUT ANY WARRANTY; without even the implied warranty of
1375fd0b74Schristos    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1475fd0b74Schristos    GNU General Public License for more details.
1575fd0b74Schristos 
1675fd0b74Schristos    You should have received a copy of the GNU General Public License
1775fd0b74Schristos    along with this program; if not, write to the Free Software
1875fd0b74Schristos    Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
1975fd0b74Schristos    MA 02110-1301, USA.  */
2075fd0b74Schristos 
2175fd0b74Schristos /* This file holds definitions specific to the i370 ELF ABI.  Note
2275fd0b74Schristos    that most of this is not actually implemented by BFD.  */
2375fd0b74Schristos 
2475fd0b74Schristos #ifndef _ELF_I370_H
2575fd0b74Schristos #define _ELF_I370_H
2675fd0b74Schristos 
2775fd0b74Schristos #include "elf/reloc-macros.h"
2875fd0b74Schristos 
2975fd0b74Schristos /* Processor specific section headers, sh_type field */
3075fd0b74Schristos 
3175fd0b74Schristos #define SHT_ORDERED		SHT_HIPROC	/* Link editor is to sort the \
3275fd0b74Schristos 						   entries in this section \
3375fd0b74Schristos 						   based on the address \
3475fd0b74Schristos 						   specified in the associated \
3575fd0b74Schristos 						   symbol table entry.  */
3675fd0b74Schristos 
3775fd0b74Schristos #define	EF_I370_RELOCATABLE	0x00010000	/* i370 -mrelocatable flag */
3875fd0b74Schristos #define	EF_I370_RELOCATABLE_LIB	0x00008000	/* i370 -mrelocatable-lib flag */
3975fd0b74Schristos 
4075fd0b74Schristos /* i370 relocations
4175fd0b74Schristos    Note that there is really just one relocation that we currently
4275fd0b74Schristos    support (and only one that we seem to need, at the moment), and
4375fd0b74Schristos    that is the 31-bit address relocation.  Note that the 370/390
4475fd0b74Schristos    only supports a 31-bit (2GB) address space.  */
4575fd0b74Schristos 
4675fd0b74Schristos START_RELOC_NUMBERS (i370_reloc_type)
4775fd0b74Schristos   RELOC_NUMBER (R_I370_NONE,      0)
4875fd0b74Schristos   RELOC_NUMBER (R_I370_ADDR31,    1)
4975fd0b74Schristos   RELOC_NUMBER (R_I370_ADDR32,    2)
5075fd0b74Schristos   RELOC_NUMBER (R_I370_ADDR16,    3)
5175fd0b74Schristos   RELOC_NUMBER (R_I370_REL31,     4)
5275fd0b74Schristos   RELOC_NUMBER (R_I370_REL32,     5)
5375fd0b74Schristos   RELOC_NUMBER (R_I370_ADDR12,    6)
5475fd0b74Schristos   RELOC_NUMBER (R_I370_REL12,     7)
5575fd0b74Schristos   RELOC_NUMBER (R_I370_ADDR8,     8)
5675fd0b74Schristos   RELOC_NUMBER (R_I370_REL8,      9)
5775fd0b74Schristos   RELOC_NUMBER (R_I370_COPY,     10)
5875fd0b74Schristos   RELOC_NUMBER (R_I370_RELATIVE, 11)
5975fd0b74Schristos END_RELOC_NUMBERS (R_I370_max)
6075fd0b74Schristos 
6175fd0b74Schristos #endif /* _ELF_I370_H */
62