diff options
author | Ian Lance Taylor <ian@airs.com> | 1999-08-05 21:01:37 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1999-08-05 21:01:37 +0000 |
commit | 5d54c62870438863320321eb704a13fc4c85953a (patch) | |
tree | 30f15952d1ecde01792ec7626703f13a3ced1135 /bfd/libcoff.h | |
parent | 1198f921aeb99c724a90700c002c559c9ed10be9 (diff) | |
download | gdb-5d54c62870438863320321eb704a13fc4c85953a.zip gdb-5d54c62870438863320321eb704a13fc4c85953a.tar.gz gdb-5d54c62870438863320321eb704a13fc4c85953a.tar.bz2 |
Based on patches from Donn Terry <donn@interix.com>:
* coffcode.h (enum coff_symbol_classification): Define.
(bfd_coff_backend_data): Rename _bfd_coff_sym_is_global to
_bfd_coff_classify_symbol. Change return type.
(bfd_coff_classify_symbol): Rename from bfd_coff_sym_is_global.
(coff_slurp_symbol_table): Use coff_classify_symbol.
(coff_classify_symbol): New static function.
(coff_sym_is_global): Never define.
(bfd_coff_std_swap_table): Initialize with coff_classify_symbol.
* cofflink.c (coff_link_check_ar_symbols): Use
bfd_coff_classify_symbol rather than bfd_coff_sym_is_global.
(coff_link_add_symbols): Likewise.
(_bfd_coff_link_input_bfd): Likewise.
* coff-sh.c (bfd_coff_small_swap_table): Initialize with
coff_classify_symbol.
* libcoff.h: Rebuild.
Diffstat (limited to 'bfd/libcoff.h')
-rw-r--r-- | bfd/libcoff.h | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/bfd/libcoff.h b/bfd/libcoff.h index 0eebf5f..229668e 100644 --- a/bfd/libcoff.h +++ b/bfd/libcoff.h @@ -586,6 +586,22 @@ struct lineno_cache_entry *lineno; /* Have the line numbers been relocated yet ? */ boolean done_lineno; } coff_symbol_type; + /* COFF symbol classifications. */ + +enum coff_symbol_classification +{ + /* Global symbol. */ + COFF_SYMBOL_GLOBAL, + /* Common symbol. */ + COFF_SYMBOL_COMMON, + /* Undefined symbol. */ + COFF_SYMBOL_UNDEFINED, + /* Local symbol. */ + COFF_SYMBOL_LOCAL, + /* PE section symbol. */ + COFF_SYMBOL_PE_SECTION +}; + typedef struct { void (*_bfd_coff_swap_aux_in) PARAMS (( @@ -722,7 +738,7 @@ typedef struct arelent *r, unsigned int shrink, struct bfd_link_info *link_info)); - boolean (*_bfd_coff_sym_is_global) PARAMS (( + enum coff_symbol_classification (*_bfd_coff_classify_symbol) PARAMS (( bfd *abfd, struct internal_syment *)); boolean (*_bfd_coff_compute_section_file_positions) PARAMS (( @@ -862,8 +878,8 @@ typedef struct ((coff_backend_info (abfd)->_bfd_coff_reloc16_estimate)\ (abfd, section, reloc, shrink, link_info)) -#define bfd_coff_sym_is_global(abfd, sym)\ - ((coff_backend_info (abfd)->_bfd_coff_sym_is_global)\ +#define bfd_coff_classify_symbol(abfd, sym)\ + ((coff_backend_info (abfd)->_bfd_coff_classify_symbol)\ (abfd, sym)) #define bfd_coff_compute_section_file_positions(abfd)\ |