Lines Matching refs:symbolP
88 symbolS *symbolP = symbol_create (name, segment, valu, frag);
96 symbol_append (symbolP, symbol_lastP, &symbol_rootP, &symbol_lastP);
98 return symbolP;
136 symbolS *symbolP;
140 symbolP = (symbolS *) obstack_alloc (¬es, sizeof (symbolS));
143 memset (symbolP, 0, sizeof (symbolS));
145 symbolP->bsym = bfd_make_empty_symbol (stdoutput);
146 if (symbolP->bsym == NULL)
148 S_SET_NAME (symbolP, preserved_copy_of_name);
150 S_SET_SEGMENT (symbolP, segment);
151 S_SET_VALUE (symbolP, valu);
152 symbol_clear_list_pointers (symbolP);
154 symbolP->sy_frag = frag;
156 obj_symbol_new_hook (symbolP);
159 tc_symbol_new_hook (symbolP);
162 return symbolP;
253 define_sym_at_dot (symbolS *symbolP)
255 symbolP->sy_frag = frag_now;
256 S_SET_VALUE (symbolP, (valueT) frag_now_fix ());
257 S_SET_SEGMENT (symbolP, now_seg);
270 symbolS *symbolP; /* Symbol we are working with. */
324 if ((symbolP = symbol_find (sym_name)) != 0)
326 S_CLEAR_WEAKREFR (symbolP);
328 if (RESOLVE_SYMBOL_REDEFINITION (symbolP))
329 return symbolP;
332 if (LOCAL_SYMBOL_CHECK (symbolP))
334 struct local_symbol *locsym = (struct local_symbol *) symbolP;
342 return symbolP;
349 else if (!(S_IS_DEFINED (symbolP) || symbol_equated_p (symbolP))
350 || S_IS_COMMON (symbolP)
351 || S_IS_VOLATILE (symbolP))
353 if (S_IS_VOLATILE (symbolP))
355 symbolP = symbol_clone (symbolP, 1);
356 S_SET_VALUE (symbolP, 0);
357 S_CLEAR_VOLATILE (symbolP);
359 if (S_GET_VALUE (symbolP) == 0)
361 define_sym_at_dot (symbolP);
380 if (((!S_IS_DEBUG (symbolP)
381 && (!S_IS_DEFINED (symbolP) || S_IS_COMMON (symbolP))
382 && S_IS_EXTERNAL (symbolP))
383 || S_GET_SEGMENT (symbolP) == bss_section)
386 || now_seg == S_GET_SEGMENT (symbolP)))
396 if (S_GET_VALUE (symbolP)
399 S_SET_VALUE (symbolP, (valueT) frag_now_fix ());
406 define_sym_at_dot (symbolP);
419 S_GET_OTHER (symbolP),
420 S_GET_DESC (symbolP));
424 segment_name (S_GET_SEGMENT (symbolP)),
426 (long) S_GET_VALUE (symbolP));
433 if (!(frag_now == symbolP->sy_frag
434 && S_GET_VALUE (symbolP) == frag_now_fix ()
435 && S_GET_SEGMENT (symbolP) == now_seg))
438 symbolP = symbol_clone (symbolP, 0);
439 define_sym_at_dot (symbolP);
446 symbolP = (symbolS *) local_symbol_make (sym_name, now_seg,
452 symbolP = symbol_new (sym_name, now_seg, (valueT) frag_now_fix (),
455 symbol_table_insert (symbolP);
462 if (LOCAL_SYMBOL_CHECK (symbolP))
463 symbolP = local_symbol_convert ((struct local_symbol *) symbolP);
464 symbolP->sy_value.X_op = O_symbol;
465 symbolP->sy_value.X_add_symbol = mri_common_symbol;
466 symbolP->sy_value.X_add_number = S_GET_VALUE (mri_common_symbol);
467 symbolP->sy_frag = &zero_address_frag;
468 S_SET_SEGMENT (symbolP, expr_section);
469 symbolP->sy_flags.sy_mri_common = 1;
473 tc_frob_label (symbolP);
476 obj_frob_label (symbolP);
479 return symbolP;
486 symbol_table_insert (symbolS *symbolP)
490 know (symbolP);
491 know (S_GET_NAME (symbolP));
493 if (LOCAL_SYMBOL_CHECK (symbolP))
495 error_string = hash_jam (local_hash, S_GET_NAME (symbolP),
496 (void *) symbolP);
499 S_GET_NAME (symbolP), error_string);
503 if ((error_string = hash_jam (sy_hash, S_GET_NAME (symbolP), (void *) symbolP)))
506 S_GET_NAME (symbolP), error_string);
517 symbolS *symbolP;
519 symbolP = symbol_find (name);
521 if (symbolP == NULL)
525 symbolP = md_undefined_symbol ((char *) name);
526 if (symbolP != NULL)
527 return symbolP;
529 symbolP = (symbolS *) local_symbol_make (name, undefined_section,
532 return symbolP;
535 symbolP = symbol_make (name);
537 symbol_table_insert (symbolP);
540 return (symbolP);
546 symbolS *symbolP;
549 symbolP = md_undefined_symbol ((char *) name);
551 if (!symbolP)
552 symbolP = symbol_new (name, undefined_section, (valueT) 0, &zero_address_frag);
554 return (symbolP);
631 symbol_clone_if_forward_ref (symbolS *symbolP, int is_forward)
633 if (symbolP && !LOCAL_SYMBOL_CHECK (symbolP))
635 symbolS *add_symbol = symbolP->sy_value.X_add_symbol;
636 symbolS *op_symbol = symbolP->sy_value.X_op_symbol;
638 if (symbolP->sy_flags.sy_forward_ref)
654 if ((symbolP->bsym->section == expr_section
655 || symbolP->sy_flags.sy_forward_ref)
656 && !symbolP->sy_flags.sy_resolving)
658 symbolP->sy_flags.sy_resolving = 1;
661 symbolP->sy_flags.sy_resolving = 0;
664 if (symbolP->sy_flags.sy_forward_ref
665 || add_symbol != symbolP->sy_value.X_add_symbol
666 || op_symbol != symbolP->sy_value.X_op_symbol)
668 if (symbolP != &dot_symbol)
670 symbolP = symbol_clone (symbolP, 0);
671 symbolP->sy_flags.sy_resolving = 0;
675 symbolP = symbol_temp_new_now ();
677 tc_new_dot_label (symbolP);
682 symbolP->sy_value.X_add_symbol = add_symbol;
683 symbolP->sy_value.X_op_symbol = op_symbol;
686 return symbolP;
828 symbol_clear_list_pointers (symbolS *symbolP)
830 if (LOCAL_SYMBOL_CHECK (symbolP))
832 symbolP->sy_next = NULL;
833 symbolP->sy_previous = NULL;
836 /* Remove SYMBOLP from the list. */
839 symbol_remove (symbolS *symbolP, symbolS **rootPP, symbolS **lastPP)
841 if (LOCAL_SYMBOL_CHECK (symbolP))
844 if (symbolP == *rootPP)
846 *rootPP = symbolP->sy_next;
849 if (symbolP == *lastPP)
851 *lastPP = symbolP->sy_previous;
854 if (symbolP->sy_next != NULL)
856 symbolP->sy_next->sy_previous = symbolP->sy_previous;
859 if (symbolP->sy_previous != NULL)
861 symbolP->sy_previous->sy_next = symbolP->sy_next;
898 symbolS *symbolP = rootP;
900 if (symbolP == NULL)
903 for (; symbol_next (symbolP) != NULL; symbolP = symbol_next (symbolP))
905 gas_assert (symbolP->bsym != NULL);
906 gas_assert (symbolP->sy_flags.sy_local_symbol == 0);
907 gas_assert (symbolP->sy_next->sy_previous == symbolP);
910 gas_assert (lastP == symbolP);
1507 symbolS *symbolP = *symbolPP;
1509 if (LOCAL_SYMBOL_CHECK (symbolP))
1511 struct local_symbol *locsym = (struct local_symbol *) symbolP;
1519 expressionS exp = symbolP->sy_value;
1521 if (!symbolP->sy_flags.sy_resolved && exp.X_op != O_illegal)
1525 if (symbolP->sy_flags.sy_resolving)
1527 symbolP->sy_flags.sy_resolving = 1;
1529 symbolP->sy_flags.sy_resolving = 0;
1537 if (!symbol_equated_p (symbolP))
1542 symbolP = exp.X_add_symbol;
1549 *symbolPP = symbolP;
1551 *segP = symbolP->bsym->section;
1552 *fragPP = symbolP->sy_frag;