From: H.J. Lu Date: Fri, 1 Dec 2006 15:55:29 +0000 (+0000) Subject: 2006-12-01 H.J. Lu X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=945c025aafa9f4f36cdc5bb2f1dad083fa34a6d2;p=binutils-gdb.git 2006-12-01 H.J. Lu 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. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 614deff0d25..dbbddd58d11 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,10 @@ +2006-12-01 H.J. Lu + + 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 PR 3609 diff --git a/bfd/elf.c b/bfd/elf.c index 3126fe6e218..943db786bbc 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;