PR 16056
authorAlan Modra <amodra@gmail.com>
Thu, 17 Oct 2013 10:05:38 +0000 (10:05 +0000)
committerAlan Modra <amodra@gmail.com>
Thu, 17 Oct 2013 10:05:38 +0000 (10:05 +0000)
* elf.c (copy_elf_program_header): Only consider SEC_ALLOC sections
when finding lowest_section.

bfd/ChangeLog
bfd/elf.c

index f9a0575befebc21e4b182ab13fd535dd0b0e492f..1f9b6989618abaf1749b69eb290d09b34d4c1809 100644 (file)
@@ -1,3 +1,9 @@
+2013-10-17  Alan Modra  <amodra@gmail.com>
+
+       PR 16056
+       * elf.c (copy_elf_program_header): Only consider SEC_ALLOC sections
+       when finding lowest_section.
+
 2013-10-14  Chao-ying Fu  <Chao-ying.Fu@imgtec.com>
 
        * elfxx-mips.c (mips_elf_obj_tdata): Add abi_msa_bfd.
index bf05ae0a80246768b21960f6028f27dab1a25f14..8df38ee37923c020994715f111a0ffc6bae83c8c 100644 (file)
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -6226,12 +6226,13 @@ copy_elf_program_header (bfd *ibfd, bfd *obfd)
              if (ELF_SECTION_IN_SEGMENT (this_hdr, segment))
                {
                  map->sections[isec++] = section->output_section;
-                 if (section->lma < lowest_section->lma)
-                   lowest_section = section;
                  if ((section->flags & SEC_ALLOC) != 0)
                    {
                      bfd_vma seg_off;
 
+                     if (section->lma < lowest_section->lma)
+                       lowest_section = section;
+
                      /* Section lmas are set up from PT_LOAD header
                         p_paddr in _bfd_elf_make_section_from_shdr.
                         If this header has a p_paddr that disagrees
This page took 0.032486 seconds and 4 git commands to generate.