* bfd.c (bfd_error_type, bfd_errmsgs): Add bfd_error_missing_dso.
authorAlan Modra <amodra@gmail.com>
Thu, 4 Apr 2013 14:38:01 +0000 (14:38 +0000)
committerAlan Modra <amodra@gmail.com>
Thu, 4 Apr 2013 14:38:01 +0000 (14:38 +0000)
* bfd-in2.h: Regenerate.
* elflink.c (elf_link_add_object_symbols): Use new error.

bfd/ChangeLog
bfd/bfd-in2.h
bfd/bfd.c
bfd/elflink.c

index c2a14b0..b794f36 100644 (file)
@@ -1,3 +1,9 @@
+2013-04-04  Alan Modra  <amodra@gmail.com>
+
+       * bfd.c (bfd_error_type, bfd_errmsgs): Add bfd_error_missing_dso.
+       * bfd-in2.h: Regenerate.
+       * elflink.c (elf_link_add_object_symbols): Use new error.
+
 2013-04-03  Nick Clifton  <nickc@redhat.com>
 
        * elf32-v850.c (v850_elf_is_target_special_symbol): New function.
index 55ebb79..5c4e9c4 100644 (file)
@@ -6111,6 +6111,7 @@ typedef enum bfd_error
   bfd_error_no_armap,
   bfd_error_no_more_archived_files,
   bfd_error_malformed_archive,
+  bfd_error_missing_dso,
   bfd_error_file_not_recognized,
   bfd_error_file_ambiguously_recognized,
   bfd_error_no_contents,
index d77b90f..db4a536 100644 (file)
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -374,6 +374,7 @@ CODE_FRAGMENT
 .  bfd_error_no_armap,
 .  bfd_error_no_more_archived_files,
 .  bfd_error_malformed_archive,
+.  bfd_error_missing_dso,
 .  bfd_error_file_not_recognized,
 .  bfd_error_file_ambiguously_recognized,
 .  bfd_error_no_contents,
@@ -406,6 +407,7 @@ const char *const bfd_errmsgs[] =
   N_("Archive has no index; run ranlib to add one"),
   N_("No more archived files"),
   N_("Malformed archive"),
+  N_("DSO missing from command line"),
   N_("File format not recognized"),
   N_("File format is ambiguous"),
   N_("Section has no contents"),
index 38add1a..8a2bf3f 100644 (file)
@@ -4443,11 +4443,7 @@ error_free_dyn:
                  (*_bfd_error_handler)
                    (_("%B: undefined reference to symbol '%s'"),
                     old_bfd, name);
-                 (*_bfd_error_handler)
-                   (_("note: '%s' is defined in DSO %B"
-                      " so try adding it to the linker command line"),
-                    abfd, name);
-                 bfd_set_error (bfd_error_invalid_operation);
+                 bfd_set_error (bfd_error_missing_dso);
                  goto error_free_vers;
                }