[cfe-commits] r148113 - /cfe/trunk/lib/Driver/ToolChains.cpp
Evgeniy Stepanov
eugeni.stepanov at gmail.com
Fri Jan 13 01:30:38 PST 2012
Author: eugenis
Date: Fri Jan 13 03:30:38 2012
New Revision: 148113
URL: http://llvm.org/viewvc/llvm-project?rev=148113&view=rev
Log:
Remove --hash-style from link command on Android.
Gnu hash is not supported by the Android loader.
Modified:
cfe/trunk/lib/Driver/ToolChains.cpp
Modified: cfe/trunk/lib/Driver/ToolChains.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=148113&r1=148112&r2=148113&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains.cpp Fri Jan 13 03:30:38 2012
@@ -1918,11 +1918,14 @@
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");
More information about the cfe-commits
mailing list