<div dir="ltr"><div dir="ltr">On Thu, Mar 21, 2019 at 9:20 PM Eric Christopher via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">echristo added a comment.<br>
<br>
Oh, and as far as dwarf aware linking I'd arguably prefer a separate tool ala dsymutil or dwz rather than incorporating it into the linker. I do agree that such a tool is incredibly useful and should be part of our ongoing development plan around debug info.<br>
<br></blockquote><div><br></div><div>dwz looks great. I was unaware that it existed. Thanks!</div><div><br></div><div>Is GNU compatibility an issue? I did some research on this a while ago:</div><div><br></div><div><pre class="gmail-bz_comment_text" id="gmail-comment_text_8" style="font-size:medium;white-space:pre-wrap;width:60em;color:rgb(0,0,0)">GOLD:
Stripping (gc-sections):
.debug_info   - patch low pc to 0
.debug_ranges - patch low address to 0 and high address to "size of function + 1".

Deduplication (icf):
.debug_info   - patch low pc to the address of the chosen function
.debug_ranges - patch the start and end addresses to the start and end addresses of the chosen
function 

COMDATs:
.debug_info   - patch low pc to 0
.debug_ranges - patch the start and end addresses to the start and end addresses of the chosen
function 

GNU LD:
Stripping (gc-sections):
.debug_info   - patch low pc to 0
.debug_ranges - patch the low and high address to 1 to make a size 0 range.

Deduplication (icf):
.debug_info   - N/A
.debug_ranges - N/A

COMDATs:
.debug_info   - patch low pc to 0
.debug_ranges - patch the start and end addresses to the start and end addresses of the chosen
function</pre></div><div> What does GDB make of -1/-2???</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
CHANGES SINCE LAST ACTION<br>
  <a href="https://reviews.llvm.org/D59553/new/" rel="noreferrer" target="_blank">https://reviews.llvm.org/D59553/new/</a><br>
<br>
<a href="https://reviews.llvm.org/D59553" rel="noreferrer" target="_blank">https://reviews.llvm.org/D59553</a><br>
<br>
<br>
<br>
</blockquote></div></div>