[PATCH] D55878: [Driver] Use --hash-style=gnu instead of both on FreeBSD

Simon Atanasyan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 18 23:43:29 PST 2018


atanasyan added inline comments.


================
Comment at: lib/Driver/ToolChains/FreeBSD.cpp:160
+    if (ToolChain.getTriple().getOSMajorVersion() >= 9)
+      CmdArgs.push_back("--hash-style=gnu");
     CmdArgs.push_back("--enable-new-dtags");
----------------
MaskRay wrote:
> I can't find rationale behind the MIPS discrepancy in the original commit. I can add the if branch back if you tell me why...
> I can't find rationale behind the MIPS discrepancy in the original commit. I can add the if branch back if you tell me why...

Did you check that linker on MIPS FreeBSD really support --hash-style=gnu?

As far as I know ".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".


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55878/new/

https://reviews.llvm.org/D55878





More information about the cfe-commits mailing list