For example:
$ cat test.c
[[clang::annotate("foobar")]]
int main() {
return 0;
}
$ emcc -Oz test.c
$ llvm-objdump -h a.out.wasm
a.out.wasm: file format wasm
Sections:
Idx Name Size VMA Type
0 TYPE 0000000a 0000000a
1 FUNCTION 00000003 00000016
2 MEMORY 00000006 0000001b
3 EXPORT 0000000d 00000023
4 CODE 00000009 00000032 TEXT
5 llvm.func_attr.annotate.foobar 00000004 0000003d
Here you can see the foobar custom section in the final binary.