From 2ca1aa5a44aae6a546b23f07988a6282cd103f48 Mon Sep 17 00:00:00 2001 From: Evgeniy Stepanov Date: Fri, 13 Jan 2012 09:30:38 +0000 Subject: Remove --hash-style from link command on Android. Gnu hash is not supported by the Android loader. llvm-svn: 148113 --- clang/lib/Driver/ToolChains.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'clang/lib/Driver/ToolChains.cpp') 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"); -- cgit v1.2.3