* read.c (pseudo_set): Only preserve external bit for OBJ_AOUT and
OBJ_BOUT if not BFD_ASSEMBLER.
* config/aout_gnu.h (N_WEAKU, N_WEAKA, N_WEAKT, N_WEAKD, N_WEAKB):
Define as in ../include/aout/aout64.h.
* config/obj-aout.h (OBJ_SYMFIELD_TYPE): If not BFD_ASSEMBLER,
define as char.
(S_GET_WEAK, S_SET_WEAK): Define if not BFD_ASSEMBLER.
* config/obj-aout.c (obj_pseudo_table): Add "weak".
(obj_emit_symbols): Adjust type of weak symbols.
(obj_aout_weak): New static function.
with explicitly marked stabs through BFD: if a symbol marked
N_UNDF | N_EXT is in the absolute section, move it to the
undefined section; move a symbol marked N_INDR into
bfd_ind_section and set the BSF_INDIRECT flag.
Wrote non-BFD_ASSEMBLER subseg_new. Now subseg_new always takes a
section name, and subseg_set always takes a segT. Changed all
callers as appropriate.
* config/obj-coffbfd.c (change_to_section): Renamed to
obj_coff_add_segment. Corrected. Made callers use subseg_new.
* config/obj-coffbfd.h (obj_segment_name, obj_add_segment):
Define.
Also some more gcc warning removal.
as the value of a symbol.
* struc-symbol.h (struct symbol): Removed sy_forward field. Added
sy_resolved and sy_resolving single bit fields.
* symbols.c (symbol_new): Don't initialize sy_forward field.
(resolve_symbol_value): New function to adjust symbol value by
fragment address, using recursion to resolve forward symbols.
* symbols.h: Added prototype for new function.
* read.c (pseudo_set): Set symbolP->sy_value to an undefined
expression rather than setting symbolP->sy_forward.
* write.c (write_object_file): Use resolve_symbol_value on
symbols, keeping the common case (the old behaviour) inline.
* config/obj-aout.c (obj_aout_frob_symbol): Removed sy_forward
handling (subsumed by write.c change).
* config/obj-coff.c, config/obj-coffbfd.c (obj_coff_val): Set
sy_value rather than sy_forward.
* config/obj-coffbfd.c (obj_coff_endef, yank_symbols): Check
expression segment rather than sy_forward.
(yank_symbols): Use resolve_symbol_value.
(crawl_symbols): Removed extra pass over symbols.
* config/obj-aout.c, config/obj-bout.c, config/obj-coff.c,
config/obj-vms.c (obj_crawl_symbol_chain): Removed extra pass over
symbols which handled sy_forward; use resolve_symbol_value
instead.
* config/obj-coff.h, config/obj-coffbfd.h (obj_frob_forward_symbol):
Define.
* config/obj-elf.c (obj_elf_stab_generic): Check expression
segment rather than sy_forward.
* config/obj-vms.c (VMS_Check_For_Main): Don't initialize
sy_forward; do initialize sy_resolved and sy_resolving.
* config/tc-hppa.h (STAB_FIXUP): Use sy_value, not sy_forward.
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.