diff options
author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2012-01-13 09:30:38 +0000 |
---|---|---|
committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2012-01-13 09:30:38 +0000 |
commit | 2ca1aa5a44aae6a546b23f07988a6282cd103f48 (patch) | |
tree | 764da149f659571989a6f841622015f17f43f39b | |
parent | e52d86a740eb3dd6600ad57afd77bdefb24dcbd3 (diff) | |
download | bcm5719-llvm-2ca1aa5a44aae6a546b23f07988a6282cd103f48.tar.gz bcm5719-llvm-2ca1aa5a44aae6a546b23f07988a6282cd103f48.zip |
Remove --hash-style from link command on Android.
Gnu hash is not supported by the Android loader.
llvm-svn: 148113
-rw-r--r-- | clang/lib/Driver/ToolChains.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/Driver/ToolChains.cpp b/clang/lib/Driver/ToolChains.cpp index 3dcdf13f00b..0ae91a8d7e4 100644 --- a/clang/lib/Driver/ToolChains.cpp +++ b/clang/lib/Driver/ToolChains.cpp @@ -1918,11 +1918,14 @@ Linux::Linux(const HostInfo &Host, const llvm::Triple &Triple) Arch == llvm::Triple::mips64 || Arch == llvm::Triple::mips64el; + const bool IsAndroid = Triple.getEnvironment() == llvm::Triple::ANDROIDEABI; + // Do not use 'gnu' hash style for Mips targets because .gnu.hash // and the MIPS ABI require .dynsym to be sorted in different ways. // .gnu.hash needs symbols to be grouped by hash code whereas the MIPS // ABI requires a mapping between the GOT and the symbol table. - if (!IsMips) { + // Android loader does not support .gnu.hash. + if (!IsMips && !IsAndroid) { if (IsRedhat(Distro) || IsOpenSuse(Distro) || Distro == UbuntuMaverick || Distro == UbuntuNatty || Distro == UbuntuOneiric) ExtraOpts.push_back("--hash-style=gnu"); |