OSDN Git Service

2006-12-01 H.J. Lu <hongjiu.lu@intel.com>
authorH.J. Lu <hjl@lucon.org>
Fri, 1 Dec 2006 15:55:29 +0000 (15:55 +0000)
committerH.J. Lu <hjl@lucon.org>
Fri, 1 Dec 2006 15:55:29 +0000 (15:55 +0000)
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.

bfd/ChangeLog
bfd/elf.c

index 614deff..dbbddd5 100644 (file)
@@ -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
index 3126fe6..943db78 100644 (file)
--- 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;