Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 03 Dec 2014 10:06:41 -0500
From:      John Baldwin <jhb@freebsd.org>
To:        src-committers@freebsd.org
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org
Subject:   Re: svn commit: r275412 - head/libexec/rtld-elf
Message-ID:  <4619679.qqfhhZFLG8@ralph.baldwin.cx>
In-Reply-To: <201412021622.sB2GM9j4008534@svn.freebsd.org>
References:  <201412021622.sB2GM9j4008534@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4619679.qqfhhZFLG8>