This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Don't add DT_DEBUG to MIPS shared libraries


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]