gas/
authorJan Beulich <jbeulich@novell.com>
Tue, 19 Apr 2005 15:05:09 +0000 (15:05 +0000)
committerJan Beulich <jbeulich@novell.com>
Tue, 19 Apr 2005 15:05:09 +0000 (15:05 +0000)
2005-04-19  Jan Beulich  <jbeulich@novell.com>

* symbols.h (symbol_find_base): Remove prototype.
* symbols.c (save_symbol_name): Remove code section conditional upon
STRIP_UNDERSCORE.
(symbol_find): Remove.
(symbol_find_base): Rename to symbol_find.
* subsegs.c (section_symbol): Replace use of symbol_find_base with
symbol_find.
* config/obj-coff.c (tag_insert): Remove code section conditional
upon STRIP_UNDERSCORE.
(obj_coff_def): Likewise.
(obj_coff_endef): Replace use of symbol_find_base with symbol_find.
(coff_frob_symbol): Likewise.
(yank_symbols): Likewise.
(c_section_symbol): Likewise.
* config/obj-coff.h (DO_NOT_STRIP): Remove.
* config/tc-arm.c (symbol_locate): Remove code section conditional
upon STRIP_UNDERSCORE.
* config/tc-h8300.h (DO_NOT_STRIP): Remove.
* config/tc-h8500.h (DO_NOT_STRIP): Remove.
* config/tc-sh.h (DO_NOT_STRIP): Remove.
* config/tc-w65.h (DO_NOT_STRIP): Remove.
* config/tc-z8k.h (DO_NOT_STRIP): Remove.

12 files changed:
gas/ChangeLog
gas/config/obj-coff.c
gas/config/obj-coff.h
gas/config/tc-arm.c
gas/config/tc-h8300.h
gas/config/tc-h8500.h
gas/config/tc-sh.h
gas/config/tc-w65.h
gas/config/tc-z8k.h
gas/subsegs.c
gas/symbols.c
gas/symbols.h

index cb282e91403ca88c9d7c4af747363a951a1885f7..eb5169716bf80f431ec60de24dc8cc2ecf1e0e29 100644 (file)
@@ -1,3 +1,28 @@
+2005-04-19  Jan Beulich  <jbeulich@novell.com>
+
+       * symbols.h (symbol_find_base): Remove prototype.
+       * symbols.c (save_symbol_name): Remove code section conditional upon
+       STRIP_UNDERSCORE.
+       (symbol_find): Remove.
+       (symbol_find_base): Rename to symbol_find.
+       * subsegs.c (section_symbol): Replace use of symbol_find_base with
+       symbol_find.
+       * config/obj-coff.c (tag_insert): Remove code section conditional
+       upon STRIP_UNDERSCORE.
+       (obj_coff_def): Likewise.
+       (obj_coff_endef): Replace use of symbol_find_base with symbol_find.
+       (coff_frob_symbol): Likewise.
+       (yank_symbols): Likewise.
+       (c_section_symbol): Likewise.
+       * config/obj-coff.h (DO_NOT_STRIP): Remove.
+       * config/tc-arm.c (symbol_locate): Remove code section conditional
+       upon STRIP_UNDERSCORE.
+       * config/tc-h8300.h (DO_NOT_STRIP): Remove.
+       * config/tc-h8500.h (DO_NOT_STRIP): Remove.
+       * config/tc-sh.h (DO_NOT_STRIP): Remove.
+       * config/tc-w65.h (DO_NOT_STRIP): Remove.
+       * config/tc-z8k.h (DO_NOT_STRIP): Remove.
+
 2005-04-19  Andreas Schwab  <schwab@suse.de>
 
        * config/tc-ia64.c (md_assemble): Fix error message for wrong
index 922caed68d9d0dbe91b8c32412376bbe1dcea86d..b00275ed9df8f1c572ba6adc79365654b4e21783 100644 (file)
@@ -137,10 +137,6 @@ tag_insert (const char *name, symbolS *symbolP)
 static symbolS *
 tag_find (char *name)
 {
-#ifdef STRIP_UNDERSCORE
-  if (*name == '_')
-    name++;
-#endif /* STRIP_UNDERSCORE */
   return (symbolS *) hash_find (tag_hash, name);
 }
 
