diff options
author | Simon Atanasyan <simon@atanasyan.com> | 2015-04-10 21:00:41 +0000 |
---|---|---|
committer | Simon Atanasyan <simon@atanasyan.com> | 2015-04-10 21:00:41 +0000 |
commit | 720f52a961f995a55d8d369f1db80e56b469e185 (patch) | |
tree | e339a27e7d2301b6729368b185096461f96b5de6 /lld/lib/Driver/GnuLdDriver.cpp | |
parent | 54b1d56c0152e658c138f464ea45ff8e40ff2fbc (diff) | |
download | bcm5719-llvm-720f52a961f995a55d8d369f1db80e56b469e185.tar.gz bcm5719-llvm-720f52a961f995a55d8d369f1db80e56b469e185.zip |
[Mips] Add -pcrel-eh-reloc command line option
This MIPS specific option controls R_MIPS_EH relocation handling.
If -pcrel-eh-reloc is specified R_MIPS_EH relocation should be handled
like R_MIPS_PC32 relocation.
llvm-svn: 234635
Diffstat (limited to 'lld/lib/Driver/GnuLdDriver.cpp')
-rw-r--r-- | lld/lib/Driver/GnuLdDriver.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lld/lib/Driver/GnuLdDriver.cpp b/lld/lib/Driver/GnuLdDriver.cpp index 63548b07ce8..7a1f674ec82 100644 --- a/lld/lib/Driver/GnuLdDriver.cpp +++ b/lld/lib/Driver/GnuLdDriver.cpp @@ -557,6 +557,19 @@ bool GnuLdDriver::parse(int argc, const char *argv[], << "--arm-target1-abs\n"; } + // Process MIPS specific options. + if (triple.getArch() == llvm::Triple::mips || + triple.getArch() == llvm::Triple::mipsel || + triple.getArch() == llvm::Triple::mips64 || + triple.getArch() == llvm::Triple::mips64el) + ctx->setMipsPcRelEhRel(parsedArgs->hasArg(OPT_pcrel_eh_reloc)); + else { + for (const auto *arg : parsedArgs->filtered(OPT_grp_mips_targetopts)) { + diag << "warning: ignoring unsupported MIPS specific argument: " + << arg->getSpelling() << "\n"; + } + } + for (auto *arg : parsedArgs->filtered(OPT_L)) ctx->addSearchPath(arg->getValue()); |