HomeFreeBSD

The runtime linker needs to include a path to itself in the link map

Description

The runtime linker needs to include a path to itself in the link map
it exports to the debugger. It currently has two choices: it can use
a compiled-in path (/libexec/ld-elf.so.1) or it can use the path stored
in the interpreter path in the binary being executed. The runtime linker
currently prefers the second. However, this is usually wrong for compat32
binaries since the binary specifies the path of rtld on a 32-bit system
(/libexec/ld-elf.so.1) instead of the actual path (/libexec/ld-elf32.so.1).
For now, always assume the compiled in path (/libexec/ld-elf32.so.1) as
the rtld path and ignore the path in the binary for the 32-bit runtime
linker.

Differential Revision: https://reviews.freebsd.org/D1236
Reviewed by: kib

Details

Provenance
jhbAuthored on
Differential Revision
D1236: Preserve pathname of ld-elf32.so.1
Parents
rS275411: MFi386: r275305 (by rdivacky)
Branches
Unknown
Tags
Unknown

Event Timeline