diff options
author | Alan Modra <amodra@bigpond.net.au> | 2013-10-17 10:09:03 +0000 |
---|---|---|
committer | Alan Modra <amodra@bigpond.net.au> | 2013-10-17 10:09:03 +0000 |
commit | 82103a216b9181ef936ad6112e2fbda13719d909 (patch) | |
tree | 93b34342e33a787dc1f1ba45f383906910719ef3 | |
parent | 4436dd3312c3a840578d0fa437405a1c2d41411b (diff) | |
download | gdb-82103a216b9181ef936ad6112e2fbda13719d909.tar.gz |
PR 16056
* elf.c (copy_elf_program_header): Only consider SEC_ALLOC sections
when finding lowest_section.
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/elf.c | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index a0c8917c8dd..4036807a2e1 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-09 Roland McGrath <mcgrathr@google.com> * elf64-alpha.c (elf64_alpha_relax_tls_get_addr): Cast switch diff --git a/bfd/elf.c b/bfd/elf.c index bf05ae0a802..8df38ee3792 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 |