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: Generic object attributes patch


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.


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