<div dir="ltr"><a class="gmail_plusreply" id="plusReplyChip-0" href="mailto:pcc@google.com" tabindex="-1">+Peter Collingbourne</a> <a class="gmail_plusreply" id="plusReplyChip-1" href="mailto:maskray@google.com" tabindex="-1">+Fangrui Song</a> <br><div><br></div><div>I'm also not sure I understand. Perhaps an example? i.e. how does the current system not work here in safe mode?</div><div><br></div><div>-eric</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 22, 2021 at 8:27 PM Zequan Wu via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi all,<div><br></div><div>Background:</div><div>It's been a longstanding difficulty of debugging with ICF. Programmers don't have control over which sections should be folded by ICF, which sections shouldn't. The existing address significant table won't have effect for code sections during all ICF mode in both ld.lld and lld-link. By switching to safe ICF could mark code sections as unique, but at a cost of increasing binary size out of control. So, it would be good if programmers could selectively disable ICF in source code by annotating global functions/variables with an attribute to improve debugging experience and have the control on the binary size increase. </div><div><br></div><div>My plan is to add a new section table(`.no_icf`) to object files. Sections of all symbols inside the table should not be folded by all ICF mode. And symbols can only be added into the table by annotating global functions/variables with a new attribute(`no_icf`) in source code. </div><div><br></div><div>What do you think about this approach?</div><div><br></div><div>Thanks,</div><div>Zequan</div><div><br></div></div>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>