From b0e995058df18d12c799569b0d4751cf81ed05de Mon Sep 17 00:00:00 2001 From: Jonathan Gray Date: Thu, 23 Jul 2020 14:53:49 +0000 Subject: 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@ --- gnu/usr.bin/binutils/bfd/elf64-x86-64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnu/usr.bin/binutils') 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 -- cgit v1.2.3