This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
RE: [MIPS] Check info->executable to create DT_MIPS_RLD_MAP
- From: Chao-Ying Fu <Chao-Ying dot Fu at imgtec dot com>
- To: 'David Daney' <ddaney dot cavm at gmail dot com>
- Cc: "binutils at sourceware dot org" <binutils at sourceware dot org>, 'Richard Sandiford' <rdsandiford at googlemail dot com>
- Date: Sat, 22 Jun 2013 00:22:47 +0000
- Subject: RE: [MIPS] Check info->executable to create DT_MIPS_RLD_MAP
- References: <81D57523CB07B24881D63DE650C6ED82018D72B7 at BADAG02 dot ba dot imgtec dot org> <51C4ED0A dot 9010401 at gmail dot com>
David Daney wrote:
> > When using "-pie", LD doesn't create the DT_MIPS_RLD_MAP entry,
> > because LD checks "!info->shared" and the "-pie" flag sets
> "info->shared" to true.
> > Note that LD checks "info->executable" to create DT_DEBUG, and
> > creating DT_MIPS_RLD_MAP should be similar to creating DT_DEBUG.
> > Ex:
> > /* SGI object has the equivalence of DT_DEBUG in the
> > DT_MIPS_RLD_MAP entry. This must come first because glibc
> > only fills in DT_MIPS_RLD_MAP (not DT_DEBUG) and
> some tools
> > may only look at the first one they see. */
> > if (!info->shared
> > && !MIPS_ELF_ADD_DYNAMIC_ENTRY (info,
> DT_MIPS_RLD_MAP, 0))
> > return FALSE;
> >
>
> Probably you want info->executable here too.
>
> I have tried simple programs with -pie and they seem to work as is.
> What failures are you seeing? Does the libgcc unwinder use this?
I hit an issue in gdbserver that fails to return a shared-library list,
because gdbserver tries to find the DT_MIPS_RLD_MAP entry from
a program that is built with -pie.
> In any event, you could test changing this.
>
> David Daney
Yes. Thanks!
Regards,
Chao-ying