<p dir="ltr"></p>
<p dir="ltr">>> I would like to leave this as a last resort. Putting things that don't<br>
>> take part in symbol resolution into the symbol resolution is confusing<br>
>> IMHO.<br>
><br>
><br>
> I don't think so, as the symbol plays a major role not only in symbol resolution but also in relocation application. It is easier to model that all relocations point to symbols. That is true in ELF so that's a direct modeling of the ELF structure. Let me try to experiment -- we can abandon the idea if it becomes clear that that doesn't worth.</p>
<p dir="ltr">Sure. At this point we should try a few experiments and see what works.<br>
. </p>
<p dir="ltr">><br>
>> > My bar for readability may be a little bit high, but I strongly believe that<br>
>> > that will eventually increase overall productivity. I really need help from<br>
>> > LLD developers to keep it readable and hackable. I'd greatly appreciate any<br>
>> > patch to reduce complexity. Thanks!<br>
>><br>
>> Thanks a lot for the work at making lld easier to understand.<br>
>><br>
>> I was away from coding and catching up on code review, but I agree<br>
>> that this is important and will try to improve things a bit in here<br>
>> before going back to code review (and then LTO).<br>
>><br>
>> What I will probably try first is reordering output so that we don't<br>
>> need to compute the size upfront. That should give us quite a bit of<br>
>> flexibility in refactoring anything else. I don't know if it will be<br>
>> too costly, but I will report on anything I find.<br>
><br>
><br>
> I don't know if computing the size upfront increased complexity. Was it?</p>
<p dir="ltr">It is. That is what requires that in two points in the code we come up the same answer as to whether a relocation is optimized for example.</p>
<p dir="ltr">If we didn't need to know that we could centralize the knowledge: write, regular sections, relocate, write dynamic relocations.</p>
<p dir="ltr">Changing it is an experiment both in complexity and performance, but I should hopefully have a proof of concept tomorrow.</p>
<p dir="ltr">Cheers,<br>
Rafael</p>