168673Sobrien/* i370 ELF support for BFD. 2130561Sobrien Copyright 2000, 2002 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 i370 ELF ABI. Note 2168673Sobrien that most of this is not actually implemented by BFD. */ 2268673Sobrien 2368673Sobrien#ifndef _ELF_I370_H 2468673Sobrien#define _ELF_I370_H 2568673Sobrien 26130561Sobrien#include "elf/reloc-macros.h" 27130561Sobrien 2868673Sobrien/* Processor specific section headers, sh_type field */ 2968673Sobrien 3068673Sobrien#define SHT_ORDERED SHT_HIPROC /* Link editor is to sort the \ 3168673Sobrien entries in this section \ 3268673Sobrien based on the address \ 3368673Sobrien specified in the associated \ 3468673Sobrien symbol table entry. */ 3568673Sobrien 3668673Sobrien#define EF_I370_RELOCATABLE 0x00010000 /* i370 -mrelocatable flag */ 3768673Sobrien#define EF_I370_RELOCATABLE_LIB 0x00008000 /* i370 -mrelocatable-lib flag */ 3868673Sobrien/* Processor specific section flags, sh_flags field */ 3968673Sobrien 4068673Sobrien#define SHF_EXCLUDE 0x80000000 /* Link editor is to exclude \ 4168673Sobrien this section from executable \ 4268673Sobrien and shared objects that it \ 4368673Sobrien builds when those objects \ 4468673Sobrien are not to be furhter \ 4568673Sobrien relocated. */ 4668673Sobrien 47130561Sobrien/* i370 relocations 48130561Sobrien Note that there is really just one relocation that we currently 49130561Sobrien support (and only one that we seem to need, at the moment), and 50130561Sobrien that is the 31-bit address relocation. Note that the 370/390 51130561Sobrien only supports a 31-bit (2GB) address space. */ 5268673Sobrien 53130561SobrienSTART_RELOC_NUMBERS (i370_reloc_type) 54130561Sobrien RELOC_NUMBER (R_I370_NONE, 0) 55130561Sobrien RELOC_NUMBER (R_I370_ADDR31, 1) 56130561Sobrien RELOC_NUMBER (R_I370_ADDR32, 2) 57130561Sobrien RELOC_NUMBER (R_I370_ADDR16, 3) 58130561Sobrien RELOC_NUMBER (R_I370_REL31, 4) 59130561Sobrien RELOC_NUMBER (R_I370_REL32, 5) 60130561Sobrien RELOC_NUMBER (R_I370_ADDR12, 6) 61130561Sobrien RELOC_NUMBER (R_I370_REL12, 7) 62130561Sobrien RELOC_NUMBER (R_I370_ADDR8, 8) 63130561Sobrien RELOC_NUMBER (R_I370_REL8, 9) 64130561Sobrien RELOC_NUMBER (R_I370_COPY, 10) 65130561Sobrien RELOC_NUMBER (R_I370_RELATIVE, 11) 66130561SobrienEND_RELOC_NUMBERS (R_I370_max) 67130561Sobrien 68130561Sobrien#endif /* _ELF_I370_H */ 69