summaryrefslogtreecommitdiffstats
path: root/bfd/elfcode.h
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2001-10-19 16:29:12 +0000
committerH.J. Lu <hjl.tools@gmail.com>2001-10-19 16:29:12 +0000
commite0740195c75d53414bc5ff6641bf29d281ead98b (patch)
tree390b9db97f9bd73542af8b4defd170996e960a84 /bfd/elfcode.h
parent59d28a9467412a663aca6f1e3e6274c82cd7a8bc (diff)
downloadppe42-binutils-e0740195c75d53414bc5ff6641bf29d281ead98b.tar.gz
ppe42-binutils-e0740195c75d53414bc5ff6641bf29d281ead98b.zip
2001-10-19 H.J. Lu <hjl@gnu.org>
* elfcode.h (elf_object_p): Don't clear D_PAGED if the section size is empty.
Diffstat (limited to 'bfd/elfcode.h')
-rw-r--r--bfd/elfcode.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/bfd/elfcode.h b/bfd/elfcode.h
index d634219509..b5da87fcc3 100644
--- a/bfd/elfcode.h
+++ b/bfd/elfcode.h
@@ -656,7 +656,8 @@ elf_object_p (abfd)
/* If the section is loaded, but not page aligned, clear
D_PAGED. */
- if ((i_shdrp[shindex].sh_flags & SHF_ALLOC) != 0
+ if (i_shdrp[shindex].sh_size != 0
+ && (i_shdrp[shindex].sh_flags & SHF_ALLOC) != 0
&& i_shdrp[shindex].sh_type != SHT_NOBITS
&& (((i_shdrp[shindex].sh_addr - i_shdrp[shindex].sh_offset)
% ebd->maxpagesize)
OpenPOWER on IntegriCloud