aboutsummaryrefslogtreecommitdiff
path: root/bfd/bfd.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1993-08-03 20:22:47 +0000
committerIan Lance Taylor <ian@airs.com>1993-08-03 20:22:47 +0000
commitdae31cf51ba2425ba562de00011f49c16e25951a (patch)
tree5c04a034d57ae5afcacaecf1a82ed52d6be5e87a /bfd/bfd.c
parent511e0322b9876c19804c8a47fe0ecbc4ffb858b2 (diff)
downloadgdb-dae31cf51ba2425ba562de00011f49c16e25951a.zip
gdb-dae31cf51ba2425ba562de00011f49c16e25951a.tar.gz
gdb-dae31cf51ba2425ba562de00011f49c16e25951a.tar.bz2
* ecoff.c: New file for generic ECOFF functions.
* ecoffswap.h: New file for ECOFF swapping functions which differ only slightly for different targets. * libecoff.h: Added prototypes for ecoff.c functions. (ecoff_backend_data): New structure. (ecoff_tdata): Added backend_data field. Changed external data pointers to be PTR rather than to a particular struct. (ecoff_symbol_struct): Moved in from coff-mips.c. * coff-alpha.c, coff-mips.c: Moved common functions into ecoff.c. Added ECOFF backend structures. Include ecoffswap.h. * coff-msym.c: Removed; superseded by ecoffswap.h. * bfd.c: Include coff/internal.h. * Makefile.in (BFD_LIBS): Removed coff-mips.o and coff-msym.o. Added ecoff.o. (BFD64_BACKENDS): Added coff-alpha.o. (CFILES): Removed coff-msym.c. Added ecoff.c. (bfd.o): Added dependency on $(INCDIR)/coff/sym.h. (coff-mips.o): Added dependency on ecoffswap.h and coff/ecoff.h. (ecoff.o, coff-alpha.o): New targets. (coff-msym.o): Removed target.
Diffstat (limited to 'bfd/bfd.c')
-rw-r--r--bfd/bfd.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/bfd/bfd.c b/bfd/bfd.c
index 6b4d447..0e8432b 100644
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -177,6 +177,7 @@ CODE_FRAGMENT
#include "bfd.h"
#include "sysdep.h"
#include "libbfd.h"
+#include "coff/internal.h"
#include "coff/sym.h"
#include "libecoff.h"
@@ -228,10 +229,11 @@ DEFUN(bfd_nonrepresentable_section,(abfd, name),
CONST bfd * CONST abfd AND
CONST char * CONST name)
{
- printf("bfd error writing file %s, format %s can't represent section %s\n",
- abfd->filename,
- abfd->xvec->name,
- name);
+ fprintf(stderr,
+ "bfd error writing file %s, format %s can't represent section %s\n",
+ abfd->filename,
+ abfd->xvec->name,
+ name);
exit(1);
}
@@ -243,8 +245,8 @@ DEFUN(bfd_undefined_symbol,(relent, seclet),
CONST struct bfd_seclet *seclet)
{
asymbol *symbol = *(relent->sym_ptr_ptr);
- printf("bfd error relocating, symbol %s is undefined\n",
- symbol->name);
+ fprintf(stderr, "bfd error relocating, symbol %s is undefined\n",
+ symbol->name);
exit(1);
}
/*ARGSUSED*/
@@ -254,7 +256,7 @@ DEFUN(bfd_reloc_value_truncated,(relent, seclet),
CONST arelent *relent AND
struct bfd_seclet *seclet)
{
- printf("bfd error relocating, value truncated\n");
+ fprintf(stderr, "bfd error relocating, value truncated\n");
exit(1);
}
/*ARGSUSED*/
@@ -264,7 +266,7 @@ DEFUN(bfd_reloc_is_dangerous,(relent, seclet),
CONST arelent *relent AND
CONST struct bfd_seclet *seclet)
{
- printf("bfd error relocating, dangerous\n");
+ fprintf(stderr, "bfd error relocating, dangerous\n");
exit(1);
}
@@ -298,7 +300,7 @@ void
DEFUN (bfd_default_error_trap, (error_tag),
bfd_ec error_tag)
{
- printf("bfd assert fail (%s)\n", bfd_errmsg(error_tag));
+ fprintf(stderr, "bfd assert fail (%s)\n", bfd_errmsg(error_tag));
}
void (*bfd_error_trap) PARAMS ((bfd_ec)) = bfd_default_error_trap;
@@ -465,7 +467,7 @@ bfd_assert(file, line)
char *file;
int line;
{
- printf("bfd assertion fail %s:%d\n",file,line);
+ fprintf(stderr, "bfd assertion fail %s:%d\n",file,line);
}