]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
ld/ChangeLog:
authorBob Wilson <bob.wilson@acm.org>
Thu, 17 Mar 2005 16:37:40 +0000 (16:37 +0000)
committerBob Wilson <bob.wilson@acm.org>
Thu, 17 Mar 2005 16:37:40 +0000 (16:37 +0000)
        * ldlang.c (IGNORE_SECTION): Remove check for zero size.
        (lang_check_section_addresses): Ignore zero size sections here.
ld/testsuite/ChangeLog:
        * ld-scripts/empty-orphan.d, ld-scripts/empty-orphan.exp,
        ld-scripts/empty-orphan.s, ld-scripts/emtpy-orphan.t: New test.

ld/ChangeLog
ld/ldlang.c
ld/testsuite/ChangeLog

index ce29eb9fc007c9ef299b8c2fff9cd44e43e97c07..ee50c1c9ef4e13109c0d0935e824b3474ff3f4bc 100644 (file)
@@ -1,3 +1,9 @@
+2005-03-16  David Heine  <dlheine@tensilica.com>
+           Bob Wilson  <bob.wilson@acm.org>
+
+       * ldlang.c (IGNORE_SECTION): Remove check for zero size.
+       (lang_check_section_addresses): Ignore zero size sections here.
+
 2005-03-16  Alan Modra  <amodra@bigpond.net.au>
 
        * emulparams/elf32ppclinux.sh (OTHER_READWRITE_SECTION): Delete.
index 636dc7f5c475a92e1bac8b7b1a3dbdb066cb606e..c38423ea4c60cf2b53d3f41df76fb579b2c2b0c7 100644 (file)
@@ -3300,8 +3300,7 @@ size_input_section
   ((s->flags & SEC_NEVER_LOAD) != 0                            \
    || (s->flags & SEC_ALLOC) == 0                              \
    || ((s->flags & SEC_THREAD_LOCAL) != 0                      \
-       && (s->flags & SEC_LOAD) == 0)                          \
-   || s->size == 0)
+       && (s->flags & SEC_LOAD) == 0))
 
 /* Check to see if any allocated sections overlap with other allocated
    sections.  This can happen if a linker script specifies the output
@@ -3318,7 +3317,7 @@ lang_check_section_addresses (void)
       asection *os;
 
       /* Ignore sections which are not loaded or which have no contents.  */
-      if (IGNORE_SECTION (s))
+      if (IGNORE_SECTION (s) || s->size == 0)
        continue;
 
       /* Once we reach section 's' stop our seach.  This prevents two
@@ -3332,7 +3331,7 @@ lang_check_section_addresses (void)
          bfd_vma os_end;
 
          /* Only consider loadable sections with real contents.  */
-         if (IGNORE_SECTION (os))
+         if (IGNORE_SECTION (os) || os->size == 0)
            continue;
 
          /* We must check the sections' LMA addresses not their
index ca567cff410e80f03f8ea476f8154ad8576d3793..99769c98f5eb203da963253dc898901b9a52c406 100644 (file)
@@ -1,3 +1,9 @@
+2005-03-16  David Heine  <dlheine@tensilica.com>
+           Bob Wilson  <bob.wilson@acm.org>
+
+       * ld-scripts/empty-orphan.d, ld-scripts/empty-orphan.exp,
+       ld-scripts/empty-orphan.s, ld-scripts/emtpy-orphan.t: New test.
+
 2005-03-16  Alan Modra  <amodra@bigpond.net.au>
 
        * ld-powerpc/tlsexe32.d: Update.