<html><head></head><body>I somewhat like it that we use relocations. In particular, we should not make 1 a special case. When using elf_rel we use relocations to write the addend for example. <br>
<br>
Having the decision in one place about all the relocations that we need seems a good thing.<br>
<br>
Cheers,<br>
Rafael<br><br><div class="gmail_quote">On April 5, 2017 7:32:02 PM EDT, Rui Ueyama via Phabricator <reviews@reviews.llvm.org> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">ruiu added a comment.<br /><br />Currently, we add a relocation to a GOT section to set a GOT slot for a TLS variable to 1. But that is an intricate way of setting it to 1, because when we add a relocation, we already have a reference to GOT. We should be able to directly set it to 1, instead of doing it indirectly using relocate().<br /><br />What I was trying to do is to separate the GOT class into two classes -- one for the regular GOT and the other is for TLS variables. TLS variables use GOT slots very differently than regular variables, I think that will reduce complexity. (But doing that isn't easy as I don't understand some parts of MIPS/AArch64 TLS variables ABIs.)<br /><br /><br /><a href="https://reviews.llvm.org/D31672">https://reviews.llvm.org/D31672</a><br /><br /><br /><br /></pre></blockquote></div><br>
-- <br>
Sent from my Android device with K-9 Mail. Please excuse my brevity.</body></html>