rjmccall added a comment.

The solution described in that comment is not acceptable.  We are not going to 
tell users that they cannot assign symbols explicitly to sections because LLVM 
is unable to promise not to miscompile if they do.  It is LLVM's responsibility 
to correctly compile valid code; enabling mergeability for a section containing 
`unnamed_addr` symbols is an optimization, and if it is not safe, it needs to 
be disabled until we can figure out a way to make it safe.

I laid out a series of three options before:

- Emit different object-file sections for different mergeability settings.
- Only mark an object-file section as mergeable if all the symbols in it would 
have the same mergeability settings.
- Stop implicitly using mergeability for "ordinary" sections (i.e. sections 
other than the string section).

Did you investigate these?


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

https://reviews.llvm.org/D68101



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to