diff options
author | Alan Modra <amodra@gmail.com> | 2001-10-02 05:58:41 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2001-10-02 05:58:41 +0000 |
commit | e43d48ccc3b8e9d815e704e55dd6748de2419efc (patch) | |
tree | 4d2871cf1f149a44ebc3b413e477558a43a405e6 /bfd/targets.c | |
parent | 39ae698d7d393b5c109dbadcc8105ac0c884f00a (diff) | |
download | gdb-e43d48ccc3b8e9d815e704e55dd6748de2419efc.zip gdb-e43d48ccc3b8e9d815e704e55dd6748de2419efc.tar.gz gdb-e43d48ccc3b8e9d815e704e55dd6748de2419efc.tar.bz2 |
* version.h: New file.
* bfd-in.h: (BFD_VERSION): Substitute bfd_version.
(BFD_VERSION_DATE): Define.
(BFD_VERSION_STRING): Define.
* configure.in: AC_SUBST bfd_version, bfd_version_date and
bfd_version_string.
(AC_OUTPUT <bfd-in3.h>): Depend on version.h.
* bfd-in2.h: Regenerate.
* configure: Regenerate.
* Makefile.am: Run "make dep-am"
* Makefile.in: Regenerate.
* bfd-in.h: Include "symcat.h".
(CONCAT4): Redefine as for old CAT4.
* aout-arm.c: Use equivalent CONCAT* macro in place of CAT* macros.
Add warning regarding whitespace.
* aout-cris.c: Likewise.
* aout-ns32k.c: Likewise.
* aout-sparcle.c: Likewise.
* aout-tic30.c: Likewise.
* aout0.c: Likewise.
* armnetbsd.c: Likewise.
* demo64.c: Likewise.
* elf-bfd.h: Likewise.
* gen-aout.c: Likewise.
* host-aout.c: Likewise.
* hp300bsd.c: Likewise.
* hp300hpux.c: Likewise.
* i386aout.c: Likewise.
* i386bsd.c: Likewise.
* i386dynix.c: Likewise.
* i386freebsd.c: Likewise.
* i386linux.c: Likewise.
* i386lynx.c: Likewise.
* i386mach3.c: Likewise.
* i386netbsd.c: Likewise.
* libaout.h: Likewise.
* m68k4knetbsd.c: Likewise.
* m68klinux.c: Likewise.
* m68klynx.c: Likewise.
* m68knetbsd.c: Likewise.
* m88kmach3.c: Likewise.
* mipsbsd.c: Likewise.
* newsos3.c: Likewise.
* ns32knetbsd.c: Likewise.
* pc532-mach.c: Likewise.
* pdp11.c: Likewise.
* riscix.c: Likewise.
* sparclinux.c: Likewise.
* sparclynx.c: Likewise.
* sparcnetbsd.c: Likewise.
* sunos.c: Likewise.
* targets.c: Likewise.
* vaxnetbsd.c: Likewise.
* vms-hdr.c: Likewise.
Diffstat (limited to 'bfd/targets.c')
-rw-r--r-- | bfd/targets.c | 127 |
1 files changed, 65 insertions, 62 deletions
diff --git a/bfd/targets.c b/bfd/targets.c index 0972d7f..a86267e 100644 --- a/bfd/targets.c +++ b/bfd/targets.c @@ -250,12 +250,15 @@ BFD_JUMP_TABLE macros. . . {* Generic entry points. *} -.#define BFD_JUMP_TABLE_GENERIC(NAME)\ -.CAT(NAME,_close_and_cleanup),\ -.CAT(NAME,_bfd_free_cached_info),\ -.CAT(NAME,_new_section_hook),\ -.CAT(NAME,_get_section_contents),\ -.CAT(NAME,_get_section_contents_in_window) +Do not "beautify" the CONCAT* macro args. Traditional C will not +remove whitespace added here, and thus will fail to concatenate +the tokens. +.#define BFD_JUMP_TABLE_GENERIC(NAME) \ +.CONCAT2 (NAME,_close_and_cleanup), \ +.CONCAT2 (NAME,_bfd_free_cached_info), \ +.CONCAT2 (NAME,_new_section_hook), \ +.CONCAT2 (NAME,_get_section_contents), \ +.CONCAT2 (NAME,_get_section_contents_in_window) . . {* Called when the BFD is being closed to do any necessary cleanup. *} . boolean (*_close_and_cleanup) PARAMS ((bfd *)); @@ -270,13 +273,13 @@ BFD_JUMP_TABLE macros. . PARAMS ((bfd *, sec_ptr, bfd_window *, file_ptr, bfd_size_type)); . . {* Entry points to copy private data. *} -.#define BFD_JUMP_TABLE_COPY(NAME)\ -.CAT(NAME,_bfd_copy_private_bfd_data),\ -.CAT(NAME,_bfd_merge_private_bfd_data),\ -.CAT(NAME,_bfd_copy_private_section_data),\ -.CAT(NAME,_bfd_copy_private_symbol_data),\ -.CAT(NAME,_bfd_set_private_flags),\ -.CAT(NAME,_bfd_print_private_bfd_data)\ +.#define BFD_JUMP_TABLE_COPY(NAME) \ +.CONCAT2 (NAME,_bfd_copy_private_bfd_data), \ +.CONCAT2 (NAME,_bfd_merge_private_bfd_data), \ +.CONCAT2 (NAME,_bfd_copy_private_section_data), \ +.CONCAT2 (NAME,_bfd_copy_private_symbol_data), \ +.CONCAT2 (NAME,_bfd_set_private_flags), \ +.CONCAT2 (NAME,_bfd_print_private_bfd_data) \ . {* Called to copy BFD general private data from one object file . to another. *} . boolean (*_bfd_copy_private_bfd_data) PARAMS ((bfd *, bfd *)); @@ -298,26 +301,26 @@ BFD_JUMP_TABLE macros. . boolean (*_bfd_print_private_bfd_data) PARAMS ((bfd *, PTR)); . . {* Core file entry points. *} -.#define BFD_JUMP_TABLE_CORE(NAME)\ -.CAT(NAME,_core_file_failing_command),\ -.CAT(NAME,_core_file_failing_signal),\ -.CAT(NAME,_core_file_matches_executable_p) +.#define BFD_JUMP_TABLE_CORE(NAME) \ +.CONCAT2 (NAME,_core_file_failing_command), \ +.CONCAT2 (NAME,_core_file_failing_signal), \ +.CONCAT2 (NAME,_core_file_matches_executable_p) . char * (*_core_file_failing_command) PARAMS ((bfd *)); . int (*_core_file_failing_signal) PARAMS ((bfd *)); . boolean (*_core_file_matches_executable_p) PARAMS ((bfd *, bfd *)); . . {* Archive entry points. *} -.#define BFD_JUMP_TABLE_ARCHIVE(NAME)\ -.CAT(NAME,_slurp_armap),\ -.CAT(NAME,_slurp_extended_name_table),\ -.CAT(NAME,_construct_extended_name_table),\ -.CAT(NAME,_truncate_arname),\ -.CAT(NAME,_write_armap),\ -.CAT(NAME,_read_ar_hdr),\ -.CAT(NAME,_openr_next_archived_file),\ -.CAT(NAME,_get_elt_at_index),\ -.CAT(NAME,_generic_stat_arch_elt),\ -.CAT(NAME,_update_armap_timestamp) +.#define BFD_JUMP_TABLE_ARCHIVE(NAME) \ +.CONCAT2 (NAME,_slurp_armap), \ +.CONCAT2 (NAME,_slurp_extended_name_table), \ +.CONCAT2 (NAME,_construct_extended_name_table), \ +.CONCAT2 (NAME,_truncate_arname), \ +.CONCAT2 (NAME,_write_armap), \ +.CONCAT2 (NAME,_read_ar_hdr), \ +.CONCAT2 (NAME,_openr_next_archived_file), \ +.CONCAT2 (NAME,_get_elt_at_index), \ +.CONCAT2 (NAME,_generic_stat_arch_elt), \ +.CONCAT2 (NAME,_update_armap_timestamp) . boolean (*_bfd_slurp_armap) PARAMS ((bfd *)); . boolean (*_bfd_slurp_extended_name_table) PARAMS ((bfd *)); . boolean (*_bfd_construct_extended_name_table) @@ -333,18 +336,18 @@ BFD_JUMP_TABLE macros. . boolean (*_bfd_update_armap_timestamp) PARAMS ((bfd *)); . . {* Entry points used for symbols. *} -.#define BFD_JUMP_TABLE_SYMBOLS(NAME)\ -.CAT(NAME,_get_symtab_upper_bound),\ -.CAT(NAME,_get_symtab),\ -.CAT(NAME,_make_empty_symbol),\ -.CAT(NAME,_print_symbol),\ -.CAT(NAME,_get_symbol_info),\ -.CAT(NAME,_bfd_is_local_label_name),\ -.CAT(NAME,_get_lineno),\ -.CAT(NAME,_find_nearest_line),\ -.CAT(NAME,_bfd_make_debug_symbol),\ -.CAT(NAME,_read_minisymbols),\ -.CAT(NAME,_minisymbol_to_symbol) +.#define BFD_JUMP_TABLE_SYMBOLS(NAME) \ +.CONCAT2 (NAME,_get_symtab_upper_bound), \ +.CONCAT2 (NAME,_get_symtab), \ +.CONCAT2 (NAME,_make_empty_symbol), \ +.CONCAT2 (NAME,_print_symbol), \ +.CONCAT2 (NAME,_get_symbol_info), \ +.CONCAT2 (NAME,_bfd_is_local_label_name), \ +.CONCAT2 (NAME,_get_lineno), \ +.CONCAT2 (NAME,_find_nearest_line), \ +.CONCAT2 (NAME,_bfd_make_debug_symbol), \ +.CONCAT2 (NAME,_read_minisymbols), \ +.CONCAT2 (NAME,_minisymbol_to_symbol) . long (*_bfd_get_symtab_upper_bound) PARAMS ((bfd *)); . long (*_bfd_canonicalize_symtab) PARAMS ((bfd *, . struct symbol_cache_entry **)); @@ -379,10 +382,10 @@ BFD_JUMP_TABLE macros. . asymbol *)); . . {* Routines for relocs. *} -.#define BFD_JUMP_TABLE_RELOCS(NAME)\ -.CAT(NAME,_get_reloc_upper_bound),\ -.CAT(NAME,_canonicalize_reloc),\ -.CAT(NAME,_bfd_reloc_type_lookup) +.#define BFD_JUMP_TABLE_RELOCS(NAME) \ +.CONCAT2 (NAME,_get_reloc_upper_bound), \ +.CONCAT2 (NAME,_canonicalize_reloc), \ +.CONCAT2 (NAME,_bfd_reloc_type_lookup) . long (*_get_reloc_upper_bound) PARAMS ((bfd *, sec_ptr)); . long (*_bfd_canonicalize_reloc) PARAMS ((bfd *, sec_ptr, arelent **, . struct symbol_cache_entry **)); @@ -391,25 +394,25 @@ BFD_JUMP_TABLE macros. . (*reloc_type_lookup) PARAMS ((bfd *, bfd_reloc_code_real_type)); . . {* Routines used when writing an object file. *} -.#define BFD_JUMP_TABLE_WRITE(NAME)\ -.CAT(NAME,_set_arch_mach),\ -.CAT(NAME,_set_section_contents) +.#define BFD_JUMP_TABLE_WRITE(NAME) \ +.CONCAT2 (NAME,_set_arch_mach), \ +.CONCAT2 (NAME,_set_section_contents) . boolean (*_bfd_set_arch_mach) PARAMS ((bfd *, enum bfd_architecture, . unsigned long)); . boolean (*_bfd_set_section_contents) PARAMS ((bfd *, sec_ptr, PTR, . file_ptr, bfd_size_type)); . . {* Routines used by the linker. *} -.#define BFD_JUMP_TABLE_LINK(NAME)\ -.CAT(NAME,_sizeof_headers),\ -.CAT(NAME,_bfd_get_relocated_section_contents),\ -.CAT(NAME,_bfd_relax_section),\ -.CAT(NAME,_bfd_link_hash_table_create),\ -.CAT(NAME,_bfd_link_add_symbols),\ -.CAT(NAME,_bfd_final_link),\ -.CAT(NAME,_bfd_link_split_section),\ -.CAT(NAME,_bfd_gc_sections),\ -.CAT(NAME,_bfd_merge_sections) +.#define BFD_JUMP_TABLE_LINK(NAME) \ +.CONCAT2 (NAME,_sizeof_headers), \ +.CONCAT2 (NAME,_bfd_get_relocated_section_contents), \ +.CONCAT2 (NAME,_bfd_relax_section), \ +.CONCAT2 (NAME,_bfd_link_hash_table_create), \ +.CONCAT2 (NAME,_bfd_link_add_symbols), \ +.CONCAT2 (NAME,_bfd_final_link), \ +.CONCAT2 (NAME,_bfd_link_split_section), \ +.CONCAT2 (NAME,_bfd_gc_sections), \ +.CONCAT2 (NAME,_bfd_merge_sections) . int (*_bfd_sizeof_headers) PARAMS ((bfd *, boolean)); . bfd_byte *(*_bfd_get_relocated_section_contents) . PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *, @@ -439,11 +442,11 @@ BFD_JUMP_TABLE macros. . boolean (*_bfd_merge_sections) PARAMS ((bfd *, struct bfd_link_info *)); . . {* Routines to handle dynamic symbols and relocs. *} -.#define BFD_JUMP_TABLE_DYNAMIC(NAME)\ -.CAT(NAME,_get_dynamic_symtab_upper_bound),\ -.CAT(NAME,_canonicalize_dynamic_symtab),\ -.CAT(NAME,_get_dynamic_reloc_upper_bound),\ -.CAT(NAME,_canonicalize_dynamic_reloc) +.#define BFD_JUMP_TABLE_DYNAMIC(NAME) \ +.CONCAT2 (NAME,_get_dynamic_symtab_upper_bound), \ +.CONCAT2 (NAME,_canonicalize_dynamic_symtab), \ +.CONCAT2 (NAME,_get_dynamic_reloc_upper_bound), \ +.CONCAT2 (NAME,_canonicalize_dynamic_reloc) . {* Get the amount of memory required to hold the dynamic symbols. *} . long (*_bfd_get_dynamic_symtab_upper_bound) PARAMS ((bfd *)); . {* Read in the dynamic symbols. *} |