1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 20:43:44 +02:00
llvm-mirror/include/llvm/MC/MachObjectWriter.h
Rafael Espindola 5f53528867 On ELF we need to know which symbols are used in relocations to decide if
they should be in the symbol table or not. Instead of "guessing", just compute
the symbol table after the relocations are known.

llvm-svn: 115619
2010-10-05 15:11:03 +00:00

50 lines
1.5 KiB
C++

//===-- llvm/MC/MachObjectWriter.h - Mach-O File Writer ---------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_MC_MACHOBJECTWRITER_H
#define LLVM_MC_MACHOBJECTWRITER_H
#include "llvm/MC/MCObjectWriter.h"
#include "llvm/Support/raw_ostream.h"
#include <cassert>
namespace llvm {
class MCAssembler;
class MCFragment;
class MCFixup;
class MCValue;
class raw_ostream;
class MachObjectWriter : public MCObjectWriter {
void *Impl;
public:
MachObjectWriter(raw_ostream &OS, bool Is64Bit, bool IsLittleEndian = true);
virtual ~MachObjectWriter();
virtual void ExecutePostLayoutBinding(MCAssembler &Asm);
virtual void RecordRelocation(const MCAssembler &Asm,
const MCAsmLayout &Layout,
const MCFragment *Fragment,
const MCFixup &Fixup, MCValue Target,
uint64_t &FixedValue);
virtual bool IsFixupFullyResolved(const MCAssembler &Asm,
const MCValue Target,
bool IsPCRel,
const MCFragment *DF) const;
virtual void WriteObject(MCAssembler &Asm, const MCAsmLayout &Layout);
};
} // End llvm namespace
#endif