From: amodra Date: Wed, 10 Nov 2004 03:28:44 +0000 (+0000) Subject: * obj.h (struct format_ops ): Add int param. X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=c8090fafbd6c6cd49b1f83a2a4fd91fd3fbcf164;p=pf3gnuchains%2Fpf3gnuchains3x.git * obj.h (struct format_ops ): Add int param. * read.h (s_app_file_string): Likewise. * read.c (s_app_file_string): Likewise. (s_app_file): Adjust s_app_file_string call. * config/tc-mips.c (s_mips_file): Likewise. * config/obj-coff.h (obj_app_file): Add app param. * config/obj-ecoff.h (obj_app_file): Likewise. * config/obj-multi.h (obj_app_file): Likewise. * config/obj-elf.h (elf_file_symbol): Likewise. * config/obj-elf.c (elf_file_symbol): Only emit one file symbol if called for # preprocessor lines. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index 4072c81846..5faf0042f1 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,17 @@ +2004-11-10 Alan Modra + + * obj.h (struct format_ops ): Add int param. + * read.h (s_app_file_string): Likewise. + * read.c (s_app_file_string): Likewise. + (s_app_file): Adjust s_app_file_string call. + * config/tc-mips.c (s_mips_file): Likewise. + * config/obj-coff.h (obj_app_file): Add app param. + * config/obj-ecoff.h (obj_app_file): Likewise. + * config/obj-multi.h (obj_app_file): Likewise. + * config/obj-elf.h (elf_file_symbol): Likewise. + * config/obj-elf.c (elf_file_symbol): Only emit one file symbol + if called for # preprocessor lines. + 2004-11-08 H.J. Lu PR 528 @@ -243,22 +257,24 @@ * config/tc-crx.c: Remove global variable 'post_inc_mode'. (get_flags): New function. - (get_number_of_bits): Edit comments, update numeric values to supported - sizes. - (process_label_constant): Don't support the colon format (SYMBOL:[s|m|l]). + (get_number_of_bits): Edit comments, update numeric values to + supported sizes. + (process_label_constant): Don't support the colon + format (SYMBOL:[s|m|l]). (set_cons_rparams): Support argument type 'arg_rbase'. (get_operandtype): Bug fix in 'rbase' operand type parsing. (handle_LoadStor): Bug fix, first handle post-increment mode. - (getreg_image): Remove redundant code, update according to latest CRX spec. + (getreg_image): Remove redundant code, update according to latest + CRX spec. (print_constant): Bug fix relate to 3-word instructions. - (assemble_insn): Bug fix, when matching instructions, verify also + (assemble_insn): Bug fix, when matching instructions, verify also instruction type (not only mnemonic). Add various error checking. (preprocess_reglist): Support HI/LO and user registers. 2004-10-25 David Mosberger-Tang - * config/tc-ia64.c (fixup_unw_records): Don't let the "t" value + * config/tc-ia64.c (fixup_unw_records): Don't let the "t" value in an epilogue directive go negative. 2004-10-25 H.J. Lu @@ -401,7 +417,7 @@ (lit4_state struct): Add lit4_seg_name and lit4_seg fields. (XTENSA_PROP_*, GET_XTENSA_PROP_*, SET_XTENSA_PROP_*): Define. (frag_flags struct): New. - (xtensa_block_info struct): Move from tc-xtensa.h. Add flags field. + (xtensa_block_info struct): Move from tc-xtensa.h. Add flags field. (subseg_map struct): Add cur_total_freq and cur_target_freq fields. (bitfield, bit_is_set, set_bit, clear_bit): Define. (MAX_FORMATS): Define. @@ -450,7 +466,7 @@ (do_align_targets): New. (get_directive): Accept dashes in directive names. Warn about [no-]generics and [no-]relax directives and treat them as - [no-]transform. + [no-]transform. (xtensa_begin_directive): Call md_flush_pending_output only for some directives. Check for directives inside instruction bundles. Warn about deprecated ".begin literal" usage. Warn and ignore [no-]density @@ -847,7 +863,7 @@ 2004-10-07 Tomer Levi * config/tc-crx.c (preprocess_reglist): Handle Co-processor - Special registers. + Special registers. (md_assemble): Add error checking for Co-Processor instructions. (get_cinv_parameters): Add 'b' option to invalidate the branch-target cache. @@ -944,7 +960,7 @@ 2004-09-20 Tomer Levi - * config/tc-crx.c (handle_LoadStor): New function. + * config/tc-crx.c (handle_LoadStor): New function. Handle load/stor unique instructions before parsing. 2004-09-17 Paul Brook @@ -1310,11 +1326,11 @@ 2004-07-06 Nick Clifton * config.in: Undefine TARGET_SYMBIAN by default. - * configure.in: - * configure: Regenerate. Add sh-symbian-elf target. If - selected define TARGET_SYMBIAN. - * config/tc-sh.h (TARGET_FORMAT): Select a Symbian target - format if TARGET_SYMBIAN has been defined. + * configure.in: + * configure: Regenerate. Add sh-symbian-elf target. If + selected define TARGET_SYMBIAN. + * config/tc-sh.h (TARGET_FORMAT): Select a Symbian target + format if TARGET_SYMBIAN has been defined. * output-file.c (output_file_create): Report the target format chosen when bfd_openw reports that it is invalid. @@ -1798,8 +1814,8 @@ 2004-04-19 Eric Christopher - * config/tc-mips.c (mips_dwarf2_addr_size): Revert part - of previous patch for fix in gcc. + * config/tc-mips.c (mips_dwarf2_addr_size): Revert part + of previous patch for fix in gcc. 2004-04-19 Jakub Jelinek diff --git a/gas/config/obj-coff.h b/gas/config/obj-coff.h index e010a39c0f..ee00982a12 100644 --- a/gas/config/obj-coff.h +++ b/gas/config/obj-coff.h @@ -397,7 +397,7 @@ extern int coff_n_line_nos; extern void coff_add_linesym PARAMS ((symbolS *)); void c_dot_file_symbol PARAMS ((const char *filename)); -#define obj_app_file c_dot_file_symbol +#define obj_app_file(name, app) c_dot_file_symbol (name) extern void coff_frob_symbol PARAMS ((symbolS *, int *)); extern void coff_adjust_symtab PARAMS ((void)); @@ -840,7 +840,7 @@ extern segT obj_coff_add_segment PARAMS ((const char *)); extern void obj_coff_section PARAMS ((int)); extern void c_dot_file_symbol PARAMS ((char *filename)); -#define obj_app_file c_dot_file_symbol +#define obj_app_file(name, app) c_dot_file_symbol (name) extern void obj_extra_stuff PARAMS ((object_headers * headers)); extern segT s_get_segment PARAMS ((symbolS *ptr)); diff --git a/gas/config/obj-ecoff.h b/gas/config/obj-ecoff.h index 54ee0438db..9dbb4e5948 100644 --- a/gas/config/obj-ecoff.h +++ b/gas/config/obj-ecoff.h @@ -63,7 +63,7 @@ extern void ecoff_frob_file PARAMS ((void)); #define obj_symbol_new_hook ecoff_symbol_new_hook /* Record file switches in the ECOFF symbol table. */ -#define obj_app_file(name) ecoff_new_file (name) +#define obj_app_file(name, app) ecoff_new_file (name) /* At the moment we don't want to do any stabs processing in read.c. */ #define OBJ_PROCESS_STAB(seg, what, string, type, other, desc) \ diff --git a/gas/config/obj-elf.c b/gas/config/obj-elf.c index 84f5a84a2b..b4c3a5a7f3 100644 --- a/gas/config/obj-elf.c +++ b/gas/config/obj-elf.c @@ -236,21 +236,27 @@ elf_sec_sym_ok_for_reloc (asection *sec) } void -elf_file_symbol (const char *s) +elf_file_symbol (const char *s, int appfile) { - symbolS *sym; + if (!appfile + || symbol_rootP == NULL + || symbol_rootP->bsym == NULL + || (symbol_rootP->bsym->flags & BSF_FILE) == 0) + { + symbolS *sym; - sym = symbol_new (s, absolute_section, 0, NULL); - symbol_set_frag (sym, &zero_address_frag); - symbol_get_bfdsym (sym)->flags |= BSF_FILE; + sym = symbol_new (s, absolute_section, 0, NULL); + symbol_set_frag (sym, &zero_address_frag); + symbol_get_bfdsym (sym)->flags |= BSF_FILE; - if (symbol_rootP != sym) - { - symbol_remove (sym, &symbol_rootP, &symbol_lastP); - symbol_insert (sym, symbol_rootP, &symbol_rootP, &symbol_lastP); + if (symbol_rootP != sym) + { + symbol_remove (sym, &symbol_rootP, &symbol_lastP); + symbol_insert (sym, symbol_rootP, &symbol_rootP, &symbol_lastP); #ifdef DEBUG - verify_symbol_chain (symbol_rootP, symbol_lastP); + verify_symbol_chain (symbol_rootP, symbol_lastP); #endif + } } #ifdef NEED_ECOFF_DEBUG diff --git a/gas/config/obj-elf.h b/gas/config/obj-elf.h index e71379721a..65a8fa221c 100644 --- a/gas/config/obj-elf.h +++ b/gas/config/obj-elf.h @@ -159,7 +159,7 @@ extern void elf_frob_file_after_relocs (void); #ifndef obj_app_file #define obj_app_file elf_file_symbol #endif -extern void elf_file_symbol (const char *); +extern void elf_file_symbol (const char *, int); extern void obj_elf_section_change_hook (void); diff --git a/gas/config/obj-multi.h b/gas/config/obj-multi.h index 37d9fe828b..1adbd7780d 100644 --- a/gas/config/obj-multi.h +++ b/gas/config/obj-multi.h @@ -37,9 +37,9 @@ ? (*this_format->begin) () \ : (void) 0) -#define obj_app_file(NAME) \ +#define obj_app_file(NAME, APPFILE) \ (this_format->app_file \ - ? (*this_format->app_file) (NAME) \ + ? (*this_format->app_file) (NAME, APPFILE) \ : (void) 0) #define obj_frob_symbol(S,P) \ diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index 41e03f7b9f..1d0afe95a0 100644 --- a/gas/config/tc-mips.c +++ b/gas/config/tc-mips.c @@ -13508,7 +13508,7 @@ s_mips_file (int x ATTRIBUTE_UNUSED) if (filename != NULL && ! first_file_directive) { (void) new_logical_line (filename, -1); - s_app_file_string (filename); + s_app_file_string (filename, 0); } first_file_directive = 1; } diff --git a/gas/obj.h b/gas/obj.h index 497524ac04..6b63dcd4aa 100644 --- a/gas/obj.h +++ b/gas/obj.h @@ -51,7 +51,7 @@ struct format_ops { unsigned dfl_leading_underscore : 1; unsigned emit_section_symbols : 1; void (*begin) (void); - void (*app_file) (const char *); + void (*app_file) (const char *, int); void (*frob_symbol) (symbolS *, int *); void (*frob_file) (void); void (*frob_file_before_adjust) (void); diff --git a/gas/read.c b/gas/read.c index e1f7a2f87a..00fd38a340 100644 --- a/gas/read.c +++ b/gas/read.c @@ -1570,7 +1570,7 @@ s_data (int ignore ATTRIBUTE_UNUSED) .file. */ void -s_app_file_string (char *file) +s_app_file_string (char *file, int appfile) { #ifdef LISTING if (listing) @@ -1578,7 +1578,7 @@ s_app_file_string (char *file) #endif register_dependency (file); #ifdef obj_app_file - obj_app_file (file); + obj_app_file (file, appfile); #endif } @@ -1606,7 +1606,7 @@ s_app_file (int appfile) demand_empty_rest_of_line (); if (!may_omit) - s_app_file_string (s); + s_app_file_string (s, appfile); } } diff --git a/gas/read.h b/gas/read.h index b89ffcb4fb..35c810b990 100644 --- a/gas/read.h +++ b/gas/read.h @@ -139,7 +139,7 @@ extern void bss_alloc (symbolS *, addressT, int); extern offsetT parse_align (int); extern symbolS *s_comm_internal (int, symbolS *(*) (int, symbolS *, addressT)); extern symbolS *s_lcomm_internal (int, symbolS *, addressT); -extern void s_app_file_string (char *); +extern void s_app_file_string (char *, int); extern void s_app_file (int); extern void s_app_line (int); extern void s_bad_endr (int);