* Changes to keep a full expression as the value of a symbol, not
[deliverable/binutils-gdb.git] / gas / symbols.c
index e39e50c92f941bf5db972f3c9525305268eb7d3f..24fe3d84697a7ba7ffd3466b225a7163b9f7a9d7 100644 (file)
@@ -946,6 +946,28 @@ decode_local_label_name (s)
   return (symbol_decode);
 }                              /* decode_local_label_name() */
 
+/* Get the value of a symbol.  */
+
+valueT
+S_GET_VALUE (s)
+     symbolS *s;
+{
+  if (s->sy_value.X_seg != absolute_section)
+    as_bad ("Attempt to get value of unresolved symbol");
+  return (valueT) s->sy_value.X_add_number;
+}
+
+/* Set the value of a symbol.  */
+
+void
+S_SET_VALUE (s, val)
+     symbolS *s;
+     valueT val;
+{
+  s->sy_value.X_seg = absolute_section;
+  s->sy_value.X_add_number = (offsetT) val;
+}
+
 #ifdef BFD_ASSEMBLER
 
 int
@@ -1016,13 +1038,6 @@ S_IS_STABD (s)
   return S_GET_NAME (s) == 0;
 }
 
-valueT
-S_GET_VALUE (s)
-     symbolS *s;
-{
-  return s->bsym->value;
-}
-
 CONST char *
 S_GET_NAME (s)
      symbolS *s;
@@ -1037,14 +1052,6 @@ S_GET_SEGMENT (s)
   return s->bsym->section;
 }
 
-void
-S_SET_VALUE (s, val)
-     symbolS *s;
-     valueT val;
-{
-  s->bsym->value = val;
-}
-
 void
 S_SET_SEGMENT (s, seg)
      symbolS *s;
This page took 0.023206 seconds and 4 git commands to generate.