aboutsummaryrefslogtreecommitdiffstats
path: root/ELF/Config.h
diff options
context:
space:
mode:
Diffstat (limited to 'ELF/Config.h')
-rw-r--r--ELF/Config.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/ELF/Config.h b/ELF/Config.h
index ff9d3dc0933c..0c68a8485fa2 100644
--- a/ELF/Config.h
+++ b/ELF/Config.h
@@ -61,6 +61,9 @@ enum class Target2Policy { Abs, Rel, GotRel };
// For tracking ARM Float Argument PCS
enum class ARMVFPArgKind { Default, Base, VFP, ToolChain };
+// For -z noseparate-code, -z separate-code and -z separate-loadable-segments.
+enum class SeparateSegmentKind { None, Code, Loadable };
+
struct SymbolVersion {
llvm::StringRef name;
bool isExternCpp;
@@ -71,8 +74,8 @@ struct SymbolVersion {
// can be found in version script if it is used for link.
struct VersionDefinition {
llvm::StringRef name;
- uint16_t id = 0;
- std::vector<SymbolVersion> globals;
+ uint16_t id;
+ std::vector<SymbolVersion> patterns;
};
// This struct contains the global configuration for the linker.
@@ -117,8 +120,6 @@ struct Configuration {
std::vector<llvm::StringRef> symbolOrderingFile;
std::vector<llvm::StringRef> undefined;
std::vector<SymbolVersion> dynamicList;
- std::vector<SymbolVersion> versionScriptGlobals;
- std::vector<SymbolVersion> versionScriptLocals;
std::vector<uint8_t> buildIdVector;
llvm::MapVector<std::pair<const InputSectionBase *, const InputSectionBase *>,
uint64_t>
@@ -147,6 +148,7 @@ struct Configuration {
bool executeOnly;
bool exportDynamic;
bool fixCortexA53Errata843419;
+ bool fixCortexA8;
bool forceBTI;
bool formatBinary = false;
bool requireCET;
@@ -222,8 +224,8 @@ struct Configuration {
Target2Policy target2;
ARMVFPArgKind armVFPArgs = ARMVFPArgKind::Default;
BuildIdKind buildId = BuildIdKind::None;
+ SeparateSegmentKind zSeparate;
ELFKind ekind = ELFNoneKind;
- uint16_t defaultSymbolVersion = llvm::ELF::VER_NDX_GLOBAL;
uint16_t emachine = llvm::ELF::EM_NONE;
llvm::Optional<uint64_t> imageBase;
uint64_t commonPageSize;
@@ -309,6 +311,12 @@ struct Configuration {
// The only instance of Configuration struct.
extern Configuration *config;
+// The first two elements of versionDefinitions represent VER_NDX_LOCAL and
+// VER_NDX_GLOBAL. This helper returns other elements.
+static inline ArrayRef<VersionDefinition> namedVersionDefs() {
+ return llvm::makeArrayRef(config->versionDefinitions).slice(2);
+}
+
static inline void errorOrWarn(const Twine &msg) {
if (!config->noinhibitExec)
error(msg);