[lld] [llvm] [LLD] Add support for two special OpenBSD sections (PR #97122)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 30 16:54:24 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 3cf762b7b77e62761eedde02f03e968353bdb7a0 cfbef14d3974f1dd8607da9191b5ab89269ef0e5 -- lld/ELF/ScriptParser.cpp lld/ELF/Writer.cpp llvm/include/llvm/MC/MCELFObjectWriter.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp
index 0f8f963322..9525214ad9 100644
--- a/lld/ELF/Writer.cpp
+++ b/lld/ELF/Writer.cpp
@@ -602,13 +602,13 @@ static bool isRelroSection(const OutputSection *sec) {
// magic section names.
StringRef s = sec->name;
- bool abiAgnostic =
- s == ".data.rel.ro" || s == ".bss.rel.ro" || s == ".ctors" ||
- s == ".dtors" || s == ".jcr" || s == ".eh_frame" ||
- s == ".fini_array" || s == ".init_array" || s == ".preinit_array";
+ bool abiAgnostic = s == ".data.rel.ro" || s == ".bss.rel.ro" ||
+ s == ".ctors" || s == ".dtors" || s == ".jcr" ||
+ s == ".eh_frame" || s == ".fini_array" ||
+ s == ".init_array" || s == ".preinit_array";
bool abiSpecific =
- config->osabi == ELFOSABI_OPENBSD && s == ".openbsd.randomdata";
+ config->osabi == ELFOSABI_OPENBSD && s == ".openbsd.randomdata";
return abiAgnostic || abiSpecific;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/97122
More information about the llvm-commits
mailing list