forked from Imagelibrary/binutils-gdb
* frags.c (frag_init): Call obstack_begin on `frags'.
* subsegs.c (subsegs_begin): Don't do it here. * as.c (main): Call frag_init before subsegs_begin. * frags.c (frag_append_1_char): New function. * frags.h (frag_append_1_char): Declare it. (FRAG_APPEND_1_CHAR): Call it. Old definition is commented out for now. * as.h (struct frag): Added (but commented out) new fields for tracking current alignment. (frag_now_fix): Changed macro to function declaration. * frags.c (frag_now_fix): Define function here. (frag_new): Use it instead of accessing `frags' directly. * frags.h (frags): Change comment to indicate it shouldn't be accessed directly. * subsegs.h (struct frchain): New field frch_obstack, intended to eventually replace global `frags' obstack. * subsegs.c (subseg_set_rest): Use frag_now_fix instead of accessing `frags' directly. Initialize fields of new frchainS explicitly instead of with memset. * config/obj-coff.c (obj_coff_ln) [!BFD_ASSEMBLER]: Use frag_now_fix. * config/tc-mips.c (s_loc), config/obj-vms.c (vms_resolve_symbol_redef), symbols.c (colon): Likewise.
This commit is contained in:
@@ -355,8 +355,8 @@ vms_resolve_symbol_redef (sym)
|
||||
* If the new symbol is .comm AND it has a size of zero,
|
||||
* we ignore it (i.e. the old symbol overrides it)
|
||||
*/
|
||||
if ((SEGMENT_TO_SYMBOL_TYPE ((int) now_seg) == (N_UNDF | N_EXT)) &&
|
||||
((obstack_next_free (&frags) - frag_now->fr_literal) == 0))
|
||||
if (SEGMENT_TO_SYMBOL_TYPE ((int) now_seg) == (N_UNDF | N_EXT)
|
||||
&& frag_now_fix () == 0)
|
||||
{
|
||||
as_warn ("compiler emitted zero-size common symbol `%s' already defined",
|
||||
S_GET_NAME (sym));
|
||||
@@ -373,7 +373,7 @@ vms_resolve_symbol_redef (sym)
|
||||
S_GET_NAME (sym));
|
||||
sym->sy_frag = frag_now;
|
||||
S_SET_OTHER(sym, const_flag);
|
||||
S_SET_VALUE(sym, obstack_next_free(& frags) - frag_now->fr_literal);
|
||||
S_SET_VALUE(sym, frag_now_fix ());
|
||||
/* Keep N_EXT bit. */
|
||||
sym->sy_symbol.n_type |= SEGMENT_TO_SYMBOL_TYPE((int) now_seg);
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user