]> oss.titaniummirror.com Git - msp430-binutils.git/blobdiff - gas/cgen.c
Imported binutils-2.20
[msp430-binutils.git] / gas / cgen.c
index 178402af27bc8a1d4c8e67eff739fe7d048a3b18..59c7e561adc4e0c3c90ccc55402069deafa1234c 100644 (file)
@@ -1,6 +1,6 @@
 /* GAS interface for targets using CGEN: Cpu tools GENerator.
    Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-   2006, 2007 Free Software Foundation, Inc.
+   2006, 2007, 2009 Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
 
@@ -452,9 +452,10 @@ gas_cgen_parse_operand (cd, want, strP, opindex, opinfo, resultP, valueP)
          if (exp.X_op == O_symbol
              && reloc_type == BFD_RELOC_RELC
              && exp.X_add_symbol->sy_value.X_op == O_constant
-             && exp.X_add_symbol->bsym->section != expr_section
-             && exp.X_add_symbol->bsym->section != absolute_section
-             && exp.X_add_symbol->bsym->section != undefined_section)
+             && (!exp.X_add_symbol->bsym
+                 || (exp.X_add_symbol->bsym->section != expr_section
+                     && exp.X_add_symbol->bsym->section != absolute_section
+                     && exp.X_add_symbol->bsym->section != undefined_section)))
            {
              /* Local labels will have been (eagerly) turned into constants
                 by now, due to the inappropriately deep insight of the
@@ -1034,7 +1035,7 @@ gas_cgen_tc_gen_reloc (section, fixP)
       return NULL;
     }
 
-  assert (!fixP->fx_pcrel == !reloc->howto->pc_relative);
+  gas_assert (!fixP->fx_pcrel == !reloc->howto->pc_relative);
 
   reloc->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *));
   *reloc->sym_ptr_ptr = symbol_get_bfdsym (fixP->fx_addsy);
@@ -1061,4 +1062,3 @@ gas_cgen_begin ()
   else
     cgen_clear_signed_overflow_ok (gas_cgen_cpu_desc);
 }
-