From 5de18756aa4e64193b0676ff14d52690bd150074 Mon Sep 17 00:00:00 2001 From: nickc Date: Tue, 13 Jan 2004 08:24:19 +0000 Subject: [PATCH] If dot is advanced, then assume that the section should be allocated. --- ld/ChangeLog | 5 +++++ ld/ldlang.c | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/ld/ChangeLog b/ld/ChangeLog index 6372a53463..c1bc1c2b83 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2004-01-13 Nick Clifton + + * ldlang.c (lang_size_sections_1): If dot is advanced, then + assume that the section should be allocated. + 2004-01-13 Alan Modra * ldlang.c (IGNORE_SECTION): Don't ignore SEC_ALLOC && !SEC_LOAD diff --git a/ld/ldlang.c b/ld/ldlang.c index 5a832b1ced..ac7ab33287 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; } } -- 2.11.0