From e0740195c75d53414bc5ff6641bf29d281ead98b Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 19 Oct 2001 16:29:12 +0000 Subject: [PATCH] 2001-10-19 H.J. Lu * elfcode.h (elf_object_p): Don't clear D_PAGED if the section size is empty. --- bfd/ChangeLog | 5 +++++ bfd/elfcode.h | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index e5afb2263bb..9bc656f7cae 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2001-10-19 H.J. Lu + + * elfcode.h (elf_object_p): Don't clear D_PAGED if the section + size is empty. + 2001-10-18 H.J. Lu * elf32-i370.c (i370_elf_relocate_section): Ignore R_XXX_NONE. diff --git a/bfd/elfcode.h b/bfd/elfcode.h index d6342195099..b5da87fcc33 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) -- 2.30.2