/* 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.
preserved_copy_of_name = save_symbol_name (name);
- symbolP = (symbolS *) obstack_alloc (¬es, sizeof (symbolS));
+ symbolP = obstack_alloc (¬es, sizeof (symbolS));
/* symbol must be born in some fixed state. This seems as good as any. */
memset (symbolP, 0, sizeof (symbolS));
name_copy = save_symbol_name (name);
- ret = (struct local_symbol *) obstack_alloc (¬es, sizeof *ret);
+ ret = obstack_alloc (¬es, sizeof *ret);
ret->lsy_marker = NULL;
ret->lsy_name = name_copy;
ret->lsy_section = section;
{
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);
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
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;
}
}
/* In an expression, transfer the settings of these flags.
The user can override later, of course. */
-#define COPIED_SYMFLAGS (BSF_FUNCTION | BSF_OBJECT)
+#define COPIED_SYMFLAGS (BSF_FUNCTION | BSF_OBJECT \
+ | BSF_GNU_INDIRECT_FUNCTION)
dest->bsym->flags |= src->bsym->flags & COPIED_SYMFLAGS;
#ifdef OBJ_COPY_SYMBOL_ATTRIBUTES
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
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. */
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
+ (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,