aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-frv.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf32-frv.c')
-rw-r--r--bfd/elf32-frv.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/bfd/elf32-frv.c b/bfd/elf32-frv.c
index 1758e27..de2358b 100644
--- a/bfd/elf32-frv.c
+++ b/bfd/elf32-frv.c
@@ -5757,8 +5757,11 @@ elf32_frvfdpic_modify_segment_map (bfd *output_bfd,
/* Add the stack section to the PT_GNU_STACK segment,
such that its size and alignment requirements make it
to the segment. */
- m->sections[m->count] = sec;
- m->count++;
+ if (m->count == 0)
+ {
+ m->sections[m->count] = sec;
+ m->count++;
+ }
}
}