This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Don't add DT_DEBUG to MIPS shared libraries
- From: Thiemo Seufer <ths at networkno dot de>
- To: Sergey Rogozhkin <rogozhkin at niisi dot msk dot ru>, binutils at sourceware dot org, richard at codesourcery dot com
- Date: Thu, 12 Apr 2007 19:11:17 +0100
- Subject: Re: Don't add DT_DEBUG to MIPS shared libraries
- References: <87wt6wlnmn.fsf@talisman.home> <460BC345.2050207@niisi.msk.ru> <87veg1txbh.fsf@firetop.home>
Richard Sandiford wrote:
> Sergey Rogozhkin <rogozhkin@niisi.msk.ru> writes:
> >> best to just be consistent with other targets. This patch therefore
> >> removes DT_DEBUG tags from shared libraries and makes sure that the
> >> PIEs do indeed get DT_DEBUG and DT_MIPS_RLD_MAP tags.
> >
> > It seems this patch broke PIE startup on linux-mips. bfd/elfxx-mips.c
> > code creates DT_MIPS_RLD_MAP entry for pie but doesn't set its value
> > (leave it equal to 0). On pie startup, dynamic linker tries to save
> > debug structure address to the place pointed by DT_MIPS_RLD_MAP tag
> > value. So now it doesn't work even if pie load address is equal to its
> > link address. Maybe I miss something or my configuration is wrong?
> > I use glibc-2.3.6 and binutils-2.17.50.0.12.
>
> Sorry for the breakage, and for the long time it has taken me to reply.
>
> All the other .rld_map code is indeed guarded with !info->shared rather
> than info->executable, and I don't really have time to look at whether
> that should change or not. I don't use PIEs myself, but it sounds
> like you do, and that they worked OK before the patch. I'd therefore
> like to restore the original !info->shared check for the RTLD_MAP code
> while keeping the new info->executable check for the DT_DEBUG code.
>
> Tested on mips64-linux-gnu. OK to install?
>
> Richard
>
>
> bfd/
> * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Don't add
> DT_MIPS_RTLD_MAP for PIEs.
Ok.
Thiemo