1 //===-- AMDILELFWriterInfo.h - Elf Writer Info for AMDIL ---------------===//
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 AMDIL backend.
12 //===---------------------------------------------------------------------===//
13 #ifndef _AMDIL_ELF_WRITER_INFO_H_
14 #define _AMDIL_ELF_WRITER_INFO_H_
15 #include "llvm/Target/TargetELFWriterInfo.h"
18 class AMDILELFWriterInfo : public TargetELFWriterInfo {
20 AMDILELFWriterInfo(bool is64Bit_, bool isLittleEndian_);
21 virtual ~AMDILELFWriterInfo();
23 /// getRelocationType - Returns the target specific ELF Relocation type.
24 /// 'MachineRelTy' contains the object code independent relocation type
25 virtual unsigned getRelocationType(unsigned MachineRelTy) const;
27 /// 'hasRelocationAddend - True if the target uses and addend in the
28 /// ELF relocation entry.
29 virtual bool hasRelocationAddend() const;
31 /// getDefaultAddendForRelTy - Gets the default addend value for a
32 /// relocation entry based on the target ELF relocation type.
33 virtual long int getDefaultAddendForRelTy(unsigned RelTy,
34 long int Modifier = 0) const;
36 /// getRelTySize - Returns the size of relocatble field in bits
37 virtual unsigned getRelocationTySize(unsigned RelTy) const;
39 /// isPCRelativeRel - True if the relocation type is pc relative
40 virtual bool isPCRelativeRel(unsigned RelTy) const;
42 /// getJumpTableRelocationTy - Returns the machine relocation type used
43 /// to reference a jumptable.
44 virtual unsigned getAbsoluteLabelMachineRelTy() const;
46 /// computeRelocation - Some relocatable fields could be relocated
47 /// directly, avoiding the relocation symbol emission, compute the
48 /// final relocation value for this symbol.
49 virtual long int computeRelocation(unsigned SymOffset,
51 unsigned RelTy) const;
54 #endif // _AMDIL_ELF_WRITER_INFO_H_