This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH, MIPS] Support shared library debug with MIPS PIE (glibc)
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Matthew Fortune <Matthew dot Fortune at imgtec dot com>
- Cc: "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>
- Date: Tue, 23 Jun 2015 15:14:06 +0000
- Subject: Re: [PATCH, MIPS] Support shared library debug with MIPS PIE (glibc)
- Authentication-results: sourceware.org; auth=none
- References: <6D39441BF12EF246A7ABCE6654B0235321175F69 at LEMAIL01 dot le dot imgtec dot org>
On Tue, 23 Jun 2015, Matthew Fortune wrote:
> -/* If there is a DT_MIPS_RLD_MAP entry in the dynamic section, fill it in
> - with the run-time address of the r_debug structure */
> +/* If there is a DT_MIPS_RLD_MAP2 or DT_MIPS_RLD_MAP entry in the dynamic
> + section, fill in the debug map pointer with the run-time address of the
> + r_debug structure. */
> #define ELF_MACHINE_DEBUG_SETUP(l,r) \
> -do { if ((l)->l_info[DT_MIPS (RLD_MAP)]) \
> +do { if ((l)->l_info[DT_MIPS (RLD_MAP2)]) \
> + { \
> + char *ptr = (char *)(l)->l_info[DT_MIPS (RLD_MAP2)]; \
> + ptr += (l)->l_info[DT_MIPS (RLD_MAP2)]->d_un.d_val; \
> + *(ElfW(Addr) *)ptr = (ElfW(Addr)) (r); \
> + } \
> + else if ((l)->l_info[DT_MIPS (RLD_MAP)]) \
What if there are both DT_MIPS_RLD_MAP2 and DT_MIPS_RLD_MAP? Will that
never happen?
--
Joseph S. Myers
joseph@codesourcery.com