[PATCH] D102973: [ELF] Suppress GRP_COMDAT deduplication if the signature symbol is STB_LOCAL

Peter Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 24 02:48:05 PDT 2021


peter.smith added a comment.

I agree with James that the way that the spec is written favour the name of the symbol as the key regardless of whether the symbol is local or not. In particular: "The referenced signature symbol is not restricted. Its containing symbol table section need not be a member of the group, for example."

I'm also sympathetic to the objcopy problem. In our own proprietary tools I can remember disabling a lot of symbol transformations on our equivalent tool to prevent COMDAT semantics from being broken. A particular favourite with STB_LOCAL signature symbols was the transformation to remove all local symbol names as they are not usually significant. Suddenly all the COMDAT groups became the same leading to very strange results. Personally I'd have preferred that ELF had said that COMDAT signature symbols were not allowed to be STB_LOCAL.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102973



More information about the llvm-commits mailing list