mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-12 17:32:19 +00:00
introduce WinCOFFObjectWriter, patch by Michael Spencer!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108103 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
eb72dcaef7
commit
b162290e39
@ -162,6 +162,8 @@ public:
|
|||||||
/// @}
|
/// @}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
MCObjectWriter *createWinCOFFObjectWriter(raw_ostream &OS);
|
||||||
|
|
||||||
} // End llvm namespace
|
} // End llvm namespace
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -25,5 +25,6 @@ add_llvm_library(LLVMMC
|
|||||||
MCValue.cpp
|
MCValue.cpp
|
||||||
MachObjectWriter.cpp
|
MachObjectWriter.cpp
|
||||||
WinCOFFStreamer.cpp
|
WinCOFFStreamer.cpp
|
||||||
|
WinCOFFObjectWriter.cpp
|
||||||
TargetAsmBackend.cpp
|
TargetAsmBackend.cpp
|
||||||
)
|
)
|
||||||
|
71
lib/MC/WinCOFFObjectWriter.cpp
Normal file
71
lib/MC/WinCOFFObjectWriter.cpp
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
//===-- llvm/MC/WinCOFFObjectWriter.cpp -------------------------*- C++ -*-===//
|
||||||
|
//
|
||||||
|
// The LLVM Compiler Infrastructure
|
||||||
|
//
|
||||||
|
// This file is distributed under the University of Illinois Open Source
|
||||||
|
// License. See LICENSE.TXT for details.
|
||||||
|
//
|
||||||
|
//===----------------------------------------------------------------------===//
|
||||||
|
//
|
||||||
|
// This file contains an implementation of a Win32 COFF object file writer.
|
||||||
|
//
|
||||||
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
#define DEBUG_TYPE "WinCOFFObjectWriter"
|
||||||
|
#include "llvm/MC/MCObjectWriter.h"
|
||||||
|
#include "llvm/MC/MCValue.h"
|
||||||
|
#include "llvm/MC/MCAssembler.h"
|
||||||
|
#include "llvm/MC/MCAsmLayout.h"
|
||||||
|
using namespace llvm;
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
class WinCOFFObjectWriter : public MCObjectWriter {
|
||||||
|
public:
|
||||||
|
WinCOFFObjectWriter(raw_ostream &OS);
|
||||||
|
|
||||||
|
// MCObjectWriter interface implementation.
|
||||||
|
|
||||||
|
void ExecutePostLayoutBinding(MCAssembler &Asm);
|
||||||
|
|
||||||
|
void RecordRelocation(const MCAssembler &Asm,
|
||||||
|
const MCAsmLayout &Layout,
|
||||||
|
const MCFragment *Fragment,
|
||||||
|
const MCFixup &Fixup,
|
||||||
|
MCValue Target,
|
||||||
|
uint64_t &FixedValue);
|
||||||
|
|
||||||
|
void WriteObject(const MCAssembler &Asm, const MCAsmLayout &Layout);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
WinCOFFObjectWriter::WinCOFFObjectWriter(raw_ostream &OS)
|
||||||
|
: MCObjectWriter(OS, true) {
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// MCObjectWriter interface implementations
|
||||||
|
|
||||||
|
void WinCOFFObjectWriter::ExecutePostLayoutBinding(MCAssembler &Asm) {
|
||||||
|
}
|
||||||
|
|
||||||
|
void WinCOFFObjectWriter::RecordRelocation(const MCAssembler &Asm,
|
||||||
|
const MCAsmLayout &Layout,
|
||||||
|
const MCFragment *Fragment,
|
||||||
|
const MCFixup &Fixup,
|
||||||
|
MCValue Target,
|
||||||
|
uint64_t &FixedValue) {
|
||||||
|
}
|
||||||
|
|
||||||
|
void WinCOFFObjectWriter::WriteObject(const MCAssembler &Asm,
|
||||||
|
const MCAsmLayout &Layout) {
|
||||||
|
}
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// WinCOFFObjectWriter factory function
|
||||||
|
|
||||||
|
namespace llvm {
|
||||||
|
MCObjectWriter *createWinCOFFObjectWriter(raw_ostream &OS) {
|
||||||
|
return new WinCOFFObjectWriter(OS);
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user