diff options
author | Christian Eggers <ceggers@gmx.de> | 2019-03-10 19:21:53 +0100 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2019-03-13 13:29:28 +1030 |
commit | d18d199917337537713f9fc4b7ae4d6568f740cf (patch) | |
tree | aef953bb061dd985c773dde8b35c41cccc74916d /gas/symbols.h | |
parent | 71250b94dc669b285cddcb744a7b3d1c7e2ec94b (diff) | |
download | gdb-d18d199917337537713f9fc4b7ae4d6568f740cf.zip gdb-d18d199917337537713f9fc4b7ae4d6568f740cf.tar.gz gdb-d18d199917337537713f9fc4b7ae4d6568f740cf.tar.bz2 |
Symbols with octets value
Up to now, all symbol values are in units of bytes, where a "byte" can
consist of one or more octets (e.g. 8 bit or 16 bit).
Allow to specfiy that the "unit" of a newly created symbol is octets
(exactly 8 bit), instead of bytes.
* symbols.h (symbol_temp_new_now_octets): Declare.
(symbol_set_value_now_octets, symbol_octets_p): Declare.
* symbols.c (struct symbol_flags): New member sy_octets.
(symbol_temp_new_now_octets): New function.
(resolve_symbol_value): Return octets instead of bytes if
sy_octets is set.
(symbol_set_value_now_octets): New function.
(symbol_octets_p): New function.
Diffstat (limited to 'gas/symbols.h')
-rw-r--r-- | gas/symbols.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gas/symbols.h b/gas/symbols.h index 38ae3ac..f8429d9 100644 --- a/gas/symbols.h +++ b/gas/symbols.h @@ -57,6 +57,7 @@ symbolS *symbol_clone_if_forward_ref (symbolS *, int); #define symbol_clone_if_forward_ref(s) symbol_clone_if_forward_ref (s, 0) symbolS *symbol_temp_new (segT, valueT, fragS *); symbolS *symbol_temp_new_now (void); +symbolS *symbol_temp_new_now_octets (void); symbolS *symbol_temp_make (void); symbolS *colon (const char *sym_name); @@ -181,6 +182,7 @@ 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 *); @@ -206,6 +208,7 @@ 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 *); |