summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/binutils
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2020-07-23 14:53:49 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2020-07-23 14:53:49 +0000
commitb0e995058df18d12c799569b0d4751cf81ed05de (patch)
treea2a44e0eeae5d389735ab160e94a76c56ecfb561 /gnu/usr.bin/binutils
parentfa9b1c4b871c5bd2cdd83e078b3be1e926f8e3df (diff)
change bfd amd64 ELF_MAXPAGESIZE from 1M to 4K
An amd64 clang 10 binary built with lld 10 would abort after calling execve(2) if it had been stripped. PT_LOAD segment aligment being changed by strip was the cause. Changing to 4K matches lld and results in a working binary after strip. Introducing ELF_MINPAGESIZE of 4K (which is ELF_MAXPAGESIZE if not defined by the arch) would have also worked but we don't support large pages in userland. ok kettenis@
Diffstat (limited to 'gnu/usr.bin/binutils')
-rw-r--r--gnu/usr.bin/binutils/bfd/elf64-x86-64.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gnu/usr.bin/binutils/bfd/elf64-x86-64.c b/gnu/usr.bin/binutils/bfd/elf64-x86-64.c
index d47c10e3b87..1a3d6fd4783 100644
--- a/gnu/usr.bin/binutils/bfd/elf64-x86-64.c
+++ b/gnu/usr.bin/binutils/bfd/elf64-x86-64.c
@@ -2772,7 +2772,7 @@ elf64_x86_64_section_from_shdr (bfd *abfd,
#define TARGET_LITTLE_NAME "elf64-x86-64"
#define ELF_ARCH bfd_arch_i386
#define ELF_MACHINE_CODE EM_X86_64
-#define ELF_MAXPAGESIZE 0x100000
+#define ELF_MAXPAGESIZE 0x1000
#define elf_backend_can_gc_sections 1
#define elf_backend_can_refcount 1