* config/tc-mep.c (md_estimate_size_before_relax): Handle weak
[deliverable/binutils-gdb.git] / gas / symbols.c
index 3959ee2536d223b9d5eb8cc09066d9352b7e931f..c72946b8505b2974085b719de366971a61778048 100644 (file)
@@ -1,6 +1,6 @@
 /* symbols.c -symbol table-
    Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+   1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
    Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
@@ -217,7 +217,7 @@ local_symbol_convert (struct local_symbol *locsym)
 {
   symbolS *ret;
 
-  assert (locsym->lsy_marker == NULL);
+  gas_assert (locsym->lsy_marker == NULL);
   if (local_symbol_converted_p (locsym))
     return local_symbol_get_real_symbol (locsym);
 
@@ -879,11 +879,11 @@ verify_symbol_chain (symbolS *rootP, symbolS *lastP)
 
   for (; symbol_next (symbolP) != NULL; symbolP = symbol_next (symbolP))
     {
-      assert (symbolP->bsym != NULL);
-      assert (symbolP->sy_next->sy_previous == symbolP);
+      gas_assert (symbolP->bsym != NULL);
+      gas_assert (symbolP->sy_next->sy_previous == symbolP);
     }
 
-  assert (lastP == symbolP);
+  gas_assert (lastP == symbolP);
 }
 
 #ifdef OBJ_COMPLEX_RELC
@@ -1144,13 +1144,13 @@ resolve_symbol_value (symbolS *symp)
        do_symbol:
          if (S_IS_WEAKREFR (symp))
            {
-             assert (final_val == 0);
+             gas_assert (final_val == 0);
              if (S_IS_WEAKREFR (add_symbol))
                {
-                 assert (add_symbol->sy_value.X_op == O_symbol
+                 gas_assert (add_symbol->sy_value.X_op == O_symbol
                          && add_symbol->sy_value.X_add_number == 0);
                  add_symbol = add_symbol->sy_value.X_add_symbol;
-                 assert (! S_IS_WEAKREFR (add_symbol));
+                 gas_assert (! S_IS_WEAKREFR (add_symbol));
                  symp->sy_value.X_add_symbol = add_symbol;
                }
            }
@@ -2053,6 +2053,7 @@ S_FORCE_RELOC (symbolS *s, int strict)
 
   return ((strict
           && ((s->bsym->flags & BSF_WEAK) != 0
+              || (s->bsym->flags & BSF_GNU_INDIRECT_FUNCTION) != 0
               || (EXTERN_FORCE_RELOC
                   && (s->bsym->flags & BSF_GLOBAL) != 0)))
          || s->bsym->section == undefined_section
@@ -2986,7 +2987,7 @@ symbol_relc_make_sym (symbolS * sym)
   char typetag;
   int sname_len;
 
-  assert (sym != NULL);
+  gas_assert (sym != NULL);
 
   /* Recurse to symbol_relc_make_expr if this symbol
      is defined as an expression or a plain value.  */
@@ -3051,7 +3052,7 @@ symbol_relc_make_expr (expressionS * exp)
 
   operands[0] = operands[1] = operands[2] = NULL;
 
-  assert (exp != NULL);
+  gas_assert (exp != NULL);
 
   /* Match known operators -> fill in opstr, arity, operands[] and fall
      through to construct subexpression fragments; may instead return 
@@ -3164,7 +3165,7 @@ symbol_relc_make_expr (expressionS * exp)
                               + (arity >= 2 ? (strlen (operands[1]) + 1 ) : 0)
                               + (arity >= 3 ? (strlen (operands[2]) + 0 ) : 0)
                               + 1);
-      assert (concat_string != NULL);
+      gas_assert (concat_string != NULL);
       
       /* Format the thing.  */
       sprintf (concat_string, 
This page took 0.02606 seconds and 4 git commands to generate.