bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ld -lgen -ladm causes assert failure in gnu ld 2.12.1 and 2.13 under


From: Nick Clifton
Subject: Re: ld -lgen -ladm causes assert failure in gnu ld 2.12.1 and 2.13 under Solaris 2.7 or 2.8
Date: 19 Sep 2002 15:37:30 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.1

Hi Andrew,

> I have reproduced this problem on Solaris 2.7 with ld 2.12.1 and ld
> 2.13 and on Solaris 2.8 with ld 2.12.1.  No modifications to the
> distributed binutils source.
> 
> The symptom:
> 
> $ ld -lgen -ladm
> ld: BFD 2.12.1 assertion fail elflink.h:3934
> ld: BFD 2.12.1 assertion fail elflink.h:3934
> ld: BFD 2.12.1 assertion fail elflink.h:3934
> ld: BFD 2.12.1 assertion fail elflink.h:3934
> ld: warning: cannot find entry symbol _start; not setting start address

I think that the attached patch should fix this problem.  Please try
it out and let me know.

Cheers
        Nick

PS.  Sorry about the long delay in replying - it look me ages to find
a Solaris 2.7 machine that I could use.

2002-09-19  Nick Clifton  <address@hidden>

        * elflink.h (elf_fix_symbol_flags): Follow indirect links.

Index: bfd/elflink.h
===================================================================
RCS file: /cvs/src/src/bfd/elflink.h,v
retrieving revision 1.185
diff -c -3 -p -w -r1.185 elflink.h
*** bfd/elflink.h       22 Aug 2002 01:27:19 -0000      1.185
--- bfd/elflink.h       19 Sep 2002 14:33:09 -0000
*************** elf_fix_symbol_flags (h, eif)
*** 3886,3894 ****
      {
        struct elf_link_hash_entry *weakdef;
  
        BFD_ASSERT (h->root.type == bfd_link_hash_defined
                  || h->root.type == bfd_link_hash_defweak);
-       weakdef = h->weakdef;
        BFD_ASSERT (weakdef->root.type == bfd_link_hash_defined
                  || weakdef->root.type == bfd_link_hash_defweak);
        BFD_ASSERT (weakdef->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC);
--- 3886,3897 ----
      {
        struct elf_link_hash_entry *weakdef;
  
+       weakdef = h->weakdef;
+       while (h->root.type == bfd_link_hash_indirect)
+       h = (struct elf_link_hash_entry *) h->root.u.i.link;
+ 
        BFD_ASSERT (h->root.type == bfd_link_hash_defined
                  || h->root.type == bfd_link_hash_defweak);
        BFD_ASSERT (weakdef->root.type == bfd_link_hash_defined
                  || weakdef->root.type == bfd_link_hash_defweak);
        BFD_ASSERT (weakdef->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC);





reply via email to

[Prev in Thread] Current Thread [Next in Thread]