2012-02-18 20:03:15 +08:00
|
|
|
//===-- X86TargetObjectFile.h - X86 Object Info -----------------*- C++ -*-===//
|
2009-09-16 09:46:41 +08:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2014-08-14 00:26:38 +08:00
|
|
|
#ifndef LLVM_LIB_TARGET_X86_X86TARGETOBJECTFILE_H
|
|
|
|
#define LLVM_LIB_TARGET_X86_X86TARGETOBJECTFILE_H
|
2009-09-16 09:46:41 +08:00
|
|
|
|
2010-02-16 06:37:53 +08:00
|
|
|
#include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
|
2009-09-16 09:46:41 +08:00
|
|
|
#include "llvm/Target/TargetLoweringObjectFile.h"
|
|
|
|
|
|
|
|
namespace llvm {
|
2010-02-16 06:35:59 +08:00
|
|
|
|
2012-06-26 18:05:06 +08:00
|
|
|
/// X86_64MachoTargetObjectFile - This TLOF implementation is used for Darwin
|
2010-03-16 03:04:37 +08:00
|
|
|
/// x86-64.
|
2012-06-26 18:05:06 +08:00
|
|
|
class X86_64MachoTargetObjectFile : public TargetLoweringObjectFileMachO {
|
2010-03-16 03:04:37 +08:00
|
|
|
public:
|
2014-02-20 01:23:20 +08:00
|
|
|
const MCExpr *
|
|
|
|
getTTypeGlobalReference(const GlobalValue *GV, unsigned Encoding,
|
|
|
|
Mangler &Mang, const TargetMachine &TM,
|
2014-03-02 17:09:27 +08:00
|
|
|
MachineModuleInfo *MMI,
|
|
|
|
MCStreamer &Streamer) const override;
|
2011-04-28 07:08:15 +08:00
|
|
|
|
|
|
|
// getCFIPersonalitySymbol - The symbol that gets passed to
|
|
|
|
// .cfi_personality.
|
2014-02-08 22:53:28 +08:00
|
|
|
MCSymbol *getCFIPersonalitySymbol(const GlobalValue *GV, Mangler &Mang,
|
2014-02-20 01:23:20 +08:00
|
|
|
const TargetMachine &TM,
|
2014-03-02 17:09:27 +08:00
|
|
|
MachineModuleInfo *MMI) const override;
|
2015-02-24 05:26:18 +08:00
|
|
|
|
2015-03-06 21:49:05 +08:00
|
|
|
const MCExpr *getIndirectSymViaGOTPCRel(const MCSymbol *Sym,
|
|
|
|
const MCValue &MV, int64_t Offset,
|
|
|
|
MachineModuleInfo *MMI,
|
|
|
|
MCStreamer &Streamer) const override;
|
2010-02-16 06:35:59 +08:00
|
|
|
};
|
|
|
|
|
2015-03-04 05:01:27 +08:00
|
|
|
/// \brief This implemenatation is used for X86 ELF targets that don't
|
|
|
|
/// have a further specialization.
|
|
|
|
class X86ELFTargetObjectFile : public TargetLoweringObjectFileELF {
|
|
|
|
/// \brief Describe a TLS variable address within debug info.
|
|
|
|
const MCExpr *getDebugThreadLocalSymbol(const MCSymbol *Sym) const override;
|
|
|
|
};
|
|
|
|
|
2015-03-12 00:16:09 +08:00
|
|
|
/// X86LinuxNaClTargetObjectFile - This implementation is used for linux and
|
|
|
|
/// Native Client on x86 and x86-64.
|
|
|
|
class X86LinuxNaClTargetObjectFile : public X86ELFTargetObjectFile {
|
2014-03-02 17:09:27 +08:00
|
|
|
void Initialize(MCContext &Ctx, const TargetMachine &TM) override;
|
2012-06-19 08:48:28 +08:00
|
|
|
};
|
|
|
|
|
2014-01-15 17:16:42 +08:00
|
|
|
/// \brief This implementation is used for Windows targets on x86 and x86-64.
|
|
|
|
class X86WindowsTargetObjectFile : public TargetLoweringObjectFileCOFF {
|
2014-03-02 17:09:27 +08:00
|
|
|
const MCExpr *
|
|
|
|
getExecutableRelativeSymbol(const ConstantExpr *CE, Mangler &Mang,
|
|
|
|
const TargetMachine &TM) const override;
|
2014-07-15 06:57:27 +08:00
|
|
|
|
|
|
|
/// \brief Given a mergeable constant with the specified size and relocation
|
|
|
|
/// information, return a section that it should be placed in.
|
2015-05-22 03:20:38 +08:00
|
|
|
MCSection *getSectionForConstant(SectionKind Kind,
|
|
|
|
const Constant *C) const override;
|
2014-01-15 17:16:42 +08:00
|
|
|
};
|
|
|
|
|
2009-09-16 09:46:41 +08:00
|
|
|
} // end namespace llvm
|
|
|
|
|
|
|
|
#endif
|