lldELF is used by each ELF backend. lldELF's ELFLinkingContext also held a reference to each backend, creating a link-time cycle. This patch moves the backend references to lldDriver. Differential Revision: http://reviews.llvm.org/D7119 llvm-svn: 226976
37 lines
980 B
C++
37 lines
980 B
C++
//===--------- lib/ReaderWriter/ELF/ARM/ARMLinkingContext.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_ARM_ARM_LINKING_CONTEXT_H
|
|
#define LLD_READER_WRITER_ELF_ARM_ARM_LINKING_CONTEXT_H
|
|
|
|
#include "lld/ReaderWriter/ELFLinkingContext.h"
|
|
#include "llvm/Object/ELF.h"
|
|
#include "llvm/Support/ELF.h"
|
|
|
|
namespace lld {
|
|
namespace elf {
|
|
|
|
class ARMLinkingContext final : public ELFLinkingContext {
|
|
public:
|
|
static std::unique_ptr<ELFLinkingContext> create(llvm::Triple);
|
|
ARMLinkingContext(llvm::Triple);
|
|
|
|
void addPasses(PassManager &) override;
|
|
|
|
uint64_t getBaseAddress() const override {
|
|
if (_baseAddress == 0)
|
|
return 0x400000;
|
|
return _baseAddress;
|
|
}
|
|
};
|
|
} // end namespace elf
|
|
} // end namespace lld
|
|
|
|
#endif
|