]> git.ipfire.org Git - thirdparty/glibc.git/commit
cheri: elf: Use RW permissions for l_ld when needed
authorSzabolcs Nagy <szabolcs.nagy@arm.com>
Fri, 2 Sep 2022 13:07:06 +0000 (14:07 +0100)
committerSzabolcs Nagy <szabolcs.nagy@arm.com>
Thu, 27 Oct 2022 13:46:54 +0000 (14:46 +0100)
commitc3e46aa5d253c23ca3828538127aee15efbabfc0
tree6bf940b8fbc62cb0a6c572d4a80132ca89d74b02
parentddd4011014924bd46d9fce4cc5333bea9d792d41
cheri: elf: Use RW permissions for l_ld when needed

The dynamic section of an executable needs to be written to set the
DT_DEBUG entry for debuggers (unless the target has some other place
to store r_debug). For this reason we make l_ld writable whenever
the dynamic section is writable.

The ld.so l_ld is kept RX, since it does not have DT_DEBUG.
(Note: relocating the dynamic section is not allowed on cheri and
that's the only other reason glibc would write to it.)
elf/dl-load.c
elf/rtld.c