Unfortunately there are still ugly text-relocation binaries in the wild.
authorderaadt <deraadt@openbsd.org>
Thu, 27 Oct 2022 22:48:17 +0000 (22:48 +0000)
committerderaadt <deraadt@openbsd.org>
Thu, 27 Oct 2022 22:48:17 +0000 (22:48 +0000)
commit414b58f502531453c1de62424edde00c1622ad83
tree1d407ab53ce1de61b9b3d7d51eed480d42e98f66
parentdf24df891d8364006ae0b482d00ca0cf0a217f6e
Unfortunately there are still ugly text-relocation binaries in the wild.
Libraries are less of a concern, because ld.so can fix them in the right
order.  So we must scan DYNAMIC for the TEXTREL marker, and not make
X LOADs immutable.  ld.so will apply changes to the text segment.  In
upcoming diff, crt0 and ld.so will then apply immutability.
ok kettenis
sys/kern/exec_elf.c
sys/sys/exec.h