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]

[committed] gas/config/tc-alpha.c: use symbol accessor


Hi,

in the VMS part of tc-alpha.c, there were still a few direct accesses to the symbol structure - which is a very bad idea when the symbol is in fact a local one.  Fixed by this patch.

Tristan.

gas/
2011-10-21  Tristan Gingold  <gingold@adacore.com>

	* config/tc-alpha.c (load_expression): Use symbol_mark_used accessor.
	(s_alpha_comm): Use symbol_set_frag accessor.

Index: config/tc-alpha.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-alpha.c,v
retrieving revision 1.99
diff -c -r1.99 tc-alpha.c
*** config/tc-alpha.c	19 Sep 2011 08:24:23 -0000	1.99
--- config/tc-alpha.c	21 Oct 2011 13:20:50 -0000
***************
*** 1394,1400 ****
  		    gas_assert (insn.nfixups + 1 <= MAX_INSN_FIXUPS);
  		    insn.fixups[insn.nfixups].reloc = BFD_RELOC_ALPHA_NOP;
  		    ensym = symbol_find_or_make (ensymname);
! 		    ensym->sy_used = 1;
  		    /* The fixup must be the same as the BFD_RELOC_ALPHA_BOH
  		       case in emit_jsrjmp.  See B.4.5.2 of the OpenVMS Linker
  		       Utility Manual.  */
--- 1394,1400 ----
  		    gas_assert (insn.nfixups + 1 <= MAX_INSN_FIXUPS);
  		    insn.fixups[insn.nfixups].reloc = BFD_RELOC_ALPHA_NOP;
  		    ensym = symbol_find_or_make (ensymname);
! 		    symbol_mark_used (ensym);
  		    /* The fixup must be the same as the BFD_RELOC_ALPHA_BOH
  		       case in emit_jsrjmp.  See B.4.5.2 of the OpenVMS Linker
  		       Utility Manual.  */
***************
*** 1426,1432 ****
  		    gas_assert (insn.nfixups + 1 <= MAX_INSN_FIXUPS);
  		    insn.fixups[insn.nfixups].reloc = BFD_RELOC_ALPHA_LDA;
  		    psym = symbol_find_or_make (psymname);
! 		    psym->sy_used = 1;
  		    insn.fixups[insn.nfixups].exp.X_op = O_subtract;
  		    insn.fixups[insn.nfixups].exp.X_add_symbol = psym;
  		    insn.fixups[insn.nfixups].exp.X_op_symbol = alpha_evax_proc->symbol;
--- 1426,1432 ----
  		    gas_assert (insn.nfixups + 1 <= MAX_INSN_FIXUPS);
  		    insn.fixups[insn.nfixups].reloc = BFD_RELOC_ALPHA_LDA;
  		    psym = symbol_find_or_make (psymname);
! 		    symbol_mark_used (psym);
  		    insn.fixups[insn.nfixups].exp.X_op = O_subtract;
  		    insn.fixups[insn.nfixups].exp.X_add_symbol = psym;
  		    insn.fixups[insn.nfixups].exp.X_op_symbol = alpha_evax_proc->symbol;
***************
*** 3602,3608 ****
        frag_align (log_align, 0, 0);
        record_alignment (bss_section, log_align);
  
!       symbolP->sy_frag = frag_now;
        pfrag = frag_var (rs_org, 1, 1, (relax_substateT)0, symbolP,
                          size, NULL);
        *pfrag = 0;
--- 3602,3608 ----
        frag_align (log_align, 0, 0);
        record_alignment (bss_section, log_align);
  
!       symbol_set_frag (symbolP, frag_now);
        pfrag = frag_var (rs_org, 1, 1, (relax_substateT)0, symbolP,
                          size, NULL);
        *pfrag = 0;


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