Files
clang-p2996/lld/lib/ReaderWriter/ELF/Mips/MipsLinkingContext.h
Simon Atanasyan 663aa62863 [Mips] Set default base address for MIPS executables to 0x400000. Assign
the lowest segment address to the MIPS_BASE_ADDRESS dynamic tag.

llvm-svn: 199234
2014-01-14 18:19:12 +00:00

47 lines
1.3 KiB
C++

//===- lib/ReaderWriter/ELF/Mips/MipsLinkingContext.h ---------------------===//
//
// The LLVM Linker
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifndef LLD_READER_WRITER_ELF_MIPS_LINKING_CONTEXT_H
#define LLD_READER_WRITER_ELF_MIPS_LINKING_CONTEXT_H
#include "lld/ReaderWriter/ELFLinkingContext.h"
namespace lld {
namespace elf {
/// \brief Mips internal references.
enum {
/// \brief Do nothing but mark GOT entry as a global one.
LLD_R_MIPS_GLOBAL_GOT = 1024,
/// \brief The same as R_MIPS_GOT16 but for global symbols.
LLD_R_MIPS_GLOBAL_GOT16 = 1025
};
typedef llvm::object::ELFType<llvm::support::little, 2, false> Mips32ElELFType;
template <class ELFType> class MipsTargetLayout;
class MipsLinkingContext LLVM_FINAL : public ELFLinkingContext {
public:
MipsLinkingContext(llvm::Triple triple);
MipsTargetLayout<Mips32ElELFType> &getTargetLayout();
const MipsTargetLayout<Mips32ElELFType> &getTargetLayout() const;
// ELFLinkingContext
virtual bool isLittleEndian() const;
virtual uint64_t getBaseAddress() const;
virtual StringRef entrySymbolName() const;
virtual void addPasses(PassManager &pm);
};
} // elf
} // lld
#endif