aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2006-12-01 15:55:29 +0000
committerH.J. Lu <hjl.tools@gmail.com>2006-12-01 15:55:29 +0000
commit945c025aafa9f4f36cdc5bb2f1dad083fa34a6d2 (patch)
treea7eb775b9fb4173c9b7789ebb2ee8e6b4ae51e11 /bfd/elf.c
parented7841b3f015cb072844e81fb5623f2aed3d90b5 (diff)
downloadgdb-945c025aafa9f4f36cdc5bb2f1dad083fa34a6d2.zip
gdb-945c025aafa9f4f36cdc5bb2f1dad083fa34a6d2.tar.gz
gdb-945c025aafa9f4f36cdc5bb2f1dad083fa34a6d2.tar.bz2
2006-12-01 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/3609 * elf.c (rewrite_elf_program_header): Preserve segment physical address in the output segment if the first section in the corresponding input segment is null.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index 3126fe6..943db78 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -5431,7 +5431,7 @@ rewrite_elf_program_header (bfd *ibfd, bfd *obfd)
/* If the first section in the input segment is removed, there is
no need to preserve segment physical address in the corresponding
output segment. */
- if (first_section != NULL && first_section->output_section != NULL)
+ if (!first_section || first_section->output_section != NULL)
{
map->p_paddr = segment->p_paddr;
map->p_paddr_valid = 1;