aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2003-04-24 01:43:33 +0000
committerH.J. Lu <hjl.tools@gmail.com>2003-04-24 01:43:33 +0000
commit0f0569c4ae6c593d573b2961438826fc80ae1e42 (patch)
treea2593bb53ea21de93bdc0a05bc6cc8ffefbd3601 /ld
parent6e94181b1eec688155f664b137f5332b9d1bdcad (diff)
downloadgdb-0f0569c4ae6c593d573b2961438826fc80ae1e42.zip
gdb-0f0569c4ae6c593d573b2961438826fc80ae1e42.tar.gz
gdb-0f0569c4ae6c593d573b2961438826fc80ae1e42.tar.bz2
include/
* 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.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog8
-rw-r--r--ld/ldmain.c3
-rw-r--r--ld/ldmisc.c11
-rw-r--r--ld/ldmisc.h1
4 files changed, 22 insertions, 1 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index babbd97..1bbbc66 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -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.
diff --git a/ld/ldmain.c b/ld/ldmain.c
index 125dc6a..d8ee1b2 100644
--- a/ld/ldmain.c
+++ b/ld/ldmain.c
@@ -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;
diff --git a/ld/ldmisc.c b/ld/ldmisc.c
index 4f25dbb..a2e496d 100644
--- a/ld/ldmisc.c
+++ b/ld/ldmisc.c
@@ -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;
+}
diff --git a/ld/ldmisc.h b/ld/ldmisc.h
index aa3f6af..c03ed97 100644
--- a/ld/ldmisc.h
+++ b/ld/ldmisc.h
@@ -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 *, ...));