[lld] [llvm] [WebAssembly] Add segment NO_STRIP flag to support private retained data (PR #81539)

Sam Clegg via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 12 14:59:56 PST 2024


================
@@ -70,6 +70,8 @@ void MCSectionWasm::printSwitchToSection(const MCAsmInfo &MAI, const Triple &T,
     OS << 'S';
   if (SegmentFlags & wasm::WASM_SEG_FLAG_TLS)
     OS << 'T';
+  if (SegmentFlags & wasm::WASM_SEG_FLAG_NO_STRIP)
+    OS << 'R';
----------------
sbc100 wrote:

For the record, it looks like `SHF_MIPS_NOSTRIP` also exists in the ELF world and `SHF_GNU_RETAIN` is a GNU extension rather than part of ELF core.



https://github.com/llvm/llvm-project/pull/81539


More information about the llvm-commits mailing list