aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
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 fd3135a..c9887c3 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2014-03-12 Alan Modra <amodra@gmail.com>
+
+ PR 16690
+ * elf.c (copy_elf_program_header): Ignore first section lma if
+ non-alloc.
+
2014-03-11 Alan Modra <amodra@gmail.com>
PR 16686
diff --git a/bfd/elf.c b/bfd/elf.c
index ce7878c..3ded683 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -6259,7 +6259,7 @@ copy_elf_program_header (bfd *ibfd, bfd *obfd)
phdr_included = TRUE;
}
- lowest_section = first_section;
+ lowest_section = NULL;
if (section_count != 0)
{
unsigned int isec = 0;
@@ -6276,7 +6276,8 @@ copy_elf_program_header (bfd *ibfd, bfd *obfd)
{
bfd_vma seg_off;
- if (section->lma < lowest_section->lma)
+ if (lowest_section == NULL
+ || section->lma < lowest_section->lma)
lowest_section = section;
/* Section lmas are set up from PT_LOAD header