[lld] [lld][ELF] Improve the vulnerability in Orphan Sections initialization (PR #156354)
Peter Smith via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 2 05:32:42 PDT 2025
================
@@ -1037,10 +1037,14 @@ void LinkerScript::addOrphanSections() {
if (ctx.arg.relocatable && (isec->flags & SHF_LINK_ORDER))
continue;
- if (auto *sec = dyn_cast<InputSection>(isec))
- if (InputSectionBase *rel = sec->getRelocatedSection())
+ if (auto *sec = dyn_cast<InputSection>(isec)){
----------------
smithp35 wrote:
Can you git clang-format the patch? I would expect a space between `){` i.e. `(isec)) {`
https://github.com/llvm/llvm-project/pull/156354
More information about the llvm-commits
mailing list