If dot is advanced, then assume that the section should be allocated.
authorNick Clifton <nickc@redhat.com>
Tue, 13 Jan 2004 08:24:20 +0000 (08:24 +0000)
committerNick Clifton <nickc@redhat.com>
Tue, 13 Jan 2004 08:24:20 +0000 (08:24 +0000)
ld/ChangeLog
ld/ldlang.c

index 6372a53463977b723b64cfa6122fcf7fc346c313..c1bc1c2b83be9bc920efa3c8f255a1e3aaa54eb1 100644 (file)
@@ -1,3 +1,8 @@
+2004-01-13  Nick Clifton  <nickc@redhat.com>
+
+       * ldlang.c (lang_size_sections_1): If dot is advanced, then
+       assume that the section should be allocated.
+
 2004-01-13  Alan Modra  <amodra@bigpond.net.au>
 
        * ldlang.c (IGNORE_SECTION): Don't ignore SEC_ALLOC && !SEC_LOAD
index 5a832b1ced317ea893fff8e262ca435f01ab7f3b..ac7ab332876d97c298755960b1cc22aee905d2b4 100644 (file)
@@ -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;
              }
          }