aboutsummaryrefslogtreecommitdiff
path: root/ld/ldwrite.c
diff options
context:
space:
mode:
Diffstat (limited to 'ld/ldwrite.c')
-rw-r--r--ld/ldwrite.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ld/ldwrite.c b/ld/ldwrite.c
index 47e8f64..0f45a91 100644
--- a/ld/ldwrite.c
+++ b/ld/ldwrite.c
@@ -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;