| OLD | NEW |
| 1 //===-- ARMELFWriterInfo.h - ELF Writer Info for ARM ------------*- C++ -*-===// | 1 //===-- ARMELFWriterInfo.h - ELF Writer Info for ARM ------------*- C++ -*-===// |
| 2 // | 2 // |
| 3 // The LLVM Compiler Infrastructure | 3 // The LLVM Compiler Infrastructure |
| 4 // | 4 // |
| 5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
| 6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
| 7 // | 7 // |
| 8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
| 9 // | 9 // |
| 10 // This file implements ELF writer information for the ARM backend. | 10 // This file implements ELF writer information for the ARM backend. |
| 11 // | 11 // |
| 12 //===----------------------------------------------------------------------===// | 12 //===----------------------------------------------------------------------===// |
| 13 | 13 |
| 14 #ifndef ARM_ELF_WRITER_INFO_H | 14 #ifndef ARM_ELF_WRITER_INFO_H |
| 15 #define ARM_ELF_WRITER_INFO_H | 15 #define ARM_ELF_WRITER_INFO_H |
| 16 | 16 |
| 17 #include "llvm/Target/TargetELFWriterInfo.h" | 17 #include "llvm/Target/TargetELFWriterInfo.h" |
| 18 | 18 |
| 19 namespace llvm { | 19 namespace llvm { |
| 20 | 20 class MachineRelocation; |
| 21 class ARMELFWriterInfo : public TargetELFWriterInfo { | 21 class ARMELFWriterInfo : public TargetELFWriterInfo { |
| 22 | 22 |
| 23 // ELF Relocation types for ARM | 23 // ELF Relocation types for ARM |
| 24 // FIXME: TODO(jasonwkim): [2010/09/17 14:52:25 PDT (Friday)] | 24 // FIXME: TODO(jasonwkim): [2010/09/17 14:52:25 PDT (Friday)] |
| 25 // Come up with a better way to orgnize the 100+ ARM reloc types. | 25 // Come up with a better way to orgnize the 100+ ARM reloc types. |
| 26 | 26 |
| 27 enum ARMRelocationType { | 27 enum ARMRelocationType { |
| 28 }; | 28 }; |
| 29 | 29 |
| 30 public: | 30 public: |
| 31 ARMELFWriterInfo(TargetMachine &TM); | 31 ARMELFWriterInfo(TargetMachine &TM); |
| 32 virtual ~ARMELFWriterInfo(); | 32 virtual ~ARMELFWriterInfo(); |
| 33 | 33 |
| 34 /// getRelocationType - Returns the target specific ELF Relocation type. | 34 /// getRelocationType - Returns the target specific ELF Relocation type. |
| 35 /// 'MachineRelTy' contains the object code independent relocation type | 35 /// S is the ELF section blob that contains the relocation |
| 36 virtual unsigned getRelocationType(unsigned MachineRelTy) const; | 36 /// MR contains the object code independent relocation type |
| 37 virtual unsigned getRelocationType(const BinaryObject &S, |
| 38 const MachineRelocation &MR) const; |
| 37 | 39 |
| 38 /// hasRelocationAddend - True if the target uses an addend in the | 40 /// hasRelocationAddend - True if the target uses an addend in the |
| 39 /// ELF relocation entry. | 41 /// ELF relocation entry. |
| 40 virtual bool hasRelocationAddend() const { return false; } | 42 virtual bool hasRelocationAddend() const { return false; } |
| 41 | 43 |
| 42 /// getDefaultAddendForRelTy - Gets the default addend value for a | 44 /// getDefaultAddendForRelTy - Gets the default addend value for a |
| 43 /// relocation entry based on the target ELF relocation type. | 45 /// relocation entry based on the target ELF relocation type. |
| 44 virtual long int getDefaultAddendForRelTy(unsigned RelTy, | 46 virtual long int getDefaultAddendForRelTy(unsigned RelTy, |
| 45 long int Modifier = 0) const; | 47 long int Modifier = 0) const; |
| 46 | 48 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 57 /// computeRelocation - Some relocatable fields could be relocated | 59 /// computeRelocation - Some relocatable fields could be relocated |
| 58 /// directly, avoiding the relocation symbol emission, compute the | 60 /// directly, avoiding the relocation symbol emission, compute the |
| 59 /// final relocation value for this symbol. | 61 /// final relocation value for this symbol. |
| 60 virtual long int computeRelocation(unsigned SymOffset, unsigned RelOffset, | 62 virtual long int computeRelocation(unsigned SymOffset, unsigned RelOffset, |
| 61 unsigned RelTy) const; | 63 unsigned RelTy) const; |
| 62 }; | 64 }; |
| 63 | 65 |
| 64 } // end llvm namespace | 66 } // end llvm namespace |
| 65 | 67 |
| 66 #endif // ARM_ELF_WRITER_INFO_H | 68 #endif // ARM_ELF_WRITER_INFO_H |
| OLD | NEW |