aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog6
-rw-r--r--ld/ldmain.c3
2 files changed, 8 insertions, 1 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 0f28a2e..3043096 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,9 @@
+2018-10-15 Alan Modra <amodra@gmail.com>
+
+ PR 23534
+ * ldmain.c (main): Exit with fatal error if bfd_init returns
+ an unexpected value.
+
2018-10-13 Alan Modra <amodra@gmail.com>
* Makefile.am (eelf32btsmip_fbsd.c, eelf32btsmipn32_fbsd.c),
diff --git a/ld/ldmain.c b/ld/ldmain.c
index aca9b1b..4641920 100644
--- a/ld/ldmain.c
+++ b/ld/ldmain.c
@@ -209,7 +209,8 @@ main (int argc, char **argv)
expandargv (&argc, &argv);
- bfd_init ();
+ if (bfd_init () != BFD_INIT_MAGIC)
+ einfo (_("%F%P: fatal error: libbfd ABI mismatch\n"));
bfd_set_error_program_name (program_name);