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

Joerg Sonnenberger via llvm-dev llvm-dev at lists.llvm.org
Sat May 20 04:22:14 PDT 2017


On Tue, May 16, 2017 at 11:31:13PM +0000, Jake Ehrlich via llvm-dev wrote:
> The .dynamic section is almost read-only except for the DT_DEBUG entry
> which requires the dynamic linker to modify a word. MIPS has long since had
> a solution to this using the DT_MIPS_RLD_MAP entry to give a pointer to
> another section which is writable. It would be nice to have this
> functionality on other targets as well however.

Can we take a step back please? I think a much better approach would be
to make the whole DT_DEBUG/DT_MIPS_RLD_MAP optional, not moving from the
former hack to the latter hack. Systems that want to support this new
mechanism reserve an AUX vector similar to AT_BASE and let the dynamic
linker fill it in. No space required in the executable that way.

Joerg


More information about the llvm-dev mailing list