Lines Matching refs:os
41 os.flush(); in writeTo()
52 raw_string_ostream os{body}; member in lld::wasm::__anon2cae4c450111::SubSection
64 raw_ostream &os = bodyOutputStream; in writeBody() local
68 writeUleb128(sub.os, memSize, "MemSize"); in writeBody()
69 writeUleb128(sub.os, memAlign, "MemAlign"); in writeBody()
70 writeUleb128(sub.os, out.elemSec->numEntries(), "TableSize"); in writeBody()
71 writeUleb128(sub.os, 0, "TableAlign"); in writeBody()
72 sub.writeTo(os); in writeBody()
77 writeUleb128(sub.os, symtab->sharedFiles.size(), "Needed"); in writeBody()
79 writeStr(sub.os, llvm::sys::path::filename(so->getName()), "so name"); in writeBody()
80 sub.writeTo(os); in writeBody()
104 writeUleb128(sub.os, exportInfo.size(), "num exports"); in writeBody()
114 writeStr(sub.os, name, "sym name"); in writeBody()
115 writeUleb128(sub.os, sym->flags, "sym flags"); in writeBody()
118 sub.writeTo(os); in writeBody()
123 writeUleb128(sub.os, importInfo.size(), "num imports"); in writeBody()
129 writeStr(sub.os, module, "import module"); in writeBody()
130 writeStr(sub.os, name, "import name"); in writeBody()
131 writeUleb128(sub.os, sym->flags, "sym flags"); in writeBody()
134 sub.writeTo(os); in writeBody()
231 raw_ostream &os = bodyOutputStream; in writeBody() local
233 writeUleb128(os, getNumImports(), "import count"); in writeBody()
252 writeImport(os, import); in writeBody()
274 writeImport(os, import); in writeBody()
287 writeImport(os, import); in writeBody()
292 raw_ostream &os = bodyOutputStream; in writeBody() local
294 writeUleb128(os, inputFunctions.size(), "function count"); in writeBody()
296 writeUleb128(os, out.typeSec->lookupType(func->signature), "sig index"); in writeBody()
309 raw_ostream &os = bodyOutputStream; in writeBody() local
311 writeUleb128(os, inputTables.size(), "table count"); in writeBody()
313 writeTableType(os, table->getType()); in writeBody()
351 raw_ostream &os = bodyOutputStream; in writeBody() local
354 writeUleb128(os, 1, "memory count"); in writeBody()
362 writeUleb128(os, flags, "memory limits flags"); in writeBody()
363 writeUleb128(os, numMemoryPages, "initial pages"); in writeBody()
365 writeUleb128(os, maxMemoryPages, "max pages"); in writeBody()
369 raw_ostream &os = bodyOutputStream; in writeBody() local
371 writeUleb128(os, inputTags.size(), "tag count"); in writeBody()
373 writeUleb128(os, 0, "tag attribute"); // Reserved "attribute" field in writeBody()
374 writeUleb128(os, out.typeSec->lookupType(t->signature), "sig index"); in writeBody()
416 void GlobalSection::generateRelocationCode(raw_ostream &os, bool TLS) const { in generateRelocationCode() argument
430 writeU8(os, WASM_OPCODE_GLOBAL_GET, "GLOBAL_GET"); in generateRelocationCode()
432 writeUleb128(os, WasmSym::tlsBase->getGlobalIndex(), "__tls_base"); in generateRelocationCode()
434 writeUleb128(os, WasmSym::memoryBase->getGlobalIndex(), in generateRelocationCode()
438 writeU8(os, opcode_ptr_const, "CONST"); in generateRelocationCode()
439 writeSleb128(os, d->getVA(), "offset"); in generateRelocationCode()
444 writeU8(os, WASM_OPCODE_GLOBAL_GET, "GLOBAL_GET"); in generateRelocationCode()
445 writeUleb128(os, WasmSym::tableBase->getGlobalIndex(), "__table_base"); in generateRelocationCode()
448 writeU8(os, opcode_ptr_const, "CONST"); in generateRelocationCode()
449 writeSleb128(os, f->getTableIndex(), "offset"); in generateRelocationCode()
454 writeU8(os, opcode_ptr_add, "ADD"); in generateRelocationCode()
455 writeU8(os, WASM_OPCODE_GLOBAL_SET, "GLOBAL_SET"); in generateRelocationCode()
456 writeUleb128(os, sym->getGOTIndex(), "got_entry"); in generateRelocationCode()
461 raw_ostream &os = bodyOutputStream; in writeBody() local
463 writeUleb128(os, numGlobals(), "global count"); in writeBody()
465 writeGlobalType(os, g->getType()); in writeBody()
466 writeInitExpr(os, g->getInitExpr()); in writeBody()
484 writeGlobalType(os, type); in writeBody()
491 writeU8(os, WASM_OPCODE_GLOBAL_GET, "global get"); in writeBody()
492 writeUleb128(os, WasmSym::memoryBase->getGlobalIndex(), in writeBody()
495 writePtrConst(os, d->getVA(), is64, "offset"); in writeBody()
496 writeU8(os, is64 ? WASM_OPCODE_I64_ADD : WASM_OPCODE_I32_ADD, "add"); in writeBody()
498 writeU8(os, WASM_OPCODE_END, "opcode:end"); in writeBody()
509 writeInitExpr(os, initExpr); in writeBody()
514 writeGlobalType(os, type); in writeBody()
515 writeInitExpr(os, intConst(sym->getVA(), is64)); in writeBody()
527 raw_ostream &os = bodyOutputStream; in writeBody() local
529 writeUleb128(os, exports.size(), "export count"); in writeBody()
531 writeExport(os, export_); in writeBody()
539 raw_ostream &os = bodyOutputStream; in writeBody() local
540 writeUleb128(os, WasmSym::startFunction->getFunctionIndex(), in writeBody()
555 raw_ostream &os = bodyOutputStream; in writeBody() local
558 writeUleb128(os, 1, "segment count"); in writeBody()
563 writeUleb128(os, flags, "elem segment flags"); in writeBody()
565 writeUleb128(os, tableNumber, "table number"); in writeBody()
579 writeInitExpr(os, initExpr); in writeBody()
585 writeU8(os, elemKind, "elem kind"); in writeBody()
588 writeUleb128(os, indirectFunctions.size(), "elem count"); in writeBody()
593 writeUleb128(os, sym->getFunctionIndex(), "function index"); in writeBody()
614 raw_ostream &os = bodyOutputStream; in writeBody() local
616 writeUleb128(os, WasmMetadataVersion, "Version"); in writeBody()
620 writeUleb128(sub.os, symtabEntries.size(), "num symbols"); in writeBody()
627 writeU8(sub.os, kind, "sym kind"); in writeBody()
628 writeUleb128(sub.os, flags, "sym flags"); in writeBody()
632 writeUleb128(sub.os, d->getExportedFunctionIndex(), "index"); in writeBody()
634 writeUleb128(sub.os, f->getFunctionIndex(), "index"); in writeBody()
637 writeStr(sub.os, sym->getName(), "sym name"); in writeBody()
639 writeUleb128(sub.os, g->getGlobalIndex(), "index"); in writeBody()
641 writeStr(sub.os, sym->getName(), "sym name"); in writeBody()
643 writeUleb128(sub.os, t->getTagIndex(), "index"); in writeBody()
645 writeStr(sub.os, sym->getName(), "sym name"); in writeBody()
647 writeUleb128(sub.os, t->getTableNumber(), "table number"); in writeBody()
649 writeStr(sub.os, sym->getName(), "sym name"); in writeBody()
651 writeStr(sub.os, sym->getName(), "sym name"); in writeBody()
653 writeUleb128(sub.os, dataSym->getOutputSegmentIndex(), "index"); in writeBody()
654 writeUleb128(sub.os, dataSym->getOutputSegmentOffset(), in writeBody()
656 writeUleb128(sub.os, dataSym->getSize(), "data size"); in writeBody()
660 writeUleb128(sub.os, s->section->sectionIndex, "sym section index"); in writeBody()
664 sub.writeTo(os); in writeBody()
669 writeUleb128(sub.os, dataSegments.size(), "num data segments"); in writeBody()
671 writeStr(sub.os, s->name, "segment name"); in writeBody()
672 writeUleb128(sub.os, s->alignment, "alignment"); in writeBody()
673 writeUleb128(sub.os, s->linkingFlags, "flags"); in writeBody()
675 sub.writeTo(os); in writeBody()
680 writeUleb128(sub.os, initFunctions.size(), "num init functions"); in writeBody()
682 writeUleb128(sub.os, f.priority, "priority"); in writeBody()
683 writeUleb128(sub.os, f.sym->getOutputSymbolIndex(), "function index"); in writeBody()
685 sub.writeTo(os); in writeBody()
715 writeUleb128(sub.os, comdats.size(), "num comdats"); in writeBody()
717 writeStr(sub.os, c.first, "comdat name"); in writeBody()
718 writeUleb128(sub.os, 0, "comdat flags"); // flags for future use in writeBody()
719 writeUleb128(sub.os, c.second.size(), "num entries"); in writeBody()
721 writeU8(sub.os, entry.kind, "entry kind"); in writeBody()
722 writeUleb128(sub.os, entry.index, "entry index"); in writeBody()
725 sub.writeTo(os); in writeBody()
770 writeUleb128(sub.os, count, "name count"); in writeBody()
777 writeUleb128(sub.os, f->getFunctionIndex(), "func index"); in writeBody()
778 writeStr(sub.os, toString(*s), "symbol name"); in writeBody()
783 writeUleb128(sub.os, f->getFunctionIndex(), "func index"); in writeBody()
785 writeStr(sub.os, f->debugName, "symbol name"); in writeBody()
787 writeStr(sub.os, maybeDemangleSymbol(f->name), "symbol name"); in writeBody()
797 writeUleb128(sub.os, count, "name count"); in writeBody()
801 writeUleb128(sub.os, g->getGlobalIndex(), "global index"); in writeBody()
802 writeStr(sub.os, toString(*s), "symbol name"); in writeBody()
806 writeUleb128(sub.os, s->getGOTIndex(), "global index"); in writeBody()
807 writeStr(sub.os, toString(*s), "symbol name"); in writeBody()
811 writeUleb128(sub.os, g->getAssignedIndex(), "global index"); in writeBody()
812 writeStr(sub.os, maybeDemangleSymbol(g->getName()), "symbol name"); in writeBody()
816 writeUleb128(sub.os, s->getGOTIndex(), "global index"); in writeBody()
818 writeStr(sub.os, "GOT.func.internal." + toString(*s), "symbol name"); in writeBody()
820 writeStr(sub.os, "GOT.data.internal." + toString(*s), "symbol name"); in writeBody()
829 writeUleb128(sub.os, count, "name count"); in writeBody()
833 writeUleb128(sub.os, s->index, "global index"); in writeBody()
834 writeStr(sub.os, s->name, "segment name"); in writeBody()
856 auto &os = bodyOutputStream; in writeBody() local
857 writeUleb128(os, fieldCount(), "field count"); in writeBody()
863 writeStr(os, field.first, "field name"); in writeBody()
864 writeUleb128(os, field.second.size(), "number of entries"); in writeBody()
866 writeStr(os, entry.first, "producer name"); in writeBody()
867 writeStr(os, entry.second, "producer version"); in writeBody()
875 auto &os = bodyOutputStream; in writeBody() local
876 writeUleb128(os, emitted.size(), "feature count"); in writeBody()
878 writeU8(os, WASM_FEATURE_PREFIX_USED, "feature used prefix"); in writeBody()
879 writeStr(os, feature, "feature name"); in writeBody()