This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Generic object attributes patch
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.
Paul