diff options
| author | Simon Atanasyan <simon@atanasyan.com> | 2015-09-16 13:36:32 +0000 |
|---|---|---|
| committer | Simon Atanasyan <simon@atanasyan.com> | 2015-09-16 13:36:32 +0000 |
| commit | 92480f9a2048de403cfe01d904774bd8aa139e50 (patch) | |
| tree | ea74f54e8162886b1bcdeb29656b6310cdb2e10f /lld/lib | |
| parent | 49c67236f15f62dd808e61f3f31e6e53fdec50e7 (diff) | |
| download | bcm5719-llvm-92480f9a2048de403cfe01d904774bd8aa139e50.tar.gz bcm5719-llvm-92480f9a2048de403cfe01d904774bd8aa139e50.zip | |
[Mips] Rejects all --hash-style arguments except 'sysv' in case of MIPS target
MIPS ABI supports only --hash-style=sysv variant.
llvm-svn: 247796
Diffstat (limited to 'lld/lib')
| -rw-r--r-- | lld/lib/Driver/GnuLdDriver.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lld/lib/Driver/GnuLdDriver.cpp b/lld/lib/Driver/GnuLdDriver.cpp index b521e8928cd..bdec79b3ac7 100644 --- a/lld/lib/Driver/GnuLdDriver.cpp +++ b/lld/lib/Driver/GnuLdDriver.cpp @@ -540,8 +540,14 @@ bool GnuLdDriver::parse(llvm::ArrayRef<const char *> args, if (triple.getArch() == llvm::Triple::mips || triple.getArch() == llvm::Triple::mipsel || triple.getArch() == llvm::Triple::mips64 || - triple.getArch() == llvm::Triple::mips64el) + triple.getArch() == llvm::Triple::mips64el) { ctx->setMipsPcRelEhRel(parsedArgs.hasArg(OPT_pcrel_eh_reloc)); + auto *hashArg = parsedArgs.getLastArg(OPT_hash_style); + if (hashArg && hashArg->getValue() != StringRef("sysv")) { + diag << "error: .gnu.hash is incompatible with the MIPS ABI\n"; + return false; + } + } else { for (const auto *arg : parsedArgs.filtered(OPT_grp_mips_targetopts)) { diag << "warning: ignoring unsupported MIPS specific argument: " |

