1 //===-- llvm/MC/ELFObjectWriter.h - ELF File Writer ---------*- 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 #ifndef LLVM_MC_ELFOBJECTWRITER_H
11 #define LLVM_MC_ELFOBJECTWRITER_H
13 #include "llvm/ADT/Triple.h"
14 #include "llvm/MC/MCObjectWriter.h"
15 #include "llvm/Support/raw_ostream.h"
25 class ELFObjectWriter : public MCObjectWriter {
29 ELFObjectWriter(raw_ostream &OS, bool Is64Bit, Triple::OSType OSType,
30 uint16_t EMachine, bool IsLittleEndian = true,
31 bool HasRelocationAddend = true);
33 virtual ~ELFObjectWriter();
35 virtual void ExecutePostLayoutBinding(MCAssembler &Asm);
37 virtual void RecordRelocation(const MCAssembler &Asm,
38 const MCAsmLayout &Layout,
39 const MCFragment *Fragment,
40 const MCFixup &Fixup, MCValue Target,
41 uint64_t &FixedValue);
43 virtual bool IsFixupFullyResolved(const MCAssembler &Asm,
46 const MCFragment *DF) const;
48 virtual void WriteObject(MCAssembler &Asm, const MCAsmLayout &Layout);
51 } // End llvm namespace