X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gas%2Fecoff.c;h=08bfee1fc5c6412934ae1ecd40e1ebbf8078b509;hb=fe7d6a8db01f2a71520578267df7cd2d780ececb;hp=608d72b7e0d496cc7504300e0a2f55d112df65de;hpb=5ff6a06c215a5288787decfb933591afb5aa434d;p=deliverable%2Fbinutils-gdb.git diff --git a/gas/ecoff.c b/gas/ecoff.c index 608d72b7e0..08bfee1fc5 100644 --- a/gas/ecoff.c +++ b/gas/ecoff.c @@ -1,5 +1,5 @@ /* ECOFF debugging support. - Copyright (C) 1993-2017 Free Software Foundation, Inc. + Copyright (C) 1993-2020 Free Software Foundation, Inc. Contributed by Cygnus Support. This file was put together by Ian Lance Taylor . A good deal of it comes directly from mips-tfile.c, by Michael @@ -618,7 +618,7 @@ #26 48 0x00000030 struct no name { ifd = -1, index = 1048575 } */ -/* Redefinition of of storage classes as an enumeration for better +/* Redefinition of storage classes as an enumeration for better debugging. */ typedef enum sc { @@ -2227,7 +2227,7 @@ add_file (const char *file_name, int indx ATTRIBUTE_UNUSED, int fake) if (stabs_seen) { (void) add_ecoff_symbol (file_name, st_Nil, sc_Nil, - symbol_new ("L0\001", now_seg, + symbol_new (FAKE_LABEL_NAME, now_seg, (valueT) frag_now_fix (), frag_now), (bfd_vma) 0, 0, ECOFF_MARK_STAB (N_SOL)); @@ -2526,10 +2526,8 @@ ecoff_directive_def (int ignore ATTRIBUTE_UNUSED) as_warn (_("empty symbol name in .def; ignored")); else { - if (coff_sym_name != (char *) NULL) - free (coff_sym_name); - if (coff_tag != (char *) NULL) - free (coff_tag); + free (coff_sym_name); + free (coff_tag); coff_sym_name = xstrdup (name); coff_type = type_info_init; @@ -3020,7 +3018,7 @@ ecoff_directive_end (int ignore ATTRIBUTE_UNUSED) as_warn (_(".end directive names unknown symbol")); else (void) add_ecoff_symbol ((const char *) NULL, st_End, sc_Text, - symbol_new ("L0\001", now_seg, + symbol_new (FAKE_LABEL_NAME, now_seg, (valueT) frag_now_fix (), frag_now), (bfd_vma) 0, (symint_t) 0, (symint_t) 0); @@ -3264,7 +3262,7 @@ ecoff_directive_loc (int ignore ATTRIBUTE_UNUSED) if (stabs_seen) { (void) add_ecoff_symbol ((char *) NULL, st_Label, sc_Text, - symbol_new ("L0\001", now_seg, + symbol_new (FAKE_LABEL_NAME, now_seg, (valueT) frag_now_fix (), frag_now), (bfd_vma) 0, 0, lineno); @@ -3700,8 +3698,7 @@ ecoff_build_lineno (const struct ecoff_debug_swap *backend, && first_proc_ptr != (proc_t *) NULL && local_first_lineno != (lineno_list_t *) NULL && ((S_GET_VALUE (first_proc_ptr->sym->as_sym) - + bfd_get_section_vma (stdoutput, - S_GET_SEGMENT (first_proc_ptr->sym->as_sym))) + + bfd_section_vma (S_GET_SEGMENT (first_proc_ptr->sym->as_sym))) != 0)) { first.file = local_first_lineno->file; @@ -3981,8 +3978,7 @@ ecoff_build_symbols (const struct ecoff_debug_swap *backend, else sym_ptr->ecoff_sym.asym.value = (S_GET_VALUE (as_sym) - + bfd_get_section_vma (stdoutput, - S_GET_SEGMENT (as_sym)) + + bfd_section_vma (S_GET_SEGMENT (as_sym)) + sym_ptr->addend); sym_ptr->ecoff_sym.weakext = S_IS_WEAK (as_sym); @@ -4104,10 +4100,10 @@ ecoff_build_symbols (const struct ecoff_debug_swap *backend, /* If an st_end symbol has an associated gas symbol, then it is a local label created for a .bend or .end directive. Stabs line - numbers will have \001 in the names. */ + numbers will have FAKE_LABEL_CHAR in the names. */ if (local && sym_ptr->ecoff_sym.asym.st != st_End - && strchr (sym_ptr->name, '\001') == 0) + && strchr (sym_ptr->name, FAKE_LABEL_CHAR) == 0) sym_ptr->ecoff_sym.asym.iss = add_string (&fil_ptr->strings, fil_ptr->str_hash, @@ -4310,8 +4306,7 @@ ecoff_build_procs (const struct ecoff_debug_swap *backend, adr_sym = proc_ptr->sym->as_sym; adr = (S_GET_VALUE (adr_sym) - + bfd_get_section_vma (stdoutput, - S_GET_SEGMENT (adr_sym))); + + bfd_section_vma (S_GET_SEGMENT (adr_sym))); if (first) { /* This code used to force the adr of the very