diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2020-07-23 14:53:49 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2020-07-23 14:53:49 +0000 |
commit | b0e995058df18d12c799569b0d4751cf81ed05de (patch) | |
tree | a2a44e0eeae5d389735ab160e94a76c56ecfb561 /gnu/usr.bin | |
parent | fa9b1c4b871c5bd2cdd83e078b3be1e926f8e3df (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')
-rw-r--r-- | gnu/usr.bin/binutils-2.17/bfd/elf64-x86-64.c | 2 | ||||
-rw-r--r-- | gnu/usr.bin/binutils/bfd/elf64-x86-64.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/gnu/usr.bin/binutils-2.17/bfd/elf64-x86-64.c b/gnu/usr.bin/binutils-2.17/bfd/elf64-x86-64.c index 9efe78f624e..2ff3814838c 100644 --- a/gnu/usr.bin/binutils-2.17/bfd/elf64-x86-64.c +++ b/gnu/usr.bin/binutils-2.17/bfd/elf64-x86-64.c @@ -3644,7 +3644,7 @@ static const struct bfd_elf_special_section #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 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 |