Add s390 support
[binutils.git] / include / elf / s390.h
blob3cd99762517fc42b8daca578c09000deadf74d70
1 /* 390 ELF support for BFD.
2 Copyright (C) 2000, 2001 Free Software Foundation, Inc.
3 Contributed by Carl B. Pedersen and Martin Schwidefsky.
5 This file is part of BFD, the Binary File Descriptor library.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
20 02111-1307, USA. */
22 #ifndef _ELF_390_H
23 #define _ELF_390_H
25 /* Processor specific flags for the ELF header e_flags field. */
27 /* Symbol types. */
29 #define STACK_REG 15 /* Global Stack reg */
30 #define BACKL_REG 14 /* Global Backlink reg */
31 #define BASE_REG 13 /* Global Base reg */
32 #define GOT_REG 12 /* Holds addr of GOT */
34 #include "elf/reloc-macros.h"
36 /* Relocation types. */
38 START_RELOC_NUMBERS (elf_s390_reloc_type)
39 RELOC_NUMBER (R_390_NONE, 0) /* No reloc. */
40 RELOC_NUMBER (R_390_8, 1) /* Direct 8 bit. */
41 RELOC_NUMBER (R_390_12, 2) /* Direct 12 bit. */
42 RELOC_NUMBER (R_390_16, 3) /* Direct 16 bit. */
43 RELOC_NUMBER (R_390_32, 4) /* Direct 32 bit. */
44 RELOC_NUMBER (R_390_PC32, 5) /* PC relative 32 bit. */
45 RELOC_NUMBER (R_390_GOT12, 6) /* 12 bit GOT offset. */
46 RELOC_NUMBER (R_390_GOT32, 7) /* 32 bit GOT offset. */
47 RELOC_NUMBER (R_390_PLT32, 8) /* 32 bit PC relative PLT address. */
48 RELOC_NUMBER (R_390_COPY, 9) /* Copy symbol at runtime. */
49 RELOC_NUMBER (R_390_GLOB_DAT, 10) /* Create GOT entry. */
50 RELOC_NUMBER (R_390_JMP_SLOT, 11) /* Create PLT entry. */
51 RELOC_NUMBER (R_390_RELATIVE, 12) /* Adjust by program base. */
52 RELOC_NUMBER (R_390_GOTOFF, 13) /* 32 bit offset to GOT. */
53 RELOC_NUMBER (R_390_GOTPC, 14) /* 32 bit PC relative offset to GOT. */
54 RELOC_NUMBER (R_390_GOT16, 15) /* 16 bit GOT offset. */
55 RELOC_NUMBER (R_390_PC16, 16) /* PC relative 16 bit. */
56 RELOC_NUMBER (R_390_PC16DBL, 17) /* PC relative 16 bit shifted by 1. */
57 RELOC_NUMBER (R_390_PLT16DBL, 18) /* 16 bit PC rel. PLT shifted by 1. */
58 RELOC_NUMBER (R_390_PC32DBL, 19) /* PC relative 32 bit shifted by 1. */
59 RELOC_NUMBER (R_390_PLT32DBL, 20) /* 32 bit PC rel. PLT shifted by 1. */
60 RELOC_NUMBER (R_390_GOTPCDBL, 21) /* 32 bit PC rel. GOT shifted by 1. */
61 RELOC_NUMBER (R_390_64, 22) /* Direct 64 bit. */
62 RELOC_NUMBER (R_390_PC64, 23) /* PC relative 64 bit. */
63 RELOC_NUMBER (R_390_GOT64, 24) /* 64 bit GOT offset. */
64 RELOC_NUMBER (R_390_PLT64, 25) /* 64 bit PC relative PLT address. */
65 RELOC_NUMBER (R_390_GOTENT, 26) /* 32 bit PC rel. to GOT entry >> 1. */
66 /* These are GNU extensions to enable C++ vtable garbage collection. */
67 RELOC_NUMBER (R_390_GNU_VTINHERIT, 250)
68 RELOC_NUMBER (R_390_GNU_VTENTRY, 251)
69 END_RELOC_NUMBERS (R_390_max)
71 #endif /* _ELF_390_H */