[cfe-commits] [patch] --hash-style linker option for Mips targets

Atanasyan, Simon satanasyan at mips.com
Thu Dec 8 02:14:41 PST 2011


Clang driver passes --hash-style=gnu / --hash-style=both options to the linker when the driver runs on some Linux distributions. If a target architecture is Mips, the linker shows the following error:

mips-linux-gnu-ld: .gnu.hash is incompatible with the MIPS ABI

That is 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. Here is the patch to fix this problem.

--
Simon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hash_style.clang-trunk.patch
Type: text/x-patch
Size: 1645 bytes
Desc: hash_style.clang-trunk.patch
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20111208/da1d400a/attachment.bin>


More information about the cfe-commits mailing list