aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2013-10-17 10:05:38 +0000
committerAlan Modra <amodra@gmail.com>2013-10-17 10:05:38 +0000
commitfb8a5684908bc6973d074f67618fdd477a3a85ef (patch)
tree20f20fb40e469f589519dfa076860335e340508f /bfd
parenteade64714c64b09ed01d8f5dd9c5872a55a0381c (diff)
downloadfsf-binutils-gdb-fb8a5684908bc6973d074f67618fdd477a3a85ef.zip
fsf-binutils-gdb-fb8a5684908bc6973d074f67618fdd477a3a85ef.tar.gz
fsf-binutils-gdb-fb8a5684908bc6973d074f67618fdd477a3a85ef.tar.bz2
PR 16056
* elf.c (copy_elf_program_header): Only consider SEC_ALLOC sections when finding lowest_section.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elf.c5
2 files changed, 9 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index f9a0575..1f9b698 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -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.
diff --git a/bfd/elf.c b/bfd/elf.c
index bf05ae0..8df38ee 100644
--- 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