Generic object attributes patch
H. J. Lu
hjl@lucon.org
Wed Jun 27 13:44:00 GMT 2007
On Wed, Jun 27, 2007 at 02:36:40PM +0100, Paul Brook wrote:
> On Wednesday 27 June 2007, H. J. Lu wrote:
> > On Wed, Jun 27, 2007 at 12:30:44PM +0000, Joseph S. Myers wrote:
> > > On Wed, 27 Jun 2007, Daniel Jacobowitz wrote:
> > > > On Tue, Jun 26, 2007 at 07:58:49PM -0700, H. J. Lu wrote:
> > > > > Does it support attributes in DSO? I thought you would need
> > > > > a new program segment type for it.
> > > >
> > > > Why? These are for ld, not ld.so.
> > >
> > > And when we do add some attribute it's of use for ld.so to know about, at
> > > that point we can always either add a new segment for attributes or make
> > > ld use the information in some other way to make it available to ld.so.
> >
> > Object files and shared libraries may have incompatible attributes.
> > Linker should be able to detect and issue a warning/error.
>
> Maybe. You've got to be very careful with this because the shared library you
> link against might have different attributes to the one used at runtime.
>
> For example you may link against a shared library that uses FP coprocessor
> instructions, then replace that with a soft-float library on the real system.
> This linking should not mark the application as using FP instructions.
>
I don't think you should merge attributes between object files and
shared libraries. It is mainly to detect incompatibilities bewteen
object files and shared libraries.
H.J.
More information about the Binutils
mailing list