From: Ian Lance Taylor Date: Tue, 31 Oct 1995 19:16:02 +0000 (+0000) Subject: * config/tc-ppc.c (md_pseudo_table): Add "bc" and "ec". X-Git-Tag: gdb-4_18~10336 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=31751d9d3ef22c725e7122b052ec29118f692ef8;p=platform%2Fupstream%2Fbinutils.git * config/tc-ppc.c (md_pseudo_table): Add "bc" and "ec". (ppc_stab_symbol): New static variable. (ppc_change_csect): Check that ppc_toc_csect is not NULL. (ppc_stabx): Set ppc_stab_symbol around call to symbol_make. Set sy_tc.real_name to the stab string. (ppc_bc, ppc_ec): New static functions. (ppc_canonicalize_symbol_name): If ppc_stab_symbol is set, don't do anything. (ppc_symbol_new_hook): If ppc_stab_symbol is set, don't look for a suffix. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index 1924023..79888c9 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,16 @@ Tue Oct 31 13:29:08 1995 Ian Lance Taylor + * config/tc-ppc.c (md_pseudo_table): Add "bc" and "ec". + (ppc_stab_symbol): New static variable. + (ppc_change_csect): Check that ppc_toc_csect is not NULL. + (ppc_stabx): Set ppc_stab_symbol around call to symbol_make. Set + sy_tc.real_name to the stab string. + (ppc_bc, ppc_ec): New static functions. + (ppc_canonicalize_symbol_name): If ppc_stab_symbol is set, don't + do anything. + (ppc_symbol_new_hook): If ppc_stab_symbol is set, don't look for a + suffix. + * input-scrub.c (input_scrub_push): Reset sb_index. Mon Oct 30 17:52:46 1995 Ian Lance Taylor diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c index 773ea5c..534c754 100644 --- a/gas/config/tc-ppc.c +++ b/gas/config/tc-ppc.c @@ -53,10 +53,12 @@ static void ppc_tc PARAMS ((int)); #ifdef OBJ_XCOFF static void ppc_comm PARAMS ((int)); static void ppc_bb PARAMS ((int)); +static void ppc_bc PARAMS ((int)); static void ppc_bf PARAMS ((int)); static void ppc_biei PARAMS ((int)); static void ppc_bs PARAMS ((int)); static void ppc_eb PARAMS ((int)); +static void ppc_ec PARAMS ((int)); static void ppc_ef PARAMS ((int)); static void ppc_es PARAMS ((int)); static void ppc_csect PARAMS ((int)); @@ -127,12 +129,14 @@ const pseudo_typeS md_pseudo_table[] = { "comm", ppc_comm, 0 }, { "lcomm", ppc_comm, 1 }, { "bb", ppc_bb, 0 }, + { "bc", ppc_bc, 0 }, { "bf", ppc_bf, 0 }, { "bi", ppc_biei, 0 }, { "bs", ppc_bs, 0 }, { "csect", ppc_csect, 0 }, { "data", ppc_section, 'd' }, { "eb", ppc_eb, 0 }, + { "ec", ppc_ec, 0 }, { "ef", ppc_ef, 0 }, { "ei", ppc_biei, 1 }, { "es", ppc_es, 0 }, @@ -1769,6 +1773,10 @@ ppc_byte (ignore) /* XCOFF specific pseudo-op handling. */ +/* This is set if we are creating a .stabx symbol, since we don't want + to handle symbol suffixes for such symbols. */ +static boolean ppc_stab_symbol; + /* The .comm and .lcomm pseudo-ops for XCOFF. XCOFF puts common symbols in the .bss segment as though they were local common symbols, and uses a different smclas. */ @@ -1998,7 +2006,8 @@ ppc_change_csect (sym) case XMC_UA: case XMC_BS: case XMC_UC: - if (ppc_toc_csect->sy_tc.subseg + 1 == ppc_data_subsegment) + if (ppc_toc_csect != NULL + && ppc_toc_csect->sy_tc.subseg + 1 == ppc_data_subsegment) after_toc = 1; S_SET_SEGMENT (sym, data_section); sym->sy_tc.subseg = ppc_data_subsegment; @@ -2145,7 +2154,11 @@ ppc_stabx (ignore) } ++input_line_pointer; + ppc_stab_symbol = true; sym = symbol_make (name); + ppc_stab_symbol = false; + + sym->sy_tc.real_name = name; (void) expression (&exp); @@ -2530,6 +2543,53 @@ ppc_eb (ignore) demand_empty_rest_of_line (); } +/* The .bc pseudo-op. This just creates a C_BCOMM symbol with a + specified name. */ + +static void +ppc_bc (ignore) + int ignore; +{ + char *name; + int len; + symbolS *sym; + + name = demand_copy_C_string (&len); + sym = symbol_make (name); + S_SET_SEGMENT (sym, ppc_coff_debug_section); + sym->bsym->flags |= BSF_DEBUGGING; + S_SET_STORAGE_CLASS (sym, C_BCOMM); + S_SET_VALUE (sym, 0); + sym->sy_tc.output = 1; + + ppc_frob_label (sym); + + if (strlen (name) > SYMNMLEN) + ppc_debug_name_section_size += strlen (name) + 3; + + demand_empty_rest_of_line (); +} + +/* The .ec pseudo-op. This just creates a C_ECOMM symbol. */ + +static void +ppc_ec (ignore) + int ignore; +{ + symbolS *sym; + + sym = symbol_make (".ec"); + S_SET_SEGMENT (sym, ppc_coff_debug_section); + sym->bsym->flags |= BSF_DEBUGGING; + S_SET_STORAGE_CLASS (sym, C_ECOMM); + S_SET_VALUE (sym, 0); + sym->sy_tc.output = 1; + + ppc_frob_label (sym); + + demand_empty_rest_of_line (); +} + /* The .toc pseudo-op. Switch to the .toc subsegment. */ static void @@ -3264,6 +3324,9 @@ ppc_canonicalize_symbol_name (name) { char *s; + if (ppc_stab_symbol) + return name; + for (s = name; *s != '\0' && *s != '{' && *s != '['; s++) ; if (*s != '\0') @@ -3309,6 +3372,9 @@ ppc_symbol_new_hook (sym) sym->sy_tc.size = NULL; sym->sy_tc.within = NULL; + if (ppc_stab_symbol) + return; + s = strchr (S_GET_NAME (sym), '['); if (s == (const char *) NULL) {