* ldwrite.c (build_link_order <lang_padding_statement_enum>): Correct
authorAlan Modra <amodra@gmail.com>
Sat, 8 Sep 2007 11:04:28 +0000 (11:04 +0000)
committerAlan Modra <amodra@gmail.com>
Sat, 8 Sep 2007 11:04:28 +0000 (11:04 +0000)
condition under which we build a bfd_data_link_order.

ld/ChangeLog
ld/ldwrite.c

index 1579bec8b68d59a4567095e5ac3a7111989e2c8f..2ffe3976dc82aa9fc9ac9cc2a8d60ede8c653cba 100644 (file)
@@ -1,3 +1,8 @@
+2007-09-08  Alan Modra  <amodra@bigpond.net.au>
+
+       * ldwrite.c (build_link_order <lang_padding_statement_enum>): Correct
+       condition under which we build a bfd_data_link_order.
+
 2007-08-31  Tristan Gingold  <gingold@adacore.com>
 
        * ldlang.c (lang_map): Increment lang_statement_iteration so that
index 47e8f642f87e3445fd27db6ec167ed5297c55761..0f45a916059183e6547dc658c94d5abc326506c5 100644 (file)
@@ -270,7 +270,10 @@ build_link_order (lang_statement_union_type *statement)
        output_section = statement->padding_statement.output_section;
        ASSERT (statement->padding_statement.output_section->owner
                == output_bfd);
-       if ((output_section->flags & SEC_HAS_CONTENTS) != 0)
+       if (((output_section->flags & SEC_HAS_CONTENTS) != 0
+            || ((output_section->flags & SEC_LOAD) != 0
+                && (output_section->flags & SEC_THREAD_LOCAL)))
+           && (output_section->flags & SEC_NEVER_LOAD) == 0)
          {
            link_order = bfd_new_link_order (output_bfd, output_section);
            link_order->type = bfd_data_link_order;