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: [PATCH, MIPS] Support shared library debug with MIPS PIE


Maciej W. Rozycki <macro@linux-mips.org> writes:
> On Tue, 23 Jun 2015, Matthew Fortune wrote:
> 
> > New dynamic tag:
> >
> > DT_MIPS_RLD_MAP2 - 0x70000035
> >
> > Definition:
> >
> > This member is used by debugging.  It contains a relative offset from the tag's
> > runtime location of a 32-bit word in the .data section which is supplied by the
> > compilation environment. The word's contents are not specified and programs
> > using this value are not ABI - compliant.
> >
> > I have considered the suggestion from Roland and Maciej about making this a GNU
> > tag. MIPS needs this feature because of the way the psABI is defined and will
> > therefore need this for any OS which may well then lead to needing more tags.
> > If the tag were in the completely generic range (like DT_DEBUG) then I wouldn't
> > be concerned at all.
> 
>  We've been using GNU extensions (e.g. GNU ELF attributes) for other
> purposes with no concern whatsoever about other OSes.  And they are free
> to adopt them.  So what is your specific concern about DT_GNU_RLD_MAP?

The whole .gnu_attribute feature can be adopted easily by other OSs as it is
unlikely that they have also defined some section called .gnu_attribute for
other purposes. This is different from the dedicated ranges of dynamic tags
for gABI, psABI and OS. There is very little guarantee that the OS tag range
will not overlap between OSs and nor should there be such a guarantee as that
is the purpose of separate ranges.

>  With that in mind and given that this is a generic feature to support PIE
> while keeping the dynamic segment r/o, do you maintain it would better go
> with the ELF gABI rather than as a GNU extension?  I suspect with a good
> justification, that I believe we have here, reserving a dynamic tag number
> with the gABI maintainers shouldn't take a lot of time or effort.

Yes. I'm opposed to using the OS range of dynamic tags. I'd also like to 
see genuine interest and commitment from other architecture maintainers
to add the option of a read-only dynamic segment before looking at a gABI
change though. I think this could just end up as one of the many features
that 'could' be used, but is not.

Matthew

> 
>   Maciej


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