aboutsummaryrefslogtreecommitdiff
path: root/ld/ldlang.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2004-01-13 08:24:20 +0000
committerNick Clifton <nickc@redhat.com>2004-01-13 08:24:20 +0000
commit9dfc8ab2874e2c3386ef4abcfb2a9eacca5c297a (patch)
tree5f5c7461b8d3c87a7047c3c20c600872e03850c3 /ld/ldlang.c
parent56c97c6e25744dba1d0b5e5400dfd5ce21a4d4c8 (diff)
downloadbinutils-9dfc8ab2874e2c3386ef4abcfb2a9eacca5c297a.zip
binutils-9dfc8ab2874e2c3386ef4abcfb2a9eacca5c297a.tar.gz
binutils-9dfc8ab2874e2c3386ef4abcfb2a9eacca5c297a.tar.bz2
If dot is advanced, then assume that the section should be allocated.
Diffstat (limited to 'ld/ldlang.c')
-rw-r--r--ld/ldlang.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ld/ldlang.c b/ld/ldlang.c
index 5a832b1..ac7ab33 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -3205,6 +3205,12 @@ lang_size_sections_1
s = s->header.next;
}
+ /* If dot is advanced, this implies that the section should
+ have space allocated to it, unless the user has explicitly
+ stated that the section should never be loaded. */
+ if (!(output_section_statement->flags & (SEC_NEVER_LOAD | SEC_ALLOC)))
+ output_section_statement->bfd_section->flags |= SEC_ALLOC;
+
dot = newdot;
}
}