diff options
author | Nick Clifton <nickc@redhat.com> | 2016-11-18 09:27:41 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2016-11-18 09:27:41 +0000 |
commit | 6ec49e7c0aeb6d98e379319b565aee2c89388615 (patch) | |
tree | 8f297a9d97353be3acc5cc1ee28d13ba97ac42bc /bfd | |
parent | cd42d70b4d7e92dcc6c533e012ab8af122de7b9e (diff) | |
download | gdb-6ec49e7c0aeb6d98e379319b565aee2c89388615.zip gdb-6ec49e7c0aeb6d98e379319b565aee2c89388615.tar.gz gdb-6ec49e7c0aeb6d98e379319b565aee2c89388615.tar.bz2 |
Help diagnose problems with the metag target when mixing static and shared binaries.
PR ld/20675
* elf32-metag.c (elf_metag_relocate_section): Replace abort with
an informative error message.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/elf32-metag.c | 11 |
2 files changed, 15 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index fcc5b1c..b96b939 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -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 diff --git a/bfd/elf32-metag.c b/bfd/elf32-metag.c index 1557a37..ac78324 100644 --- a/bfd/elf32-metag.c +++ b/bfd/elf32-metag.c @@ -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; |