[PATCH] D56516: [SanitizerCoverage] Don't create comdat for weak functions.

ben via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 10 03:54:52 PST 2019


bd1976llvm added a comment.

In D56516#1351953 <https://reviews.llvm.org/D56516#1351953>, @pcc wrote:

> Can you create a minimal reproducer?
>
> If objcopy is complaining about sh_link = 0 I suspect that there's some issue where a global referenced via `!associated` is being dropped.


I wonder if it is the same problem as here: https://reviews.llvm.org/D53234 which is a case of the global referenced via `!associated` is being dropped.

Having said that there is definitely a bug in compiler here at least for ELF. In ELF given the duplication behavior specified for GRP_COMDAT, each set of duplicate COMDATs has an "api" made up of the globals that are part of the COMDATs in that set and are referenced from anywhere in the program outside of that COMDAT set. Each instance of a COMDAT group must have this "api" in common, otherwise the program might fail to link, or have arbitrarily different run-time behavior (depending on which COMDAT is selected).


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

https://reviews.llvm.org/D56516





More information about the llvm-commits mailing list