Rafael Espindola | fd9493d | 2010-09-27 18:31:37 +0000 | [diff] [blame] | 1 | //===-- ARMELFWriterInfo.cpp - ELF Writer Info for the ARM backend --------===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
| 10 | // This file implements ELF writer information for the ARM backend. |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #include "ARMELFWriterInfo.h" |
| 15 | #include "ARMRelocations.h" |
| 16 | #include "llvm/Function.h" |
| 17 | #include "llvm/Support/ErrorHandling.h" |
| 18 | #include "llvm/Target/TargetData.h" |
| 19 | #include "llvm/Target/TargetMachine.h" |
| 20 | |
| 21 | using namespace llvm; |
| 22 | |
| 23 | //===----------------------------------------------------------------------===// |
| 24 | // Implementation of the ARMELFWriterInfo class |
| 25 | //===----------------------------------------------------------------------===// |
| 26 | |
| 27 | ARMELFWriterInfo::ARMELFWriterInfo(TargetMachine &TM) |
Rafael Espindola | 0febc46 | 2010-10-03 18:59:45 +0000 | [diff] [blame] | 28 | : TargetELFWriterInfo(TM.getTargetData()->getPointerSizeInBits() == 64, |
| 29 | TM.getTargetData()->isLittleEndian()) { |
Rafael Espindola | fd9493d | 2010-09-27 18:31:37 +0000 | [diff] [blame] | 30 | // silently OK construction |
| 31 | } |
| 32 | |
| 33 | ARMELFWriterInfo::~ARMELFWriterInfo() {} |
| 34 | |
| 35 | unsigned ARMELFWriterInfo::getRelocationType(unsigned MachineRelTy) const { |
| 36 | assert(0 && "ARMELFWriterInfo::getRelocationType() not implemented"); |
| 37 | return 0; |
| 38 | } |
| 39 | |
| 40 | long int ARMELFWriterInfo::getDefaultAddendForRelTy(unsigned RelTy, |
| 41 | long int Modifier) const { |
| 42 | assert(0 && "ARMELFWriterInfo::getDefaultAddendForRelTy() not implemented"); |
| 43 | return 0; |
| 44 | } |
| 45 | |
| 46 | unsigned ARMELFWriterInfo::getRelocationTySize(unsigned RelTy) const { |
| 47 | assert(0 && "ARMELFWriterInfo::getRelocationTySize() not implemented"); |
| 48 | return 0; |
| 49 | } |
| 50 | |
| 51 | bool ARMELFWriterInfo::isPCRelativeRel(unsigned RelTy) const { |
| 52 | assert(0 && "ARMELFWriterInfo::isPCRelativeRel() not implemented"); |
| 53 | return 1; |
| 54 | } |
| 55 | |
| 56 | unsigned ARMELFWriterInfo::getAbsoluteLabelMachineRelTy() const { |
Eric Christopher | a99c3e9 | 2010-09-28 04:18:29 +0000 | [diff] [blame] | 57 | assert(0 && |
| 58 | "ARMELFWriterInfo::getAbsoluteLabelMachineRelTy() not implemented"); |
Rafael Espindola | fd9493d | 2010-09-27 18:31:37 +0000 | [diff] [blame] | 59 | return 0; |
| 60 | } |
| 61 | |
| 62 | long int ARMELFWriterInfo::computeRelocation(unsigned SymOffset, |
| 63 | unsigned RelOffset, |
| 64 | unsigned RelTy) const { |
Eric Christopher | a99c3e9 | 2010-09-28 04:18:29 +0000 | [diff] [blame] | 65 | assert(0 && |
| 66 | "ARMELFWriterInfo::getAbsoluteLabelMachineRelTy() not implemented"); |
Rafael Espindola | fd9493d | 2010-09-27 18:31:37 +0000 | [diff] [blame] | 67 | return 0; |
| 68 | } |