public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Ian Lance Taylor <ian@zembu.com>
To: patha@ida.liu.se
Cc: binutils@sourceware.cygnus.com, biedie@my-Deja.com
Subject: Re: bfd assertion fail elflink.h:1566
Date: Fri, 08 Oct 1999 15:12:00 -0000	[thread overview]
Message-ID: <19991008221145.20697.qmail@daffy.airs.com> (raw)
In-Reply-To: <199910072330.BAA12130@portofix.ida.liu.se>

   Date: Fri, 08 Oct 1999 01:30:35 +0200
   From: Patrik Hagglund <patha@ida.liu.se>

      Date: Wed, 06 Oct 1999 05:59:45 -0700
      From: "   " <biedie@my-Deja.com>

      I have currently installed gcc 2.95.1 and binutils 2.9.5.0.14.
      My system is solaris2.6. I get the following warning/error:

      /some_dir/sparc-sun-solaris2.6/bin/ld: bfd assertion fail elflink.h:1566

   I had the same problem (symptom). 

I checked in a patch which I think should fix the problem.  However, I
did not test your actual test case--I tested another one which was
sent to me.

I've appended the patch.

   Using Sun's ld gives the following error messages:

   ld: Software Generation Utilities - Solaris/ELF (3.0)
   ld: warning: file ./libgcj.so: section .stabstr: malformed string table, initial or final byte
   ld: warning: file ./libgcjgc.so: section .stabstr: malformed string table, initial or final byte
   ld: warning: file ./libzgcj.so: section .stabstr: malformed string table, initial or final byte

I'm not sure what's up with this.  I very much doubt that it is
related to the assertion failure.

Were those shared libraries created by the GNU linker?  What is the
initial and final byte of the .stabstr section in those files?  (You
can get this using objdump -s -j .stabstr).  If you create the files
using the Solaris linker, what is the initial and final byte of the
.stabstr section?  (You may need to use a special option to force the
Solaris linker to create a .stabstr section rather than leaving the
stabs information in the .o files).  Perhaps the Solaris linker
expects something which the GNU linker simply isn't doing.

Ian


Index: elflink.h
===================================================================
RCS file: /cvs/binutils/binutils/bfd/elflink.h,v
retrieving revision 1.34
diff -u -p -r1.34 elflink.h
--- elflink.h	1999/09/10 04:22:23	1.34
+++ elflink.h	1999/10/08 15:21:07
@@ -683,8 +683,12 @@ elf_merge_symbol (abfd, info, name, sym,
       /* To make this work we have to frob the flags so that the rest
          of the code does not think we are using the regular
          definition.  */
-      h->elf_link_hash_flags &= ~ ELF_LINK_HASH_DEF_REGULAR;
-      h->elf_link_hash_flags |= ELF_LINK_HASH_REF_REGULAR;
+      if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0)
+	h->elf_link_hash_flags |= ELF_LINK_HASH_REF_REGULAR;
+      else if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0)
+	h->elf_link_hash_flags |= ELF_LINK_HASH_REF_DYNAMIC;
+      h->elf_link_hash_flags &= ~ (ELF_LINK_HASH_DEF_REGULAR
+				   | ELF_LINK_HASH_DEF_DYNAMIC);
 
       /* If H is the target of an indirection, we want the caller to
          use H rather than the indirect symbol.  Otherwise if we are

  reply	other threads:[~1999-10-08 15:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-10-07 16:30 Patrik Hagglund
1999-10-08 15:12 ` Ian Lance Taylor [this message]
1999-10-21 10:50   ` Patrik Hagglund

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19991008221145.20697.qmail@daffy.airs.com \
    --to=ian@zembu.com \
    --cc=biedie@my-Deja.com \
    --cc=binutils@sourceware.cygnus.com \
    --cc=patha@ida.liu.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).