diff options
author | Jan Beulich <jbeulich@suse.com> | 2022-04-12 09:04:15 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2022-04-12 09:04:15 +0200 |
commit | c39e89c3aaa3a6790f85e80f2da5022bc4bce38b (patch) | |
tree | 075b73ce63b3483c6f6a0756479e1d45011040a0 /gas/config | |
parent | 657edeab3857130ddc005a88104711dd9e339ff0 (diff) | |
download | gdb-c39e89c3aaa3a6790f85e80f2da5022bc4bce38b.zip gdb-c39e89c3aaa3a6790f85e80f2da5022bc4bce38b.tar.gz gdb-c39e89c3aaa3a6790f85e80f2da5022bc4bce38b.tar.bz2 |
gas: drop .appfile and .appline
These were used originally to represent "# <line> <file>" constructs
inserted by (typically) compilers when pre-processing. Quite some time
ago they were replaced by .linefile though. Since the original
directives were never documented, we ought to be able to remove support
for them. As a result in a number of case function parameter aren't used
anymore and can hence be dropped.
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/obj-coff.c | 18 | ||||
-rw-r--r-- | gas/config/obj-coff.h | 7 | ||||
-rw-r--r-- | gas/config/obj-ecoff.h | 2 | ||||
-rw-r--r-- | gas/config/obj-elf.c | 48 | ||||
-rw-r--r-- | gas/config/obj-elf.h | 2 | ||||
-rw-r--r-- | gas/config/obj-multi.h | 4 | ||||
-rw-r--r-- | gas/config/tc-mips.c | 4 | ||||
-rw-r--r-- | gas/config/tc-ppc.c | 2 | ||||
-rw-r--r-- | gas/config/tc-tic54x.c | 2 | ||||
-rw-r--r-- | gas/config/tc-z8k.c | 2 |
10 files changed, 38 insertions, 53 deletions
diff --git a/gas/config/obj-coff.c b/gas/config/obj-coff.c index 1924524..98c39e4 100644 --- a/gas/config/obj-coff.c +++ b/gas/config/obj-coff.c @@ -316,7 +316,7 @@ c_symbol_merge (symbolS *debug, symbolS *normal) } void -c_dot_file_symbol (const char *filename, int appfile ATTRIBUTE_UNUSED) +c_dot_file_symbol (const char *filename) { symbolS *symbolP; @@ -447,11 +447,11 @@ coff_add_linesym (symbolS *sym) } static void -obj_coff_ln (int appline) +obj_coff_ln (int ignore ATTRIBUTE_UNUSED) { int l; - if (! appline && def_symbol_in_progress != NULL) + if (def_symbol_in_progress != NULL) { as_warn (_(".ln pseudo-op inside .def/.endef: ignored.")); demand_empty_rest_of_line (); @@ -460,9 +460,9 @@ obj_coff_ln (int appline) l = get_absolute_expression (); - /* If there is no lineno symbol, treat a .ln - directive as if it were a .appline directive. */ - if (appline || current_lineno_sym == NULL) + /* If there is no lineno symbol, treat a .ln directive + as if it were a (no longer existing) .appline one. */ + if (current_lineno_sym == NULL) new_logical_line ((char *) NULL, l - 1); else add_lineno (frag_now, frag_now_fix (), l); @@ -473,8 +473,7 @@ obj_coff_ln (int appline) if (listing) { - if (! appline) - l += coff_line_base - 1; + l += coff_line_base - 1; listing_source_line (l); } } @@ -1705,7 +1704,7 @@ coff_adjust_symtab (void) { if (symbol_rootP == NULL || S_GET_STORAGE_CLASS (symbol_rootP) != C_FILE) - c_dot_file_symbol ("fake", 0); + c_dot_file_symbol ("fake"); } void @@ -1849,7 +1848,6 @@ symbol_dump (void) const pseudo_typeS coff_pseudo_table[] = { {"ABORT", s_abort, 0}, - {"appline", obj_coff_ln, 1}, /* We accept the .bss directive for backward compatibility with earlier versions of gas. */ {"bss", obj_coff_bss, 0}, diff --git a/gas/config/obj-coff.h b/gas/config/obj-coff.h index 1892b8a..34680bd 100644 --- a/gas/config/obj-coff.h +++ b/gas/config/obj-coff.h @@ -249,7 +249,7 @@ extern int coff_n_line_nos; extern symbolS *coff_last_function; #define obj_emit_lineno(WHERE, LINE, FILE_START) abort () -#define obj_app_file(name, app) c_dot_file_symbol (name, app) +#define obj_app_file(name) c_dot_file_symbol (name) #define obj_frob_symbol(S,P) coff_frob_symbol (S, & P) #define obj_frob_section(S) coff_frob_section (S) #define obj_frob_file_after_relocs() coff_frob_file_after_relocs () @@ -315,14 +315,12 @@ extern const pseudo_typeS coff_pseudo_table[]; SA_SET_SCN_NRELOC (section_symbol (sec), n) #endif -#define obj_app_file(name, app) c_dot_file_symbol (name, app) - extern int S_SET_DATA_TYPE (symbolS *, int); extern int S_SET_STORAGE_CLASS (symbolS *, int); extern int S_GET_STORAGE_CLASS (symbolS *); extern void SA_SET_SYM_ENDNDX (symbolS *, symbolS *); extern void coff_add_linesym (symbolS *); -extern void c_dot_file_symbol (const char *, int); +extern void c_dot_file_symbol (const char *); extern void coff_frob_symbol (symbolS *, int *); extern void coff_adjust_symtab (void); extern void coff_frob_section (segT); @@ -338,7 +336,6 @@ extern void pecoff_obj_clear_weak_hook (symbolS *); extern void obj_coff_section (int); extern segT obj_coff_add_segment (const char *); extern void obj_coff_section (int); -extern void c_dot_file_symbol (const char *, int); extern segT s_get_segment (symbolS *); #ifndef tc_coff_symbol_emit_hook extern void tc_coff_symbol_emit_hook (symbolS *); diff --git a/gas/config/obj-ecoff.h b/gas/config/obj-ecoff.h index 2cd7e9b..06e002c 100644 --- a/gas/config/obj-ecoff.h +++ b/gas/config/obj-ecoff.h @@ -61,7 +61,7 @@ struct ecoff_sy_obj #define obj_symbol_clone_hook ecoff_symbol_clone_hook /* Record file switches in the ECOFF symbol table. */ -#define obj_app_file(name, app) ecoff_new_file (name, app) +#define obj_app_file(name) 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 b218ff6..c02d26b 100644 --- a/gas/config/obj-elf.c +++ b/gas/config/obj-elf.c @@ -258,46 +258,36 @@ elf_sec_sym_ok_for_reloc (asection *sec) } void -elf_file_symbol (const char *s, int appfile) +elf_file_symbol (const char *s) { asymbol *bsym; + symbolS *sym = symbol_new (s, absolute_section, &zero_address_frag, 0); + size_t name_length = strlen (s); - if (!appfile - || symbol_rootP == NULL - || (bsym = symbol_get_bfdsym (symbol_rootP)) == NULL - || (bsym->flags & BSF_FILE) == 0) + if (name_length > strlen (S_GET_NAME (sym))) { - symbolS *sym; - size_t name_length; - - sym = symbol_new (s, absolute_section, &zero_address_frag, 0); - - name_length = strlen (s); - if (name_length > strlen (S_GET_NAME (sym))) - { - obstack_grow (¬es, s, name_length + 1); - S_SET_NAME (sym, (const char *) obstack_finish (¬es)); - } - else - strcpy ((char *) S_GET_NAME (sym), s); + obstack_grow (¬es, s, name_length + 1); + S_SET_NAME (sym, (const char *) obstack_finish (¬es)); + } + else + strcpy ((char *) S_GET_NAME (sym), s); - symbol_get_bfdsym (sym)->flags |= BSF_FILE; + symbol_get_bfdsym (sym)->flags |= BSF_FILE; - if (symbol_rootP != sym - && ((bsym = symbol_get_bfdsym (symbol_rootP)) == NULL - || (bsym->flags & BSF_FILE) == 0)) - { - symbol_remove (sym, &symbol_rootP, &symbol_lastP); - symbol_insert (sym, symbol_rootP, &symbol_rootP, &symbol_lastP); - } + if (symbol_rootP != sym + && ((bsym = symbol_get_bfdsym (symbol_rootP)) == NULL + || (bsym->flags & BSF_FILE) == 0)) + { + 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 - ecoff_new_file (s, appfile); + ecoff_new_file (s); #endif } diff --git a/gas/config/obj-elf.h b/gas/config/obj-elf.h index e2941bf..2b9d28c 100644 --- a/gas/config/obj-elf.h +++ b/gas/config/obj-elf.h @@ -180,7 +180,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 *, int); +extern void elf_file_symbol (const char *); extern void obj_elf_section_change_hook (void); diff --git a/gas/config/obj-multi.h b/gas/config/obj-multi.h index a933d599..0d56b4a 100644 --- a/gas/config/obj-multi.h +++ b/gas/config/obj-multi.h @@ -36,9 +36,9 @@ ? (*this_format->begin) () \ : (void) 0) -#define obj_app_file(NAME, APPFILE) \ +#define obj_app_file(NAME) \ (this_format->app_file \ - ? (*this_format->app_file) (NAME, APPFILE) \ + ? (*this_format->app_file) (NAME) \ : (void) 0) #define obj_frob_symbol(S,P) \ diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index f632e94..ae7a443 100644 --- a/gas/config/tc-mips.c +++ b/gas/config/tc-mips.c @@ -19723,7 +19723,7 @@ s_mips_file (int x ATTRIBUTE_UNUSED) if (ECOFF_DEBUGGING) { get_number (); - s_app_file (0); + s_file (0); } else { @@ -19738,7 +19738,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, 0); + s_file_string (filename); } first_file_directive = 1; } diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c index 1aa5fcc..72128af 100644 --- a/gas/config/tc-ppc.c +++ b/gas/config/tc-ppc.c @@ -5194,7 +5194,7 @@ ppc_file (int ignore ATTRIBUTE_UNUSED) } /* Use coff dot_file creation and adjust auxiliary entries. */ - c_dot_file_symbol (sfname, 0); + c_dot_file_symbol (sfname); S_SET_NUMBER_AUXILIARY (symbol_rootP, auxnb); coffsym = coffsymbol (symbol_get_bfdsym (symbol_rootP)); coffsym->native[1].u.auxent.x_file.x_ftype = XFT_FN; diff --git a/gas/config/tc-tic54x.c b/gas/config/tc-tic54x.c index 6070477..dc8cc1d 100644 --- a/gas/config/tc-tic54x.c +++ b/gas/config/tc-tic54x.c @@ -4966,7 +4966,7 @@ tic54x_adjust_symtab (void) { unsigned lineno; const char * filename = as_where (&lineno); - c_dot_file_symbol (filename, 0); + c_dot_file_symbol (filename); } } diff --git a/gas/config/tc-z8k.c b/gas/config/tc-z8k.c index 0c25576..5fef657 100644 --- a/gas/config/tc-z8k.c +++ b/gas/config/tc-z8k.c @@ -116,7 +116,7 @@ const pseudo_typeS md_pseudo_table[] = { {"segm" , s_segm , 1}, {"unsegm" , s_segm , 0}, {"unseg" , s_segm , 0}, - {"name" , s_app_file , 0}, + {"name" , s_file , 0}, {"global" , s_globl , 0}, {"wval" , cons , 2}, {"lval" , cons , 4}, |