[llvm] [WebAssembly] Handle symbols in `.init_array` sections (PR #119127)
George Stagg via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 9 06:33:57 PST 2024
================
@@ -1482,10 +1482,6 @@ uint64_t WasmObjectWriter::writeOneObject(MCAssembler &Asm,
LLVM_DEBUG(dbgs() << "Processing Section " << SectionName << " group "
<< Section.getGroup() << "\n";);
- // .init_array sections are handled specially elsewhere.
- if (SectionName.starts_with(".init_array"))
- continue;
----------------
georgestagg wrote:
Yes, I think we can do that. Good idea!
I've added code to include the `.init_array` sections' data only if there are symbols referencing that section.
It also means we don't have to tweak the existing tests, which is nice.
https://github.com/llvm/llvm-project/pull/119127
More information about the llvm-commits
mailing list