<div dir="ltr">Can we simply drop it? I'm wondering if other libc's or dynamic linkers use it.</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 6, 2016 at 11:20 AM, Rafael Espíndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I see that musl just does<br>
<br>
lea _DYNAMIC(%rip),%rsi<br>
<br>
to find its own _DYNAMIC.<br>
<br>
I wonder if we can just drop the magical first entries.<br>
<br>
Cheers,<br>
Rafael<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
On 6 May 2016 at 14:12, Rafael Espíndola <<a href="mailto:rafael.espindola@gmail.com">rafael.espindola@gmail.com</a>> wrote:<br>
> Remind me again how the first entry works. From the ABI it looks like<br>
> .got has to have the first entry be the value of _DYNAMIC and the<br>
> dynamic linker can use that.<br>
><br>
> But, it looks like it is actually .got.plt that has that. Also, if the<br>
> dynamic linker can find the .got, it can find the .dynamic section,<br>
> no?<br>
><br>
> On 6 May 2016 at 13:09, George Rimar <<a href="mailto:grimar@accesssoftek.com">grimar@accesssoftek.com</a>> wrote:<br>
>> grimar created this revision.<br>
>> grimar added reviewers: ruiu, rafael.<br>
>> grimar added subscribers: grimar, llvm-commits.<br>
>> Herald added a subscriber: joker.eph.<br>
>><br>
>> First entries of got.plt can be protected using RelRo technique,<br>
>> this patch implements this by shifting got.plt to the memory page,<br>
>> where relro is active.<br>
>><br>
>> Both gold and bfd do that and it should be good for security.<br>
>><br>
>> <a href="http://reviews.llvm.org/D20024" rel="noreferrer" target="_blank">http://reviews.llvm.org/D20024</a><br>
>><br>
>> Files:<br>
>>   ELF/OutputSections.h<br>
>>   ELF/Writer.cpp<br>
>>   test/ELF/aarch64-condb-reloc.s<br>
>>   test/ELF/aarch64-gnu-ifunc.s<br>
>>   test/ELF/aarch64-tstbr14-reloc.s<br>
>>   test/ELF/copy-rel-pie.s<br>
>>   test/ELF/dynamic-reloc-index.s<br>
>>   test/ELF/dynamic-reloc.s<br>
>>   test/ELF/gnu-ifunc-i386.s<br>
>>   test/ELF/gnu-ifunc.s<br>
>>   test/ELF/lto/undefined-puts.ll<br>
>>   test/ELF/mips-26.s<br>
>>   test/ELF/plt-aarch64.s<br>
>>   test/ELF/plt-i686.s<br>
>>   test/ELF/plt.s<br>
>>   test/ELF/relocation.s<br>
>>   test/ELF/relro.s<br>
>>   test/ELF/undef-with-plt-addr.s<br>
>><br>
</div></div></blockquote></div><br></div>