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 Mon, Oct 15, 2007 at 06:15:08PM -0700, H.J. Lu wrote:
> On Tue, Oct 16, 2007 at 09:40:49AM +0930, Alan Modra wrote:
> > On Mon, Oct 15, 2007 at 10:12:40AM -0700, H.J. Lu wrote:
> > > +  obed = xvec_get_elf_backend_data (htab->root.creator);
> > >    if (! dynamic
> > >        && is_elf_hash_table (htab)
> > > -      && htab->root.creator == abfd->xvec
> > > +      && (htab->root.creator == abfd->xvec
> > > +	  || ((obed->arch == bed->arch)
> > > +	      && obed->always_check_relocs_in_object_file
> > > +	      && bed->always_check_relocs_in_object_file))
> > 
> > Instead of adding always_check_relocs_in_object_file, I'd suggest
> > adding a predicate function, dynamic_relocs_compatible.  The default
> > ELF version would be:
> > 
> > _bfd_elf_dynamic_relocs_compatible (const bfd_target *otarg,
> > 				    const bfd_target *itarg)
> > {
> >   return otarg == itarg;
> > }
> > 
> > The x86 version could check that ibed->dynamic_relocs_compatible
> > == obed->dynamic_relocs_compatible.
> > 
> 
> It has nothing to do with dynamic relocations.

Well, it does in the sense that check_relocs is called to determine
the size of got, plt and other dynamic sections.

> This check only
> applies to relocations in relocatable object files. How about
> 
> _bfd_elf_relocs_compatible
> relocs_compatible

Fine.

-- 
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]