Open Quuxplusone opened 4 years ago
Currently I can write the following llvm code and it will generate a working working object file:
@foo = global i32 42, section "mysection", align 4
However if I output to assembly I get:
$ llc --mtriple=wasm32 --asm-verbose=false test.ll -o - .type foo,@object .section mysection,"aw",@ .globl foo .p2align 2 foo: .int32 42 .size foo, 4
Which the assembly reader rejects:
$ llvm-mc -triple=wasm32-unknown-unknown test.s test.s:2:23: error: unknown section kind: mysection .section mysection,"",@
I guess we need to somehow mark the section as data in the .s we output (we could add the .data prefix maybe?).
.data
We we have to have some heuristic about detecting the sections types when reading .s input.
Currently I can write the following llvm code and it will generate a working working object file:
However if I output to assembly I get:
Which the assembly reader rejects: