From d960db3d279df18c79b2fe025d0f2113c147921b Mon Sep 17 00:00:00 2001 From: robert Date: Sun, 12 Nov 2023 11:43:04 +0000 Subject: [PATCH] flip the ignoreFunctionAddressEquality flag; lost in merging changes from llvm-13 --- gnu/llvm/lld/ELF/Driver.cpp | 7 +++++++ 1 file changed, 7 insertions(+) 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); -- 2.20.1