View | Details | Raw Unified | Return to bug 24289
Collapse All | Expand All

(-)a/ld/ldexp.c (-23 / +18 lines)
Lines 864-897 fold_name (etree_type *tree) Link Here
864
864
865
    case LENGTH:
865
    case LENGTH:
866
      {
866
      {
867
      if (expld.phase != lang_first_phase_enum)
867
	lang_memory_region_type *mem;
868
	{
869
	  lang_memory_region_type *mem;
870
868
871
	  mem = lang_memory_region_lookup (tree->name.name, FALSE);
869
	mem = lang_memory_region_lookup (tree->name.name, FALSE);
872
	  if (mem != NULL)
870
	if (mem != NULL)
873
	    new_number (mem->length);
871
	  new_number (mem->length);
874
	  else
872
	else
875
	    einfo (_("%F%P:%pS: undefined MEMORY region `%s'"
873
	  einfo (_("%F%P:%pS: undefined MEMORY region `%s'"
876
		     " referenced in expression\n"),
874
		   " referenced in expression\n"),
877
		   tree, tree->name.name);
875
		 tree, tree->name.name);
878
	}
879
      }
876
      }
880
      break;
877
      break;
881
878
882
    case ORIGIN:
879
    case ORIGIN:
883
      if (expld.phase != lang_first_phase_enum)
880
      {
884
	{
881
	lang_memory_region_type *mem;
885
	  lang_memory_region_type *mem;
886
882
887
	  mem = lang_memory_region_lookup (tree->name.name, FALSE);
883
	mem = lang_memory_region_lookup (tree->name.name, FALSE);
888
	  if (mem != NULL)
884
	if (mem != NULL)
889
	    new_rel_from_abs (mem->origin);
885
	  new_rel_from_abs (mem->origin);
890
	  else
886
	else
891
	    einfo (_("%F%P:%pS: undefined MEMORY region `%s'"
887
	  einfo (_("%F%P:%pS: undefined MEMORY region `%s'"
892
		     " referenced in expression\n"),
888
		   " referenced in expression\n"),
893
		   tree, tree->name.name);
889
		 tree, tree->name.name);
894
	}
890
      }
895
      break;
891
      break;
896
892
897
    case CONSTANT:
893
    case CONSTANT:
898
- 

Return to bug 24289