]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
include/
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 24 Apr 2003 01:43:33 +0000 (01:43 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 24 Apr 2003 01:43:33 +0000 (01:43 +0000)
* bfdlink.h (bfd_link_callbacks): Add error_handler.

ld/

* ldmain.c (link_callbacks): Initialize error_handler.

* ldmisc.c (error_handler): New function.

* ldmisc.h (error_handler): New prototype.

include/ChangeLog
include/bfdlink.h
ld/ChangeLog
ld/ldmain.c
ld/ldmisc.c
ld/ldmisc.h

index 37bf7132a0f146586cc3e98d1985973b73977c47..3d7ec5caa7774ec680053bf42ba45577ca920773 100644 (file)
@@ -1,3 +1,7 @@
+2003-04-23  H.J. Lu <hjl@gnu.org>
+
+       * bfdlink.h (bfd_link_callbacks): Add error_handler.
+
 2003-04-04  Svein E. Seldal  <Svein.Seldal@solidas.com>
 
        * coff/tic4x.h: Namespace cleanup. Replace s/c4x/tic4x
index c25826207c595dd1111f58911c4f955191079ab3..acb7449e520b2238f45ca040fba03243afda5c92 100644 (file)
@@ -481,6 +481,11 @@ struct bfd_link_callbacks
   bfd_boolean (*notice)
     PARAMS ((struct bfd_link_info *, const char *name,
             bfd *abfd, asection *section, bfd_vma address));
+  /* A function which is called for reporting a linker error. ID is the
+     error identifier. The remaining input is the same as einfo () in
+     ld.  */
+  bfd_boolean (*error_handler)
+    PARAMS ((int id, const char * fmt, ...));
 };
 \f
 /* The linker builds link_order structures which tell the code how to
index babbd97a677b9a319a6cd00cbace2bd9481805c4..1bbbc66e4327572e3081e60a1132417f6dcd8d12 100644 (file)
@@ -1,3 +1,11 @@
+2003-04-23  H.J. Lu <hjl@gnu.org>
+
+       * ldmain.c (link_callbacks): Initialize error_handler.
+
+       * ldmisc.c (error_handler): New function.
+
+       * ldmisc.h (error_handler): New prototype.
+
 2003-04-21  Stephane Carrez  <stcarrez@nerim.fr>
 
        * emulparams/m68hc11elf.sh: Use m68hc1xelf.em extra.
index 125dc6a9a79a01141ee3e218cdfa9ece11c08dc7..d8ee1b23e7f578476f343a265341f174c810d2e0 100644 (file)
@@ -155,7 +155,8 @@ static struct bfd_link_callbacks link_callbacks =
   reloc_overflow,
   reloc_dangerous,
   unattached_reloc,
-  notice
+  notice,
+  error_handler
 };
 
 struct bfd_link_info link_info;
index 4f25dbb15fbae5f4a363d42a1ad20188188b9d6e..a2e496da9c07552c88548ea178e9d6787ef995a1 100644 (file)
@@ -506,3 +506,14 @@ ld_abort (file, line, fn)
   einfo (_("%P%F: please report this bug\n"));
   xexit (1);
 }
+
+bfd_boolean
+error_handler VPARAMS ((int id ATTRIBUTE_UNUSED, const char *fmt, ...))
+{
+  VA_OPEN (arg, fmt);
+  VA_FIXEDARG (arg, const char *, fmt);
+
+  vfinfo (stderr, fmt, arg);
+  VA_CLOSE (arg);
+  return TRUE;
+}
index aa3f6af15638741bd9285ee67d18a0789a5d1ae1..c03ed973dc5c0b102c668473f116872c73f35122 100644 (file)
@@ -22,6 +22,7 @@
 #ifndef LDMISC_H
 #define LDMISC_H
 
+extern bfd_boolean error_handler PARAMS ((int, const char *, ...));
 extern void einfo PARAMS ((const char *, ...));
 extern void minfo PARAMS ((const char *, ...));
 extern void info_msg PARAMS ((const char *, ...));