2000-03-01 H.J. Lu <hjl@gnu.org>
* ldmain.c (undefined_symbol): Take one more arg, fatal, to indicate if the undefined symbol is a fatal error or not. Don't delete the output file if "fatal" is false.
This commit is contained in:
parent
8bf950bf50
commit
b6f29aaaea
|
@ -1,3 +1,9 @@
|
||||||
|
2000-03-01 H.J. Lu <hjl@gnu.org>
|
||||||
|
|
||||||
|
* ldmain.c (undefined_symbol): Take one more arg, fatal, to
|
||||||
|
indicate if the undefined symbol is a fatal error or not.
|
||||||
|
Don't delete the output file if "fatal" is false.
|
||||||
|
|
||||||
2000-02-29 H.J. Lu <hjl@gnu.org>
|
2000-02-29 H.J. Lu <hjl@gnu.org>
|
||||||
|
|
||||||
* Makefile.am (check-DEJAGNU): Also pass LIBS="$(LIBS)".
|
* Makefile.am (check-DEJAGNU): Also pass LIBS="$(LIBS)".
|
||||||
|
|
21
ld/ldmain.c
21
ld/ldmain.c
|
@ -117,7 +117,7 @@ static boolean warning_callback PARAMS ((struct bfd_link_info *,
|
||||||
static void warning_find_reloc PARAMS ((bfd *, asection *, PTR));
|
static void warning_find_reloc PARAMS ((bfd *, asection *, PTR));
|
||||||
static boolean undefined_symbol PARAMS ((struct bfd_link_info *,
|
static boolean undefined_symbol PARAMS ((struct bfd_link_info *,
|
||||||
const char *, bfd *,
|
const char *, bfd *,
|
||||||
asection *, bfd_vma));
|
asection *, bfd_vma, boolean));
|
||||||
static boolean reloc_overflow PARAMS ((struct bfd_link_info *, const char *,
|
static boolean reloc_overflow PARAMS ((struct bfd_link_info *, const char *,
|
||||||
const char *, bfd_vma,
|
const char *, bfd_vma,
|
||||||
bfd *, asection *, bfd_vma));
|
bfd *, asection *, bfd_vma));
|
||||||
|
@ -1144,12 +1144,13 @@ warning_find_reloc (abfd, sec, iarg)
|
||||||
|
|
||||||
/*ARGSUSED*/
|
/*ARGSUSED*/
|
||||||
static boolean
|
static boolean
|
||||||
undefined_symbol (info, name, abfd, section, address)
|
undefined_symbol (info, name, abfd, section, address, fatal)
|
||||||
struct bfd_link_info *info ATTRIBUTE_UNUSED;
|
struct bfd_link_info *info ATTRIBUTE_UNUSED;
|
||||||
const char *name;
|
const char *name;
|
||||||
bfd *abfd;
|
bfd *abfd;
|
||||||
asection *section;
|
asection *section;
|
||||||
bfd_vma address;
|
bfd_vma address;
|
||||||
|
boolean fatal;
|
||||||
{
|
{
|
||||||
static char *error_name;
|
static char *error_name;
|
||||||
static unsigned int error_count;
|
static unsigned int error_count;
|
||||||
|
@ -1193,8 +1194,12 @@ undefined_symbol (info, name, abfd, section, address)
|
||||||
if (section != NULL)
|
if (section != NULL)
|
||||||
{
|
{
|
||||||
if (error_count < MAX_ERRORS_IN_A_ROW)
|
if (error_count < MAX_ERRORS_IN_A_ROW)
|
||||||
einfo (_("%X%C: undefined reference to `%T'\n"),
|
{
|
||||||
abfd, section, address, name);
|
einfo (_("%C: undefined reference to `%T'\n"),
|
||||||
|
abfd, section, address, name);
|
||||||
|
if (fatal)
|
||||||
|
einfo ("%X");
|
||||||
|
}
|
||||||
else if (error_count == MAX_ERRORS_IN_A_ROW)
|
else if (error_count == MAX_ERRORS_IN_A_ROW)
|
||||||
einfo (_("%D: more undefined references to `%T' follow\n"),
|
einfo (_("%D: more undefined references to `%T' follow\n"),
|
||||||
abfd, section, address, name);
|
abfd, section, address, name);
|
||||||
|
@ -1202,8 +1207,12 @@ undefined_symbol (info, name, abfd, section, address)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (error_count < MAX_ERRORS_IN_A_ROW)
|
if (error_count < MAX_ERRORS_IN_A_ROW)
|
||||||
einfo (_("%X%B: undefined reference to `%T'\n"),
|
{
|
||||||
abfd, name);
|
einfo (_("%B: undefined reference to `%T'\n"),
|
||||||
|
abfd, name);
|
||||||
|
if (fatal)
|
||||||
|
einfo ("%X");
|
||||||
|
}
|
||||||
else if (error_count == MAX_ERRORS_IN_A_ROW)
|
else if (error_count == MAX_ERRORS_IN_A_ROW)
|
||||||
einfo (_("%B: more undefined references to `%T' follow\n"),
|
einfo (_("%B: more undefined references to `%T' follow\n"),
|
||||||
abfd, name);
|
abfd, name);
|
||||||
|
|
Loading…
Reference in New Issue