summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2016-07-26 02:38:13 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2016-07-26 02:38:13 +0000
commit635a0733afddf26b12fb5bedc7c7dfbeaec51123 (patch)
treea72be8e5226e945b96033a06ecba03eb0bea0fac /gnu
parentfa05b69c3d132fbb733fe59517e2eb3685e68c0d (diff)
Make sure there's space for the PT_OPENBSD_WXNEEDED segment, if requested
problem noted by Juan Francisco Cantero Hurtado (iam (at) juanfra.info) ok deraadt@
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/binutils-2.17/bfd/elf.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gnu/usr.bin/binutils-2.17/bfd/elf.c b/gnu/usr.bin/binutils-2.17/bfd/elf.c
index c73238b0c28..2e874b8d166 100644
--- a/gnu/usr.bin/binutils-2.17/bfd/elf.c
+++ b/gnu/usr.bin/binutils-2.17/bfd/elf.c
@@ -4731,6 +4731,12 @@ get_program_header_size (bfd *abfd)
++segs;
}
+ if (elf_tdata (abfd)->wxneeded)
+ {
+ /* We need a PT_OPENBSD_WXNEEDED segment. */
+ ++segs;
+ }
+
for (s = abfd->sections; s != NULL; s = s->next)
{
if ((s->flags & SEC_LOAD) != 0