- == output_bfd);
- if ((output_section->flags & SEC_HAS_CONTENTS) != 0)
- {
- link_order = bfd_new_link_order (output_bfd, output_section);
- link_order->type = bfd_data_link_order;
- link_order->size = statement->padding_statement.size;
- link_order->offset = statement->padding_statement.output_offset;
- link_order->u.data.contents = statement->padding_statement.fill->data;
- link_order->u.data.size = statement->padding_statement.fill->size;
- }
+ == link_info.output_bfd);
+
+ if (!((output_section->flags & SEC_HAS_CONTENTS) != 0
+ || ((output_section->flags & SEC_LOAD) != 0
+ && (output_section->flags & SEC_THREAD_LOCAL))))
+ break;
+
+ link_order = bfd_new_link_order (link_info.output_bfd,
+ output_section);
+ if (link_order == NULL)
+ einfo (_("%F%P: bfd_new_link_order failed\n"));
+ link_order->type = bfd_data_link_order;
+ link_order->size = statement->padding_statement.size;
+ link_order->offset = statement->padding_statement.output_offset;
+ link_order->u.data.contents = statement->padding_statement.fill->data;
+ link_order->u.data.size = statement->padding_statement.fill->size;