* elflink.h (elf_link_input_bfd): If we've discarded a section,
authorIan Lance Taylor <ian@airs.com>
Fri, 7 Feb 1997 17:40:24 +0000 (17:40 +0000)
committerIan Lance Taylor <ian@airs.com>
Fri, 7 Feb 1997 17:40:24 +0000 (17:40 +0000)
the output section will be the absolute section; don't print an
assertion message for that case when doing a relocateable link.
PR 11647.

bfd/ChangeLog
bfd/elflink.h

index e84edebc243a21c1954fa9e062ba044ad6192b58..d0736297071e65407474656c98cee72976f9496c 100644 (file)
@@ -1,3 +1,9 @@
+Fri Feb  7 12:39:11 1997  Ian Lance Taylor  <ian@cygnus.com>
+
+       * elflink.h (elf_link_input_bfd): If we've discarded a section,
+       the output section will be the absolute section; don't print an
+       assertion message for that case when doing a relocateable link.
+
 Thu Feb  6 16:55:43 1997  Ian Lance Taylor  <ian@cygnus.com>
 
        * elf32-mips.c (FN_STUB, CALL_STUB, CALL_FP_STUB): Define.
index dd5b4db72637be11cdedeb8c1889fc4d7f7163c9..53362ab27d681534f654c35c0f8504417cf1f794 100644 (file)
@@ -3070,8 +3070,13 @@ elf_link_input_bfd (finfo, input_bfd)
                    {
                      /* I suppose the backend ought to fill in the
                         section of any STT_SECTION symbol against a
-                        processor specific section.  */
-                     if (sec != NULL && bfd_is_abs_section (sec))
+                        processor specific section.  If we have
+                        discarded a section, the output_section will
+                        be the absolute section.  */
+                     if (sec != NULL
+                         && (bfd_is_abs_section (sec)
+                             || (sec->output_section != NULL
+                                 && bfd_is_abs_section (sec->output_section))))
                        r_symndx = 0;
                      else if (sec == NULL || sec->owner == NULL)
                        {