From: robert Date: Sun, 12 Nov 2023 11:43:04 +0000 (+0000) Subject: flip the ignoreFunctionAddressEquality flag; lost in merging changes from llvm-13 X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=d960db3d279df18c79b2fe025d0f2113c147921b;p=openbsd flip the ignoreFunctionAddressEquality flag; lost in merging changes from llvm-13 --- diff --git a/gnu/llvm/lld/ELF/Driver.cpp b/gnu/llvm/lld/ELF/Driver.cpp index 3eca6aad5e6..e0c6e5dd9c3 100644 --- a/gnu/llvm/lld/ELF/Driver.cpp +++ b/gnu/llvm/lld/ELF/Driver.cpp @@ -1135,8 +1135,15 @@ static void readConfigs(opt::InputArgList &args) { config->icf = getICF(args); config->ignoreDataAddressEquality = args.hasArg(OPT_ignore_data_address_equality); +#if defined(__OpenBSD__) + // Needed to allow preemption of protected symbols (e.g. memcpy) on at least i386. + config->ignoreFunctionAddressEquality = + args.hasFlag(OPT_ignore_function_address_equality, + OPT_no_ignore_function_address_equality, true); +#else config->ignoreFunctionAddressEquality = args.hasArg(OPT_ignore_function_address_equality); +#endif config->init = args.getLastArgValue(OPT_init, "_init"); config->ltoAAPipeline = args.getLastArgValue(OPT_lto_aa_pipeline); config->ltoCSProfileGenerate = args.hasArg(OPT_lto_cs_profile_generate);