aboutsummaryrefslogtreecommitdiff
path: root/gas/write.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1993-07-14 19:35:45 +0000
committerIan Lance Taylor <ian@airs.com>1993-07-14 19:35:45 +0000
commit85051959f4b156350cb8fcb4c08db004950f3ea1 (patch)
tree623a81719bbf71379b445b7a525aa0252086caa3 /gas/write.c
parent87ce60f98b5821f31e3e8a048d270d0124f096d0 (diff)
downloadgdb-85051959f4b156350cb8fcb4c08db004950f3ea1.zip
gdb-85051959f4b156350cb8fcb4c08db004950f3ea1.tar.gz
gdb-85051959f4b156350cb8fcb4c08db004950f3ea1.tar.bz2
* Changes to keep a full expression as the value of a symbol, not
just a longword: * struc-symbol.h: New field sy_value. * as.h: Include expr.h before struc-symbol.h. * expr.h: Use struct symbol rather than symbolS. * symbols.c (S_GET_VALUE, S_SET_VALUE): Rewrote to retrieve value of sy_value field; compile unconditionally, not just if BFD_ASSEMBLER. * symbols.h: Compile S_{SG}ET_VALUE prototypes unconditionally. * write.c (write_object_file): Set BFD symbol value to gas symbol value. * config/obj-aout.h, config/obj-bout.h, config/obj-coff.h, config/obj-coffbfd.h, config/obj-generic.h, config/obj-vms.h (S_GET_VALUE, S_SET_VALUE): Removed macro definitions. * config/obj-ieee.c (S_GET_VALUE, S_SET_VALUE): Removed. * config/obj-coff.h, obj-coffbfd.h: Rewrote several macros to use S_GET_VALUE rather than ost_entry.n_value. * config/obj-aout.c (obj_symbol_to_chars), config/obj-bout.c (obj_symbol_to_chars), config/obj-coff.c (obj_symbol_to_chars), config/obj-coffbfd.c (symbol_to_chars): Get value to write out using S_GET_VALUE--don't assume it is already set. * config/obj-ieee.c (do_symbols): Set BFD symbol value to gas symbol value. * config/obj-vms.c (various): Don't assign directly to S_GET_VALUE; use S_SET_VALUE instead.
Diffstat (limited to 'gas/write.c')
-rw-r--r--gas/write.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gas/write.c b/gas/write.c
index 245cd83..63353e3 100644
--- a/gas/write.c
+++ b/gas/write.c
@@ -1231,6 +1231,11 @@ write_object_file ()
#endif
continue;
}
+
+ /* Set the value into the BFD symbol. Up til now the value
+ has only been kept in the gas symbolS struct. */
+ symp->bsym->value = S_GET_VALUE (symp);
+
i++;
}
n = i;
@@ -1255,6 +1260,10 @@ write_object_file ()
#ifdef obj_frob_file
+ /* If obj_frob_file changes the symbol value at this point, it is
+ responsible for moving the changed value into symp->bsym->value
+ as well. Hopefully all symbol value changing can be done in
+ {obj,tc}_frob_symbol. */
obj_frob_file ();
#endif