[llvm-dev] [lld][ELF] Add option to make .dynamic read only
Rui Ueyama via llvm-dev
llvm-dev at lists.llvm.org
Tue May 23 16:27:01 PDT 2017
On Tue, May 23, 2017 at 4:17 PM, Petr Hosek <phosek at chromium.org> wrote:
> On Tue, May 23, 2017 at 3:19 PM Rafael Avila de Espindola <
> rafael.espindola at gmail.com> wrote:
>
>> Petr Hosek via llvm-dev <llvm-dev at lists.llvm.org> writes:
>> > One of the design principles we're trying to follow is to make
>> everything
>> > read-only, unless it has be writable. The only reason for .dynamic to be
>> > writable is DT_DEBUG which is something we never intend to support.
>> FWIW in
>> > Fuchsia all we need is a read-only .dynamic without emitting DT_DEBUG
>> > altogether, but we wanted to make sure that this flag is also usable
>> > elsewhere hence implementing DT_DEBUG_INDIRECT which is already
>> supported
>> > by musl as Jake pointed out.
>>
>> It might be easier to have an option for making .dynamic be read only
>> and the logic for emitting DT_DEBUG becomes ".dynamic is rw or mips".
>>
>> BTW, dynamic linkers really never relocate the .d_ptr entries?
>>
>
> musl's dynamic linker doesn't and neither ours. Older versions of glibc's
> dynamic linker do, but I'm not sure about the newer ones.
>
>
>> What are you guys using instead of DT_DEBUG?
>>
>
> We use other OS-specific runtime means to register that address.
>
Do the OS-specific means make sense for other OSes?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170523/d4d95a2b/attachment.html>
More information about the llvm-dev
mailing list