summaryrefslogtreecommitdiff
path: root/ld/ldlang.c
diff options
context:
space:
mode:
Diffstat (limited to 'ld/ldlang.c')
-rw-r--r--ld/ldlang.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ld/ldlang.c b/ld/ldlang.c
index 2f1e0eac18f..30d71aa5215 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -4498,7 +4498,9 @@ lang_check_section_addresses (void)
for (s = link_info.output_bfd->sections; s != NULL; s = s->next)
{
/* Only consider loadable sections with real contents. */
- if ((s->flags & SEC_NEVER_LOAD) || !(s->flags & SEC_LOAD)
+ if ((s->flags & SEC_NEVER_LOAD)
+ || !(s->flags & SEC_LOAD)
+ || !(s->flags & SEC_ALLOC)
|| s->size == 0)
continue;