From: Bob Wilson Date: Thu, 17 Mar 2005 16:37:40 +0000 (+0000) Subject: ld/ChangeLog: X-Git-Tag: binutils-csl-arm-2005q1-branchpoint~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=591dad2bc8e08e81ee9d8acbbc356cd89189b2e9;p=thirdparty%2Fbinutils-gdb.git ld/ChangeLog: * 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. --- diff --git a/ld/ChangeLog b/ld/ChangeLog index ce29eb9fc00..ee50c1c9ef4 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,9 @@ +2005-03-16 David Heine + Bob Wilson + + * ldlang.c (IGNORE_SECTION): Remove check for zero size. + (lang_check_section_addresses): Ignore zero size sections here. + 2005-03-16 Alan Modra * emulparams/elf32ppclinux.sh (OTHER_READWRITE_SECTION): Delete. diff --git a/ld/ldlang.c b/ld/ldlang.c index 636dc7f5c47..c38423ea4c6 100644 --- a/ld/ldlang.c +++ b/ld/ldlang.c @@ -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 diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index ca567cff410..99769c98f5e 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2005-03-16 David Heine + Bob Wilson + + * 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 * ld-powerpc/tlsexe32.d: Update.