@@ -529,11 +525,6 @@ obj_coff_def (int what ATTRIBUTE_UNUSED)
   SKIP_WHITESPACES ();
 
   symbol_name = input_line_pointer;
-#ifdef STRIP_UNDERSCORE
-  if (symbol_name[0] == '_' && symbol_name[1] != 0)
-    symbol_name++;
-#endif
-
   name_end = get_symbol_end ();
   symbol_name_length = strlen (symbol_name);
   symbol_name_copy = xmalloc (symbol_name_length + 1);
@@ -723,8 +714,7 @@ obj_coff_endef (int ignore ATTRIBUTE_UNUSED)
          && !SF_GET_TAG (def_symbol_in_progress))
       || S_GET_SEGMENT (def_symbol_in_progress) == absolute_section
       || ! symbol_constant_p (def_symbol_in_progress)
-      || (symbolP = symbol_find_base (S_GET_NAME (def_symbol_in_progress),
-                                     DO_NOT_STRIP)) == NULL
+      || (symbolP = symbol_find (S_GET_NAME (def_symbol_in_progress))) == NULL
       || SF_GET_TAG (def_symbol_in_progress) != SF_GET_TAG (symbolP))
     {
       /* If it already is at the end of the symbol list, do nothing */
@@ -771,8 +761,7 @@ obj_coff_endef (int ignore ATTRIBUTE_UNUSED)
     {
       symbolS *oldtag;
 
-      oldtag = symbol_find_base (S_GET_NAME (def_symbol_in_progress),
-                                DO_NOT_STRIP);
+      oldtag = symbol_find (S_GET_NAME (def_symbol_in_progress));
       if (oldtag == NULL || ! SF_GET_TAG (oldtag))
        tag_insert (S_GET_NAME (def_symbol_in_progress),
                    def_symbol_in_progress);
@@ -1245,7 +1234,7 @@ coff_frob_symbol (symbolS *symp, int *punt)
          && !SF_GET_STATICS (symp)
          && S_GET_STORAGE_CLASS (symp) != C_LABEL
          && symbol_constant_p (symp)
-         && (real = symbol_find_base (S_GET_NAME (symp), DO_NOT_STRIP))
+         && (real = symbol_find (S_GET_NAME (symp)))
          && S_GET_STORAGE_CLASS (real) == C_NULL
          && real != symp)
        {
@@ -2453,13 +2442,7 @@ obj_coff_def (int what ATTRIBUTE_UNUSED)
 #endif
 
   /* Initialize the new symbol.  */
-#ifdef STRIP_UNDERSCORE
-  S_SET_NAME (def_symbol_in_progress, (*symbol_name_copy == '_'
-                                      ? symbol_name_copy + 1
-                                      : symbol_name_copy));
-#else /* STRIP_UNDERSCORE */
   S_SET_NAME (def_symbol_in_progress, symbol_name_copy);
-#endif /* STRIP_UNDERSCORE */
   /* free(symbol_name_copy); */
   def_symbol_in_progress->sy_name_offset = (unsigned long) ~0;
   def_symbol_in_progress->sy_number = ~0;
@@ -2611,7 +2594,7 @@ obj_coff_endef (int ignore ATTRIBUTE_UNUSED)
          && !SF_GET_TAG (def_symbol_in_progress))
       || S_GET_SEGMENT (def_symbol_in_progress) == absolute_section
       || def_symbol_in_progress->sy_value.X_op != O_constant
-      || (symbolP = symbol_find_base (S_GET_NAME (def_symbol_in_progress), DO_NOT_STRIP)) == NULL
+      || (symbolP = symbol_find (S_GET_NAME (def_symbol_in_progress))) == NULL
       || (SF_GET_TAG (def_symbol_in_progress) != SF_GET_TAG (symbolP)))
     {
       symbol_append (def_symbol_in_progress, symbol_lastP, &symbol_rootP,
@@ -2654,8 +2637,7 @@ obj_coff_endef (int ignore ATTRIBUTE_UNUSED)
     {
       symbolS *oldtag;
 
-      oldtag = symbol_find_base (S_GET_NAME (def_symbol_in_progress),
-                                DO_NOT_STRIP);
+      oldtag = symbol_find (S_GET_NAME (def_symbol_in_progress));
       if (oldtag == NULL || ! SF_GET_TAG (oldtag))
        tag_insert (S_GET_NAME (def_symbol_in_progress),
                    def_symbol_in_progress);
@@ -2977,7 +2959,7 @@ yank_symbols (void)
              && !SF_GET_STATICS (symbolP)
              && S_GET_STORAGE_CLASS (symbolP) != C_LABEL
              && symbolP->sy_value.X_op == O_constant
-             && (real_symbolP = symbol_find_base (S_GET_NAME (symbolP), DO_NOT_STRIP))
+             && (real_symbolP = symbol_find (S_GET_NAME (symbolP)))
              && real_symbolP != symbolP)
            {
              /* FIXME-SOON: where do dups come from?
@@ -3240,7 +3222,7 @@ c_section_symbol (char *name, int idx)
 {
   symbolS *symbolP;
 
-  symbolP = symbol_find_base (name, DO_NOT_STRIP);
+  symbolP = symbol_find (name);
   if (symbolP == NULL)
     symbolP = symbol_new (name, idx, 0, &zero_address_frag);
   else
index 18fabae197de56e9f3010d6ce91f0b964ada673f..c6819a202ddd6133ab0acdedd9c857088d317a15 100644 (file)
 #define SYM_AUXINFO(S) \
   (&coffsymbol (symbol_get_bfdsym (S))->native[1])
 
-#define DO_NOT_STRIP   0
-
 /* The number of auxiliary entries.  */
 #define S_GET_NUMBER_AUXILIARY(s) \
   (coffsymbol (symbol_get_bfdsym (s))->native->u.syment.n_numaux)
@@ -453,9 +451,6 @@ typedef struct
   unsigned int ost_flags;
 } obj_symbol_type;
 
-#ifndef DO_NOT_STRIP
-#define DO_NOT_STRIP   0
-#endif
 /* Symbol table macros and constants.  */
 
 /* Possible and useful section number in symbol table
index 298468fd01d5bd630f84436b1b9ce4e8f89500a9..6c58040a9f61338014e5816c5a9912f08db7b91d 100644 (file)
@@ -1137,10 +1137,6 @@ symbol_locate (symbolS *    symbolP,
   name_length = strlen (name) + 1;   /* +1 for \0.  */
   obstack_grow (&notes, name, name_length);
   preserved_copy_of_name = obstack_finish (&notes);
-#ifdef STRIP_UNDERSCORE
-  if (preserved_copy_of_name[0] == '_')
-    preserved_copy_of_name++;
-#endif
 
 #ifdef tc_canonicalize_symbol_name
   preserved_copy_of_name =
index 720e03a195c667cf9a346ca23ca226aa77cb7e7c..71c4e29f229399bcba14ca8adebb176a522b5ef6 100644 (file)
@@ -88,7 +88,6 @@ extern void tc_reloc_mangle (struct fix *, struct internal_reloc *, bfd_vma);
 
 #define TC_CONS_RELOC          (Hmode ? R_RELLONG: R_RELWORD)
 
-#define DO_NOT_STRIP 0
 #define LISTING_HEADER "Renesas H8/300 GAS "
 #define NEED_FX_R_TYPE 1
 #ifndef OBJ_ELF
index e305bd689c98e222c6cf70fd3509fb6396cafc0e..88121fca5c407233c8c65ecb95dff5ee5d2111f2 100644 (file)
@@ -41,7 +41,6 @@ struct internal_reloc;
 extern void tc_reloc_mangle
   (struct fix *, struct internal_reloc *, bfd_vma);
 
-#define DO_NOT_STRIP 0
 #define LISTING_HEADER "Renesas H8/500 GAS "
 #define NEED_FX_R_TYPE 1
 #define RELOC_32 1234
index a2df0ca630766a5100e291eb71471049ec1db830..d0b5002161f3e8dc589c148dcfbe0187a0f411c2 100644 (file)
@@ -135,8 +135,6 @@ extern void sh_frob_file (void);
 #ifdef OBJ_COFF
 /* COFF specific definitions.  */
 
-#define DO_NOT_STRIP 0
-
 /* This macro translates between an internal fix and a coff reloc type.  */
 #define TC_COFF_FIX2RTYPE(fix) ((fix)->fx_r_type)
 
index dadd07d9ed349922c1c6278b73fb3279d361d1e1..f3164b70b4752ced54bca6c910d63b835419025a 100644 (file)
@@ -41,7 +41,6 @@ struct fix;
 #define TC_RELOC_MANGLE(s,a,b,c) tc_reloc_mangle (a,b,c)
 extern void tc_reloc_mangle (struct fix *, struct internal_reloc *, bfd_vma);
 
-#define DO_NOT_STRIP 0
 #define LISTING_HEADER "W65816 GAS "
 #define NEED_FX_R_TYPE 1
 #define RELOC_32 1234
index 90a76d8cfb37f71b13325e1d706ad985385bf93b..ad3c8e646700c04ea7f8e7e8e50fd008e5a71eb6 100644 (file)
@@ -44,7 +44,6 @@ struct internal_reloc;
 extern void tc_reloc_mangle
   PARAMS ((struct fix *, struct internal_reloc *, bfd_vma));
 
-#define DO_NOT_STRIP 0
 #define LISTING_HEADER "Zilog Z8000 GAS "
 #define NEED_FX_R_TYPE 1
 #define RELOC_32 1234
index e9ed688f8d9cd0bd962ee1bab05183366787a3cf..7e4f19c8c306f47f3dc9dcb138113ae3f40e4b12 100644 (file)
@@ -524,7 +524,7 @@ section_symbol (segT sec)
   else
     {
       segT seg;
-      s = symbol_find_base (sec->symbol->name, 0);
+      s = symbol_find (sec->symbol->name);
       /* We have to make sure it is the right symbol when we
         have multiple sections with the same section name.  */
       if (s == NULL
index 002ae359a43af9dc1b61a3921451a995591c715f..a7f05812922dabb84c4dca777fd0dcea478193d1 100644 (file)
@@ -113,11 +113,6 @@ save_symbol_name (const char *name)
   obstack_grow (&notes, name, name_length);
   ret = obstack_finish (&notes);
 
-#ifdef STRIP_UNDERSCORE
-  if (ret[0] == '_')
-    ++ret;
-#endif
-
 #ifdef tc_canonicalize_symbol_name
   ret = tc_canonicalize_symbol_name (ret);
 #endif
@@ -599,16 +594,6 @@ symbol_temp_make (void)
    Out:        NULL if the name was not in the symbol table, else the address
    of a struct symbol associated with that name.  */
 
-symbolS *
-symbol_find (const char *name)
-{
-#ifdef STRIP_UNDERSCORE
-  return (symbol_find_base (name, 1));
-#else /* STRIP_UNDERSCORE */
-  return (symbol_find_base (name, 0));
-#endif /* STRIP_UNDERSCORE */
-}
-
 symbolS *
 symbol_find_exact (const char *name)
 {
@@ -626,11 +611,8 @@ symbol_find_exact (const char *name)
 }
 
 symbolS *
-symbol_find_base (const char *name, int strip_underscore)
+symbol_find (const char *name)
 {
-  if (strip_underscore && *name == '_')
-    name++;
-
 #ifdef tc_canonicalize_symbol_name
   {
     char *copy;
index 89bbdb130df11c43a5145ceeaac8cfb77b434301..f1fd351de2d702b946c2a10ace96dacc419ac775 100644 (file)
@@ -50,7 +50,6 @@ extern int symbols_case_sensitive;
 char *decode_local_label_name (char *s);
 symbolS *symbol_find (const char *name);
 symbolS *symbol_find_exact (const char *name);
-symbolS *symbol_find_base (const char *name, int strip_underscore);
 symbolS *symbol_find_or_make (const char *name);
 symbolS *symbol_make (const char *name);
 symbolS *symbol_new (const char *name, segT segment, valueT value,
This page took 0.036779 seconds and 4 git commands to generate.