<div dir="ltr">ping<div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 25, 2015 at 7:33 PM, Akira Hatanaka <span dir="ltr"><<a href="mailto:ahatanak@gmail.com" target="_blank">ahatanak@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">ahatanak created this revision.<br>
ahatanak added a subscriber: llvm-commits.<br>
<br>
Some background on why we don't have to use *coal* sections anymore:<br>
Long ago when C++ was new and "weak" had not been standardized, an attempt was made in cctools to support C++ inlines that can be coalesced by putting them into their own section (__TEXT/__textcoal_nt instead of __TEXT/__text).<br>
<br>
The current macho linker supports the weak-def bit on any symbol to allow it to be coalesced, but the compiler still puts weak-def functions/data into alternate section names, which the linker must map back to the base section name.<br>
<br>
<br>
This patch makes changes that are necessary to prevent the compiler and asssembler from using the "coal" sections and have them use the base sections instead when the target architecture is not powerpc:<br>
<br>
__TEXT/__textcoal_nt   instead use  __TEXT/__text<br>
__TEXT/__const_coal    instead use  __TEXT/__const<br>
__DATA/__datacoal_nt   instead use  __DATA/__data<br>
<br>
If the target is powerpc, we continue to use the *coal* sections since anyone targeting powerpc is probably using an old linker that doesn't have support for the weak-def bits.<br>
<br>
<a href="http://reviews.llvm.org/D13188" rel="noreferrer" target="_blank">http://reviews.llvm.org/D13188</a><br>
<br>
Files:<br>
  include/llvm/MC/MCContext.h<br>
  lib/MC/MCContext.cpp<br>
  lib/MC/MCObjectFileInfo.cpp<br>
  test/CodeGen/PowerPC/coal-sections.ll<br>
  test/CodeGen/X86/coal-sections.ll<br>
  test/CodeGen/X86/global-sections.ll<br>
  test/MC/MachO/coal-sections-powerpc.s<br>
  test/MC/MachO/coal-sections-x86_64.s<br>
  test/MC/MachO/weakdef.s<br>
<br>
</blockquote></div><br></div></div>