svn commit: r275412 - head/libexec/rtld-elf

John Baldwin jhb at freebsd.org
Wed Dec 3 16:47:41 UTC 2014


On Tuesday, December 02, 2014 04:22:09 PM John Baldwin wrote:
> Author: jhb
> Date: Tue Dec  2 16:22:08 2014
> New Revision: 275412
> URL: https://svnweb.freebsd.org/changeset/base/275412
> 
> Log:
>   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

This allows gdb (both in-tree and in-ports) to better debug an i386 binary
on amd64.  In particular, you can now start an i386 binary under gdb,
and for devel/gdb from ports you can now debug an i386 core dump.  (The
in-tree gdb is confused by an i386 core dump.)

-- 
John Baldwin


More information about the svn-src-all mailing list