This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 5/9] Revert "Symbols with octets value"


This (partly) reverts commit d18d199917337537713f9fc4b7ae4d6568f740cf.

	* symbols.h (symbol_set_value_now_octets, symbol_octets_p): Remove.
	* symbols.c (struct symbol_flags): Remove member sy_octets.
	(symbol_temp_new_now_octets): Don't set symbol_flags::sy_octets.
	(resolve_symbol_value): Revert: Return octets instead of bytes if
	sy_octets is set.
	(symbol_set_value_now_octets): Remove.
	(symbol_octets_p): Remove.
---
 gas/symbols.c | 32 ++------------------------------
 gas/symbols.h |  2 --
 2 files changed, 2 insertions(+), 32 deletions(-)

diff --git a/gas/symbols.c b/gas/symbols.c
index 34ec145ad0..cff24059e6 100644
--- a/gas/symbols.c
+++ b/gas/symbols.c
@@ -73,10 +73,6 @@ struct symbol_flags
      before.  It is cleared as soon as any direct reference to the
      symbol is present.  */
   unsigned int sy_weakrefd : 1;
-
-  /* This if set if the unit of the symbol value is "octets" instead
-     of "bytes".  */
-  unsigned int sy_octets : 1;
 };

 /* The information we keep for a symbol.  Note that the symbol table
@@ -850,9 +846,7 @@ symbol_temp_new_now (void)
 symbolS *
 symbol_temp_new_now_octets (void)
 {
-  symbolS * symb = symbol_temp_new (now_seg, frag_now_fix_octets (), frag_now);
-  symb->sy_flags.sy_octets = 1;
-  return symb;
+  return symbol_temp_new (now_seg, frag_now_fix_octets (), frag_now);
 }

 symbolS *
@@ -1336,10 +1330,7 @@ resolve_symbol_value (symbolS *symp)
 	  /* Fall through.  */

 	case O_constant:
-	  if (symp->sy_flags.sy_octets)
-	    final_val += symp->sy_frag->fr_address;
-	  else
-	    final_val += symp->sy_frag->fr_address / OCTETS_PER_BYTE;
+	  final_val += symp->sy_frag->fr_address / OCTETS_PER_BYTE;
 	  if (final_seg == expr_section)
 	    final_seg = absolute_section;
 	  /* Fall through.  */
@@ -2651,18 +2642,6 @@ symbol_set_value_now (symbolS *sym)
   symbol_set_frag (sym, frag_now);
 }

-/* Set the value of SYM to the current position in the current segment,
-   in octets.  */
-
-void
-symbol_set_value_now_octets (symbolS *sym)
-{
-  S_SET_SEGMENT (sym, now_seg);
-  S_SET_VALUE (sym, frag_now_fix_octets ());
-  symbol_set_frag (sym, frag_now);
-  sym->sy_flags.sy_octets = 1;
-}
-
 /* Set the frag of a symbol.  */

 void
@@ -2934,13 +2913,6 @@ symbol_set_bfdsym (symbolS *s, asymbol *bsym)
   /* else XXX - What do we do now ?  */
 }

-/* Return whether symbol unit is "octets" (instead of "bytes").  */
-
-int symbol_octets_p (symbolS *s)
-{
-  return s->sy_flags.sy_octets;
-}
-
 #ifdef OBJ_SYMFIELD_TYPE

 /* Get a pointer to the object format information for a symbol.  */
diff --git a/gas/symbols.h b/gas/symbols.h
index f8429d9730..cffa8219ae 100644
--- a/gas/symbols.h
+++ b/gas/symbols.h
@@ -182,7 +182,6 @@ extern expressionS *symbol_get_value_expression (symbolS *);
 extern void symbol_set_value_expression (symbolS *, const expressionS *);
 extern offsetT *symbol_X_add_number (symbolS *);
 extern void symbol_set_value_now (symbolS *);
-extern void symbol_set_value_now_octets (symbolS *);
 extern void symbol_set_frag (symbolS *, fragS *);
 extern fragS *symbol_get_frag (symbolS *);
 extern void symbol_mark_used (symbolS *);
@@ -208,7 +207,6 @@ extern symbolS *symbol_symbolS (symbolS *);
 extern asymbol *symbol_get_bfdsym (symbolS *);
 extern void symbol_set_bfdsym (symbolS *, asymbol *);
 extern int symbol_same_p (symbolS *, symbolS *);
-extern int symbol_octets_p (symbolS *);

 #ifdef OBJ_SYMFIELD_TYPE
 OBJ_SYMFIELD_TYPE *symbol_get_obj (symbolS *);
--
2.16.4


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]