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: PR ld/4424: Can't link in Linux object files on FreeBSD


On Tue, Oct 16, 2007 at 04:29:45PM -0700, H.J. Lu wrote:
> On Wed, Oct 17, 2007 at 08:51:11AM +0930, Alan Modra wrote:
> > On Tue, Oct 16, 2007 at 10:55:54AM -0700, H.J. Lu wrote:
> > > @@ -1053,6 +1053,10 @@ struct elf_backend_data
> > >    /* Return TRUE if type is a function symbol type.  */
> > >    bfd_boolean (*is_function_type) (unsigned int type);
> > >  
> > > +  /* Used by alpha, sparc, i386 and x86-64 linkers to link again object
> > > +     files with different EI_OSABI.  PR 4424.  */
> > > +  struct elf_backend_data *relocs_compatible;
> > > +
> > 
> > This is only slightly better than a flag.  Please make this a pointer
> > to the predicate function.  If it's a function, a backend can make
> > arbitrary decisions about object file compatibility.
> > 
> 
> I will add a pointer to the predicate function. But this field is
> still needed to compare 2 backends.

No it isn't.  You can have a generic ELF function that only allows
matching targets, and another function that looks similar to your
bfd_elf_relocs_compatible but tests for matching arch and matching
relocs_compatible function pointer.

-- 
Alan Modra
Australia Development Lab, IBM


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