[PATCH] D95838: [WebAssembly] Prevent data inside text sections in assembly

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 4 16:18:40 PST 2021


sbc100 accepted this revision.
sbc100 added inline comments.


================
Comment at: llvm/include/llvm/MC/MCSymbolWasm.h:52
+  // the default. If possible, call getDefinedType instead, and/or ensure
+  // symbols always have the correct type set when constructed.
+  wasm::WasmSymbolType getType() const {
----------------
Any reason to keep the deprecated method around?  Why not just remove it?     I guess a followup that removes it would be fine too.


================
Comment at: llvm/test/MC/WebAssembly/basic-assembly-errors.s:7
 
+# CHECK: WASM doesn't support data symbols in text sections
+	.type	objerr, at object
----------------
wasm or Wasm rather than WASM.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95838/new/

https://reviews.llvm.org/D95838



More information about the llvm-commits mailing list