From c91a0f502346babf19c59a6b6d974a94c32ea1b1 Mon Sep 17 00:00:00 2001 From: deraadt Date: Sat, 7 Jan 2023 16:01:58 +0000 Subject: [PATCH] accept --executable-only on aarch64, riscv64, and mips64 because the linker is creating correct binaries. There can also be problems with compilers generating incorrect data-inside-text, but those (so far minor) issues are being resolved seperately. ok kettenis --- gnu/llvm/lld/ELF/Driver.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/gnu/llvm/lld/ELF/Driver.cpp b/gnu/llvm/lld/ELF/Driver.cpp index f2de4ec1b3d..4eb87a2b199 100644 --- a/gnu/llvm/lld/ELF/Driver.cpp +++ b/gnu/llvm/lld/ELF/Driver.cpp @@ -358,8 +358,14 @@ static void checkOptions() { } if (config->executeOnly) { - if (config->emachine != EM_AARCH64) - error("-execute-only is only supported on AArch64 targets"); + switch (config->emachine) { + case EM_AARCH64: + case EM_RISCV: + case EM_MIPS: + break; + default: + error("-execute-only is not supported on this target"); + } if (config->singleRoRx && !script->hasSectionsCommand) error("-execute-only and -no-rosegment cannot be used together"); -- 2.20.1