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 | 704e7328a119e6024c9f63b21329bc612098c6dd (patch) | |
tree | ea85d28fecb65f01c667263aa98fb2436de291fa /lib/Driver/ToolChains.cpp | |
parent | eb666737bae8a5af8fb6b485cd15e2e62caa5caf (diff) |
Remove --hash-style from link command on Android.
Gnu hash is not supported by the Android loader.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148113 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/ToolChains.cpp')
-rw-r--r-- | lib/Driver/ToolChains.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp index 3dcdf13f00..0ae91a8d7e 100644 --- a/lib/Driver/ToolChains.cpp +++ b/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"); |