This is the mail archive of the binutils@sources.redhat.com 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: IA64 linker is totally broken (Re: PATCH: ELF linker is broken)


On Tue, Feb 01, 2005 at 02:45:50PM -0800, H. J. Lu wrote:
> There are quite a few failures on ia64. I am not sure if they can be
> fixed by a single change. I am enclosing the cause of all the problems
> I have seen so far on ia64. IA64 linker has a relaxation pass, which
> seems to be the problem. Dos it ring a bell to you? If not, I will
> send you a bunch of ia64 binaries as a testcase.

Please send me the binaries!  I can only make wild guesses otherwise.
BTW, I still can't send email to you directly.  Your anti-spam filters
don't like my ISP's mail hub, nor do they like smtp directly from my
dynamic ip address.  :-(  Hmm, a bounce through gcc.gnu.org might
work.

> @@ -4031,6 +4094,18 @@ elf_link_add_object_symbols (bfd *abfd, 
>      free (isymbuf);
>    isymbuf = NULL;
>  
> +  if (!add_needed)

You might also try changing this condition to

  if (!add_needed
      && (elf_dyn_lib_class (abfd) & DYN_AS_NEEDED) != 0)

As it was, we would remove symbols from DT_NEEDED libraries, which is
possibly what is breaking ia64.  The intention here was just to remove
symbols from as-needed libs that weren't referenced anywhere from
regular object.  I'll commit this change.

> +    {
> +      struct elf_smash_syms_data inf;
> +      inf.not_needed = abfd;
> +      inf.htab = hash_table;
> +      inf.twiddled = FALSE;
> +      elf_link_hash_traverse (hash_table, elf_smash_syms, &inf);
> +      if (inf.twiddled)
> +	bfd_link_repair_undef_list (&hash_table->root);
> +      weaks = NULL;
> +    }
> +
>    /* Now set the weakdefs field correctly for all the weak defined
>       symbols we found.  The only way to do this is to search all the
>       symbols.  Since we only need the information for non functions in

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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