This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: PR ld/4424: Can't link in Linux object files on FreeBSD
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. This check only
applies to relocations in relocatable object files. How about
_bfd_elf_relocs_compatible
relocs_compatible
H.J.
H.J.