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

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