Debian Patches

Status for patchelf/0.12-1

Patch Description Author Forwarded Bugs Origin Last update
Adjust-DT_MIPS_RLD_MAP_REL-dynamic-section-entry-if-prese.patch Adjust DT_MIPS_RLD_MAP_REL dynamic section entry if present
`patchelf --set-rpath` corrupted executables on mips32el: the dynamic
liker crushed with Segmentation fault when loading any executable with
RPATH added that way.

The problem was around the MIPS-specific mechanism of setting up the
debug map pointer. When DT_MIPS_RLD_MAP_REL entry in the dynamic section
is not zero, it holds the relative address of __RLD_MAP -- an offset
relative to this dynamic section entry. Dynamic linker puts the
pointer to the `r_debug` structure there.

When patchelf updates the executable RPATH, it moves the .dynamic
section both in the binary and in memory, while __RLD_MAP is not moved
in memory, since it belongs to special .rld_map section that has type
PROGBITS. So, the offset stored in DT_MIPS_RLD_MAP_REL entry is not
valid anymore and should be updated.

This commit adds the necessary update.

Here we also import DT_MIPS_RLD_MAP_REL definition in elf.h form
glibc commit a2057c984e4314c3740f04cf54e36c824e4c8f32.


DT_MIPS_RLD_MAP_REL
"Ivan A. Melnikov" <iv@altlinux.org> no 2019-08-22
Adjust-PT_MIPS_ABIFLAGS-segment-if-present.patch Adjust PT_MIPS_ABIFLAGS segment if present
When loading the executable on MIPS, the dynamic loader looks for MIPS
ABI flags using PT_MIPS_ABIFLAGS header. The flags themselves are stored
in the .MIPS.abiflags section, so the header must be updated when the
section is moved.

Here we also import PT_MIPS_ABIFLAGS definition from glibc commit
0bd956720c457ff054325b48f26ac7c91cb060e8.
"Ivan A. Melnikov" <iv@altlinux.org> no 2019-08-22

All known versions for source package 'patchelf'

Links