summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl@lucon.org>2006-12-01 15:55:29 +0000
committerH.J. Lu <hjl@lucon.org>2006-12-01 15:55:29 +0000
commit5e26786d45701626a8a94445cb6a6d12c4e7990d (patch)
treedd574c8b62013d4b9de9fdeb181e161d4397d794
parentbcfd203fd2ec744de7d4d0333e95195b34d3f950 (diff)
downloadbinutils-redhat-5e26786d45701626a8a94445cb6a6d12c4e7990d.tar.gz
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.
-rw-r--r--bfd/ChangeLog7
-rw-r--r--bfd/elf.c2
2 files changed, 8 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 614deff0d2..dbbddd58d1 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,10 @@
+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.
+
2006-12-01 Nick Clifton <nickc@redhat.com>
PR 3609
diff --git a/bfd/elf.c b/bfd/elf.c
index 3126fe6e21..943db786bb 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;