<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Oct 2, 2017 at 4:15 PM, Rafael Avila de Espindola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I don't think there is much value in being different from the gnu<br>
linkers in here since the common case is to have the compiler driver<br>
pass an explicit option.<br>
<br>
So +1 to changing the default to "both".<br></blockquote><div><br></div><div>... except for MIPS, as the way how we need to sort .gnu.hash section contents is not compatible with a MIPS ABI requirement.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Cheers,<br>
Rafael<br>
<div class="m_-5807933246635257305HOEnZb"><div class="m_-5807933246635257305h5"><br>
George Rimar <<a href="mailto:grimar@accesssoftek.com" target="_blank">grimar@accesssoftek.com</a>> writes:<br>
<br>
> Hi !<br>
><br>
> During linking LLD and other linkers builds a static hash table for dynamic symbols,<br>
> so that in runtime dynamic linker can use this table and find symbols faster.<br>
><br>
> --hash-style=style linker option is used to select the hash type:<br>
> "Set the type of linker's hash table(s). style can be either "sysv" for classic ELF ".hash" section,<br>
> "gnu" for new style GNU ".gnu.hash" section or "both" for both the classic ELF ".hash" and new<br>
> style GNU ".gnu.hash" hash tables. The default is "sysv"."<br>
><br>
> GNU_HASH format is a better version of hash table (<a href="https://sourceware.org/ml/binutils/2006-10/msg00377.html" rel="noreferrer" target="_blank">https://sourceware.org/ml/bin<wbr>utils/2006-10/msg00377.html</a>).<br>
><br>
> We have --hash-style=sysv currently set by default in LLD.<br>
> Though recently (see <a href="https://bugs.llvm.org//show_bug.cgi?id=34712" rel="noreferrer" target="_blank">https://bugs.llvm.org//show_bu<wbr>g.cgi?id=34712</a>) GNU linkers switched to use<br>
> ".gnu.hash" section format in addition to normally used classic ".hash".<br>
> So they defaults --hash-style to "both" and this looks to be released with binutils 2.30.<br>
><br>
> I think we can switch LLD either to "both" or probably to "gnu" by default as well.<br>
> Initial version of patch that changes default to "both" is here: D38407<br>
><br>
> Any thoughts ?<br>
><br>
> Best regards,<br>
> George | Developer | Access Softek, Inc<br>
</div></div></blockquote></div><br></div></div>