[llvm-dev] [lld][ELF] Add option to make .dynamic read only

Rafael Avila de Espindola via llvm-dev llvm-dev at lists.llvm.org
Tue May 23 15:19:07 PDT 2017


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?

What are you guys using instead of DT_DEBUG?

Cheers,
Rafael


More information about the llvm-dev mailing list