Help diagnose problems with the metag target when mixing static and shared binaries.
authorNick Clifton <nickc@redhat.com>
Fri, 18 Nov 2016 09:27:41 +0000 (09:27 +0000)
committerNick Clifton <nickc@redhat.com>
Fri, 18 Nov 2016 09:27:41 +0000 (09:27 +0000)
PR ld/20675
* elf32-metag.c (elf_metag_relocate_section): Replace abort with
an informative error message.

bfd/ChangeLog
bfd/elf32-metag.c

index fcc5b1c5e600546d69f297f8f2807b2a672c280b..b96b939053c889b73ed87bdbd47a5954b088623b 100644 (file)
@@ -1,3 +1,9 @@
+2016-11-18  Nick Clifton  <nickc@redhat.com>
+
+       PR ld/20675
+       * elf32-metag.c (elf_metag_relocate_section): Replace abort with
+       an informative error message.
+
 2016-11-15  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>
 
        PR ld/20789
index 1557a37c2ad09ba5214b09614b840720b2bd5acc..ac78324992b2755e75a475e648cc1d7406b89a24 100644 (file)
@@ -1820,7 +1820,7 @@ elf_metag_relocate_section (bfd *output_bfd,
              }
 
            if (tls_type == GOT_UNKNOWN)
-             abort();
+             abort ();
 
            if ((off & 1) != 0)
              off &= ~1;
@@ -1880,7 +1880,14 @@ elf_metag_relocate_section (bfd *output_bfd,
                    else
                      {
                        /* We don't support changing the TLS model.  */
-                       abort ();
+                       /* PR 20675 */
+                       if (bfd_link_pic (info))
+                         _bfd_error_handler (_("%B(%A): multiple TLS models are not supported"),
+                                             input_bfd, input_section, name);
+                       else
+                         _bfd_error_handler (_("%B(%A): shared library symbol %s encountered whilst performing a static link"),
+                                             input_bfd, input_section, name);
+                       return FALSE;
                      }
 
                    cur_off += 8;
This page took 0.028011 seconds and 4 git commands to generate.