diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-05-29 16:26:20 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-05-29 16:26:20 +0000 | 
| commit | bef2946c219dc621608bcc9e47f8b973e5ef5c70 (patch) | |
| tree | 1e4dfae199fc27167ed7496693938fec2dab65c2 /ELF/Driver.cpp | |
| parent | c53addf38e24e4dafe992aafb3ae928bfa8fdb0a (diff) | |
Notes
Diffstat (limited to 'ELF/Driver.cpp')
| -rw-r--r-- | ELF/Driver.cpp | 9 | 
1 files changed, 7 insertions, 2 deletions
diff --git a/ELF/Driver.cpp b/ELF/Driver.cpp index 737c6a6bf114..325404447b24 100644 --- a/ELF/Driver.cpp +++ b/ELF/Driver.cpp @@ -572,10 +572,14 @@ static std::pair<bool, bool> getHashStyle(opt::InputArgList &Args) {  // -build-id=sha1 are actually tree hashes for performance reasons.  static std::pair<BuildIdKind, std::vector<uint8_t>>  getBuildId(opt::InputArgList &Args) { -  if (Args.hasArg(OPT_build_id)) +  auto *Arg = Args.getLastArg(OPT_build_id, OPT_build_id_eq); +  if (!Arg) +    return {BuildIdKind::None, {}}; + +  if (Arg->getOption().getID() == OPT_build_id)      return {BuildIdKind::Fast, {}}; -  StringRef S = getString(Args, OPT_build_id_eq, "none"); +  StringRef S = Arg->getValue();    if (S == "md5")      return {BuildIdKind::Md5, {}};    if (S == "sha1" || S == "tree") @@ -688,6 +692,7 @@ void LinkerDriver::readConfigs(opt::InputArgList &Args) {    Config->ZNow = hasZOption(Args, "now");    Config->ZOrigin = hasZOption(Args, "origin");    Config->ZRelro = !hasZOption(Args, "norelro"); +  Config->ZRodynamic = hasZOption(Args, "rodynamic");    Config->ZStackSize = getZOptionValue(Args, "stack-size", 0);    Config->ZText = !hasZOption(Args, "notext");    Config->ZWxneeded = hasZOption(Args, "wxneeded");  | 
