2015-08-14 22:12:54 +08:00
|
|
|
//===- Config.h -------------------------------------------------*- C++ -*-===//
|
2015-07-25 05:03:07 +08:00
|
|
|
//
|
|
|
|
// The LLVM Linker
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef LLD_ELF_CONFIG_H
|
|
|
|
#define LLD_ELF_CONFIG_H
|
|
|
|
|
|
|
|
#include "llvm/ADT/StringRef.h"
|
2015-10-07 17:13:03 +08:00
|
|
|
#include "llvm/Support/ELF.h"
|
2015-07-25 05:03:07 +08:00
|
|
|
|
2015-09-28 21:11:36 +08:00
|
|
|
#include <vector>
|
|
|
|
|
2015-07-25 05:03:07 +08:00
|
|
|
namespace lld {
|
|
|
|
namespace elf2 {
|
|
|
|
|
2015-10-12 09:55:32 +08:00
|
|
|
class InputFile;
|
2015-10-10 05:12:40 +08:00
|
|
|
class SymbolBody;
|
|
|
|
|
2015-10-07 17:13:03 +08:00
|
|
|
enum ELFKind {
|
|
|
|
ELFNoneKind,
|
|
|
|
ELF32LEKind,
|
|
|
|
ELF32BEKind,
|
|
|
|
ELF64LEKind,
|
|
|
|
ELF64BEKind
|
|
|
|
};
|
|
|
|
|
2015-07-25 05:03:07 +08:00
|
|
|
struct Configuration {
|
2015-10-10 05:12:40 +08:00
|
|
|
SymbolBody *EntrySym = nullptr;
|
2015-10-12 09:55:32 +08:00
|
|
|
InputFile *FirstElf = nullptr;
|
2015-09-12 02:49:42 +08:00
|
|
|
llvm::StringRef DynamicLinker;
|
2015-09-30 06:33:21 +08:00
|
|
|
llvm::StringRef Entry;
|
2015-10-11 11:36:49 +08:00
|
|
|
llvm::StringRef Emulation;
|
2015-10-08 03:34:51 +08:00
|
|
|
llvm::StringRef Fini;
|
|
|
|
llvm::StringRef Init;
|
2015-10-07 08:25:09 +08:00
|
|
|
llvm::StringRef OutputFile;
|
2015-10-02 03:36:04 +08:00
|
|
|
llvm::StringRef SoName;
|
2015-09-30 06:33:21 +08:00
|
|
|
llvm::StringRef Sysroot;
|
2015-09-12 05:18:56 +08:00
|
|
|
std::string RPath;
|
2015-10-11 11:28:42 +08:00
|
|
|
std::vector<llvm::StringRef> SearchPaths;
|
2015-10-01 01:26:13 +08:00
|
|
|
bool AllowMultipleDefinition;
|
2015-10-12 04:59:12 +08:00
|
|
|
bool AsNeeded = false;
|
2015-10-01 01:26:13 +08:00
|
|
|
bool DiscardAll;
|
|
|
|
bool DiscardLocals;
|
|
|
|
bool DiscardNone;
|
2015-10-07 04:02:15 +08:00
|
|
|
bool EnableNewDtags;
|
2015-10-01 01:26:13 +08:00
|
|
|
bool ExportDynamic;
|
|
|
|
bool NoInhibitExec;
|
2015-10-02 04:14:45 +08:00
|
|
|
bool NoUndefined;
|
2015-10-01 01:26:13 +08:00
|
|
|
bool Shared;
|
2015-10-02 00:42:03 +08:00
|
|
|
bool Static = false;
|
2015-10-11 10:03:03 +08:00
|
|
|
bool Verbose;
|
2015-10-09 10:46:28 +08:00
|
|
|
bool ZNow = false;
|
2015-10-14 00:20:50 +08:00
|
|
|
ELFKind EKind = ELFNoneKind;
|
2015-10-07 17:13:03 +08:00
|
|
|
uint16_t EMachine = llvm::ELF::EM_NONE;
|
2015-07-25 05:03:07 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
extern Configuration *Config;
|
|
|
|
|
|
|
|
} // namespace elf2
|
|
|
|
} // namespace lld
|
|
|
|
|
|
|
|
#endif
|