2005-11-25 Andrew Stubbs <andrew.stubbs@st.com>
[deliverable/binutils-gdb.git] / ld / ldexp.c
index d0ecb0c12b5fc561f38e82fbdc8c5e422282677b..cee1da533266b5af2c2a8d159caecb736179ea07 100644 (file)
@@ -562,7 +562,7 @@ fold_name (etree_type *tree)
          lang_output_section_statement_type *os;
 
          os = lang_output_section_find (tree->name.name);
-         if (os != NULL && os->processed > 0)
+         if (os != NULL && os->processed)
            new_rel (0, NULL, os->bfd_section);
        }
       break;
@@ -573,7 +573,7 @@ fold_name (etree_type *tree)
          lang_output_section_statement_type *os;
 
          os = lang_output_section_find (tree->name.name);
-         if (os != NULL && os->processed > 0)
+         if (os != NULL && os->processed)
            {
              if (os->load_base == NULL)
                new_rel (0, NULL, os->bfd_section);
@@ -590,7 +590,9 @@ fold_name (etree_type *tree)
          lang_output_section_statement_type *os;
 
          os = lang_output_section_find (tree->name.name);
-         if (os != NULL && os->processed > 0)
+         if (os == NULL)
+           new_abs (0);
+         else if (os->processed)
            new_abs (os->bfd_section->size / opb);
        }
       break;
@@ -655,15 +657,8 @@ exp_fold_tree_1 (etree_type *tree)
 
     case etree_assert:
       exp_fold_tree_1 (tree->assert_s.child);
-      if (expld.result.valid_p)
-       {
-         if (expld.phase == lang_mark_phase_enum)
-           /* We don't care if assert fails or not when we are just
-              marking if a section is used or not.  */
-           expld.result.value = 1;
-         else if (!expld.result.value)
-           einfo ("%X%P: %s\n", tree->assert_s.message);
-       }
+      if (expld.phase == lang_final_phase_enum && !expld.result.value)
+       einfo ("%X%P: %s\n", tree->assert_s.message);
       break;
 
     case etree_unary:
This page took 0.023513 seconds and 4 git commands to generate.