--- llvm-11.0.0.src/tools/lld/ELF/Driver.cpp.alt-mipsel-permit-textrels-by-default 2020-10-13 13:49:23.400105640 +0000 +++ llvm-11.0.0.src/tools/lld/ELF/Driver.cpp 2020-10-13 13:54:34.122151784 +0000 @@ -1067,7 +1067,11 @@ static void readConfigs(opt::InputArgLis config->zShstk = hasZOption(args, "shstk"); config->zStackSize = args::getZOptionValue(args, OPT_z, "stack-size", 0); config->zStartStopVisibility = getZStartStopVisibility(args); +#if defined __MIPSEL__ && !defined __mips64 + Config->ZText = getZFlag(Args, "text", "notext", false); +#else config->zText = getZFlag(args, "text", "notext", true); +#endif config->zWxneeded = hasZOption(args, "wxneeded"); for (opt::Arg *arg : args.filtered(OPT_z)) {