1 //===-- X86ELFWriterInfo.h - ELF Writer Info for X86 ------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file implements ELF writer information for the X86 backend.
12 //===----------------------------------------------------------------------===//
14 #ifndef X86_ELF_WRITER_INFO_H
15 #define X86_ELF_WRITER_INFO_H
17 #include "llvm/Target/TargetELFWriterInfo.h"
21 class X86ELFWriterInfo : public TargetELFWriterInfo {
23 // ELF Relocation types for X86
24 enum X86RelocationType {
30 // ELF Relocation types for X86_64
31 enum X86_64RelocationType {
41 X86ELFWriterInfo(TargetMachine &TM);
42 virtual ~X86ELFWriterInfo();
44 /// getRelocationType - Returns the target specific ELF Relocation type.
45 /// 'MachineRelTy' contains the object code independent relocation type
46 virtual unsigned getRelocationType(unsigned MachineRelTy) const;
48 /// hasRelocationAddend - True if the target uses an addend in the
49 /// ELF relocation entry.
50 virtual bool hasRelocationAddend() const { return is64Bit ? true : false; }
52 /// getAddendForRelTy - Gets the addend value for an ELF relocation entry
53 /// based on the target relocation type
54 virtual long int getAddendForRelTy(unsigned RelTy) const;
57 } // end llvm namespace
59 #endif // X86_ELF_WRITER_INFO_H