diff options
author | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-04-15 19:29:51 +0000 |
---|---|---|
committer | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-04-15 19:29:51 +0000 |
commit | 34b6a8c305532ecbaf30b831232b6ac1f0cf8f15 (patch) | |
tree | d6609d9b4cee6215732f8a02fb1b6c7cecf14fbd /bfd | |
parent | 6f49b01e47d0b7169f527540c7da64276b4ba8cc (diff) | |
download | gdb-34b6a8c305532ecbaf30b831232b6ac1f0cf8f15.zip gdb-34b6a8c305532ecbaf30b831232b6ac1f0cf8f15.tar.gz gdb-34b6a8c305532ecbaf30b831232b6ac1f0cf8f15.tar.bz2 |
Thu Apr 15 09:09:18 1993 Jim Kingdon (kingdon@cygnus.com)
* bfd-in.h (bfd_error), bfd.c (bfd_errmsgs): Add file_truncated.
* format.c (bfd_check_error): Check error return from
_bfd_check_format routines.
Wed Apr 14 23:48:25 1993 Jim Kingdon (kingdon@cygnus.com)
* rs6000-core.c (rs6000coff_core_p): Improve error checking and
recognize .data section if present.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 12 | ||||
-rw-r--r-- | bfd/bfd-in.h | 4 | ||||
-rw-r--r-- | bfd/bfd.c | 65 |
3 files changed, 71 insertions, 10 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index ab546b9..5eb8fa4 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,15 @@ +Thu Apr 15 09:09:18 1993 Jim Kingdon (kingdon@cygnus.com) + + * bfd-in.h (bfd_error), bfd.c (bfd_errmsgs): Add file_truncated. + + * format.c (bfd_check_error): Check error return from + _bfd_check_format routines. + +Wed Apr 14 23:48:25 1993 Jim Kingdon (kingdon@cygnus.com) + + * rs6000-core.c (rs6000coff_core_p): Improve error checking and + recognize .data section if present. + Thu Apr 15 01:00:29 1993 John Gilmore (gnu@cygnus.com) * aoutx.h (aout_*_adjust_sizes_and_vmas): Avoid `sanity' diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h index 50e5246..a1e00dd 100644 --- a/bfd/bfd-in.h +++ b/bfd/bfd-in.h @@ -203,6 +203,10 @@ typedef enum bfd_error { file_ambiguously_recognized, no_contents, bfd_error_nonrepresentable_section, no_debug_section, bad_value, + + /* An input file is shorter than expected. */ + file_truncated, + invalid_error_code} bfd_ec; extern bfd_ec bfd_error; @@ -1,5 +1,5 @@ /* Generic BFD library interface and support routines. - Copyright (C) 1990-1991 Free Software Foundation, Inc. + Copyright (C) 1990, 1991, 1992, 1993 Free Software Foundation, Inc. Written by Cygnus Support. This file is part of BFD, the Binary File Descriptor library. @@ -175,6 +175,8 @@ CODE_FRAGMENT #include "bfd.h" #include "sysdep.h" #include "libbfd.h" +#include "coff/sym.h" +#include "libecoff.h" #undef strerror extern char *strerror(); @@ -196,7 +198,8 @@ CONST short _bfd_host_big_endian = 0x0100; bfd_ec bfd_error = no_error; -CONST char *CONST bfd_errmsgs[] = { "No error", +CONST char *CONST bfd_errmsgs[] = { + "No error", "System call error", "Invalid target", "File in wrong format", @@ -213,6 +216,7 @@ CONST char *CONST bfd_errmsgs[] = { "No error", "Nonrepresentable section on output", "Symbol needs debug section which does not exist", "Bad value", + "File truncated", "#<Invalid error code>" }; @@ -567,6 +571,50 @@ bfd_get_size (abfd) /* FUNCTION + The bfd_get_gp_size function + +SYNOPSIS + int bfd_get_gp_size(bfd *); + +DESCRIPTION + Get the maximum size of objects to be optimized using the GP + register under MIPS ECOFF. This is typically set by the -G + argument to the compiler, assembler or linker. +*/ + +int +bfd_get_gp_size (abfd) + bfd *abfd; +{ + if (abfd->xvec->flavour == bfd_target_ecoff_flavour) + return ecoff_data (abfd)->gp_size; + return 0; +} + +/* +FUNCTION + The bfd_set_gp_size function + +SYNOPSIS + void bfd_set_gp_size(bfd *, int); + +DESCRIPTION + Set the maximum size of objects to be optimized using the GP + register under MIPS ECOFF. This is typically set by the -G + argument to the compiler, assembler or linker. +*/ + +void +bfd_set_gp_size (abfd, i) + bfd *abfd; + int i; +{ + if (abfd->xvec->flavour == bfd_target_ecoff_flavour) + ecoff_data (abfd)->gp_size = i; +} + +/* +FUNCTION stuff DESCRIPTION @@ -595,16 +643,13 @@ DESCRIPTION .#define bfd_set_arch_mach(abfd, arch, mach)\ . BFD_SEND ( abfd, _bfd_set_arch_mach, (abfd, arch, mach)) . -.#define bfd_get_relocated_section_contents(abfd, seclet, data) \ -. BFD_SEND (abfd, _bfd_get_relocated_section_contents, (abfd, seclet, data)) +.#define bfd_get_relocated_section_contents(abfd, seclet, data, relocateable) \ +. BFD_SEND (abfd, _bfd_get_relocated_section_contents, (abfd, seclet, data, relocateable)) . .#define bfd_relax_section(abfd, section, symbols) \ . BFD_SEND (abfd, _bfd_relax_section, (abfd, section, symbols)) +. +.#define bfd_seclet_link(abfd, data, relocateable) \ +. BFD_SEND (abfd, _bfd_seclet_link, (abfd, data, relocateable)) */ - - - - - - |