* elf64-hppa.c (elf64_hppa_grok_prstatus): New function.
[deliverable/binutils-gdb.git] / gas / read.c
index a398e526767ff6da037f8aeb2a17c4177585380b..0485d72dec6726986e4315c853a1859c2fda6e98 100644 (file)
@@ -1467,13 +1467,25 @@ s_comm_internal (int param,
 
   *p = 0;
   symbolP = symbol_find_or_make (name);
-  if (S_IS_DEFINED (symbolP) && !S_IS_COMMON (symbolP))
+  if ((S_IS_DEFINED (symbolP) || symbol_equated_p (symbolP))
+      && !S_IS_COMMON (symbolP))
     {
-      symbolP = NULL;
-      as_bad (_("symbol `%s' is already defined"), name);
-      *p = c;
-      ignore_rest_of_line ();
-      goto out;
+      if (!S_IS_VOLATILE (symbolP))
+       {
+         symbolP = NULL;
+         as_bad (_("symbol `%s' is already defined"), name);
+         *p = c;
+         ignore_rest_of_line ();
+         goto out;
+       }
+      /* This could be avoided when the symbol wasn't used so far, but
+        the comment in struc-symbol.h says this flag isn't reliable.  */
+      if (1 || !symbol_used_p (symbolP))
+       symbolP = symbol_clone (symbolP, 1);
+      S_SET_SEGMENT (symbolP, undefined_section);
+      S_SET_VALUE (symbolP, 0);
+      symbol_set_frag (symbolP, &zero_address_frag);
+      S_CLEAR_VOLATILE (symbolP);
     }
 
   size = S_GET_VALUE (symbolP);
@@ -2235,15 +2247,7 @@ s_lsym (int ignore ATTRIBUTE_UNUSED)
   *p = 0;
   symbolP = symbol_find_or_make (name);
 
-  /* FIXME-SOON I pulled a (&& symbolP->sy_other == 0 &&
-     symbolP->sy_desc == 0) out of this test because coff doesn't have
-     those fields, and I can't see when they'd ever be tripped.  I
-     don't think I understand why they were here so I may have
-     introduced a bug. As recently as 1.37 didn't have this test
-     anyway.  xoxorich.  */
-
-  if (S_GET_SEGMENT (symbolP) == undefined_section
-      && S_GET_VALUE (symbolP) == 0)
+  if (S_GET_SEGMENT (symbolP) == undefined_section)
     {
       /* The name might be an undefined .global symbol; be sure to
         keep the "external" bit.  */
@@ -3182,10 +3186,18 @@ s_weakref (int ignore ATTRIBUTE_UNUSED)
 
   if (S_IS_DEFINED (symbolP) || symbol_equated_p (symbolP))
     {
-      as_bad (_("symbol `%s' is already defined"), name);
-      *end_name = delim;
-      ignore_rest_of_line ();
-      return;
+      if(!S_IS_VOLATILE (symbolP))
+       {
+         as_bad (_("symbol `%s' is already defined"), name);
+         *end_name = delim;
+         ignore_rest_of_line ();
+         return;
+       }
+      /* This could be avoided when the symbol wasn't used so far, but
+        the comment in struc-symbol.h says this flag isn't reliable.  */
+      if (1 || !symbol_used_p (symbolP))
+       symbolP = symbol_clone (symbolP, 1);
+      S_CLEAR_VOLATILE (symbolP);
     }
 
   *end_name = delim;
This page took 0.024049 seconds and 4 git commands to generate.