Remove unnecessary elfcpp_config.h file.
[deliverable/binutils-gdb.git] / gold / reloc-types.h
CommitLineData
c06b7b0b
ILT
1// reloc-types.h -- ELF relocation templates for gold -*- C++ -*-
2
3// This header files defines a few convenient templated types for use
4// when handling ELF relocations.
5
6#ifndef GOLD_RELOC_TYPES_H
7#define GOLD_RELOC_TYPES_H
8
9#include "elfcpp.h"
10
11namespace gold
12{
13
14// Pick the ELF relocation accessor class and the size based on
15// SH_TYPE, which is either elfcpp::SHT_REL or elfcpp::SHT_RELA.
16
17template<int sh_type, int size, bool big_endian>
18struct Reloc_types;
19
20template<int size, bool big_endian>
21struct Reloc_types<elfcpp::SHT_REL, size, big_endian>
22{
23 typedef typename elfcpp::Rel<size, big_endian> Reloc;
24 static const int reloc_size = elfcpp::Elf_sizes<size>::rel_size;
25};
26
27template<int size, bool big_endian>
28struct Reloc_types<elfcpp::SHT_RELA, size, big_endian>
29{
30 typedef typename elfcpp::Rela<size, big_endian> Reloc;
31 static const int reloc_size = elfcpp::Elf_sizes<size>::rela_size;
32};
33
34}; // End namespace gold.
35
36#endif // !defined(GOLD_RELOC_TYPE_SH)
This page took 0.050264 seconds and 4 git commands to generate.