svn commit: r255983 - head/libexec/rtld-elf
Konstantin Belousov
kostikbel at gmail.com
Wed Oct 2 05:30:01 UTC 2013
On Wed, Oct 02, 2013 at 02:32:59AM +0000, Ed Maste wrote:
> Author: emaste
> Date: Wed Oct 2 02:32:58 2013
> New Revision: 255983
> URL: http://svnweb.freebsd.org/changeset/base/255983
>
> Log:
> Populate .rld_map on MIPS for debuggers
>
> On MIPS the .dynamic section is read-only, so the pointer to rtld
> information for debuggers cannot be stored there (in DT_DEBUG).
> Instead, a special section .rld_map is used.
>
> Sponsored by: DARPA, AFRL
> Approved by: re (delphij)
>
> Modified:
> head/libexec/rtld-elf/rtld.c
>
> Modified: head/libexec/rtld-elf/rtld.c
> ==============================================================================
> --- head/libexec/rtld-elf/rtld.c Wed Oct 2 00:50:27 2013 (r255982)
> +++ head/libexec/rtld-elf/rtld.c Wed Oct 2 02:32:58 2013 (r255983)
> @@ -1111,11 +1111,7 @@ digest_dynamic1(Obj_Entry *obj, int earl
> break;
>
> case DT_MIPS_RLD_MAP:
> -#ifdef notyet
> - if (!early)
> - dbg("Filling in DT_DEBUG entry");
> - ((Elf_Dyn*)dynp)->d_un.d_ptr = (Elf_Addr) &r_debug;
> -#endif
> + *((Elf_Addr *)(dynp->d_un.d_ptr)) = (Elf_Addr) &r_debug;
> break;
> #endif
>
Could the DT_DEBUG and DT_MIPS_RLD_MAP cases be collapsed some more, e.g. by
putting only the 'case <something>:' lines under ifdef ?
Also, you removed the if (!early) test. Is rtld relocated enough in
the init_rtld() for this assignment to work correctly ?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-src-head/attachments/20131002/f034c148/attachment.sig>
More information about the svn-src-head
mailing list