[PATCH] D14129: ELF2: Make .gnu.hash default instead of .hash.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 28 09:28:07 PDT 2015


On Wed, Oct 28, 2015 at 9:12 AM, Simon Atanasyan <simon at atanasyan.com>
wrote:

> Hi,
>
> On Wed, Oct 28, 2015 at 6:52 PM, Rui Ueyama via llvm-commits
> <llvm-commits at lists.llvm.org> wrote:
> > That's why I didn't submit this patch right away. Do MIPS compilers pass
> > --hash-style=sysv to the linker?
>
> AFAIK no, it does not. Because sysv is enabled for MIPS by default.
>
> > Also, why don't they support the GNU-style hash table?
>
> https://www.sourceware.org/ml/binutils/2006-07/msg00341.html
> [[
> .gnu.hash wants .dynsym to be sorted in such a way that symbols with the
> same
> hash value are grouped together, whereas with the MIPS ABI, symbols that
> don't
> have GOT entries must come before symbols that do.  The .dynsym entries for
> the latter group must also have the same order as the corresponding GOT
> entries.
> ]]
>

Sigh. That's very unfortunate that .gnu.hash is designed in such a way that
that cannot live with the MIPS ABI. Maybe I should abandon this patch. My
ultimate goal with this patch was to make .gnu.hash default everywhere and
stop the compiler to pass --hash-style to the linker, but until MIPS has a
solution to the incompatibility issue, that's not doable.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151028/4f48fe90/attachment.html>


More information about the llvm-commits mailing list