<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Fri, Sep 8, 2017 at 3:52 PM Rui Ueyama via Phabricator via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">ruiu added a comment.<br>
<br>
> What is intention of relocatable link and why it is called "partial linking" ? As far I understand intention is to speedup final link.<br>
> When we have multiple .text sections for example, then relocatable link merge them by name to output .text. Merging of sections helps to reduce amount of<br>
>  input sections for latter final link. We also merge SHT_REL[A] sections when doing that, it should probably help to speedup futher relocation processing as well.<br>
>  As a last resort is also consistent with GNU linkers, it may be dangerous to deviate without solid reason as all kind of tools may rely on this behavior.<br>
<br>
I don't agree. As we have found when you tried to implement the -r option, a lot of information that can be merged are passed through instead of being merged for a relocatable link. If sections have to be merged for some reason, that is fine, but both "-r is for speeding up the linking" and "doing something different than GNU linkers is dangerous" are not convincing arguments.<br></blockquote><div><br>FWIW, I think that's the point of -r: to merge the sections that can be merged. I've certainly used this to construct interesting debug info test cases (merging two objects together to get non-zero debug_info offsets and the like).<br><br>If -r didn't do that (instead keeping all the sections separate, having multiple (non-comdat differentiated) .text sections, etc), I'd be a bit surprised/confused.<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
<a href="https://reviews.llvm.org/D37574" rel="noreferrer" target="_blank">https://reviews.llvm.org/D37574</a><br>
<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div></div>