summaryrefslogtreecommitdiff
path: root/ld/ldwrite.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2007-09-08 11:04:28 +0000
committerAlan Modra <amodra@gmail.com>2007-09-08 11:04:28 +0000
commitc4e9ac527d6914f6b2486d6d60967c119a1f57c8 (patch)
tree26e640c972441da98553035055ceab24c1c27c20 /ld/ldwrite.c
parent98ece1b3139c38659c7016f41964663b3698b696 (diff)
* ldwrite.c (build_link_order <lang_padding_statement_enum>): Correct
condition under which we build a bfd_data_link_order.
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 47e8f642f87..0f45a916059 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;