| author | |
| committer | |
| log | 37a06f4dcf27c6bb5759656d6abc0d8b290f093f |
| tree | 285802e5224a4f7881913092dd77b3d9779cca1a |
| parent | c0bd2eb3987698ee9b91f6b7ef6eb85526749ed4 |
| signature |
upstream commit 67a4a12d61bfb10b2410b53c5a43ef9b4a03de7d16 files changed, 321 insertions(+), 181 deletions(-)
deps/lld-prebuilt/MinGW/Options.inc+3| ... | @@ -37,6 +37,9 @@ OPTION(prefix_2, "Bdynamic", Bdynamic, Flag, INVALID, INVALID, nullptr, 0, 0, | ... | @@ -37,6 +37,9 @@ OPTION(prefix_2, "Bdynamic", Bdynamic, Flag, INVALID, INVALID, nullptr, 0, 0, |
| 37 | OPTION(prefix_2, "Bstatic", Bstatic, Flag, INVALID, INVALID, nullptr, 0, 0, | 37 | OPTION(prefix_2, "Bstatic", Bstatic, Flag, INVALID, INVALID, nullptr, 0, 0, |
| 38 | "Do not link against shared libraries", nullptr, nullptr) | 38 | "Do not link against shared libraries", nullptr, nullptr) |
| 39 | OPTION(prefix_2, "build-id", anonymous_1, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) | 39 | OPTION(prefix_2, "build-id", anonymous_1, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) |
| 40 | OPTION(prefix_2, "delayload=", delayload_eq, Joined, INVALID, delayload, nullptr, 0, 0, nullptr, nullptr, nullptr) | ||
| 41 | OPTION(prefix_2, "delayload", delayload, Separate, INVALID, INVALID, nullptr, 0, 0, | ||
| 42 | "DLL to load only on demand", nullptr, nullptr) | ||
| 40 | OPTION(prefix_2, "disable-auto-image-base", anonymous_2, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) | 43 | OPTION(prefix_2, "disable-auto-image-base", anonymous_2, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) |
| 41 | OPTION(prefix_2, "dynamicbase", dynamicbase, Flag, INVALID, INVALID, nullptr, 0, 0, | 44 | OPTION(prefix_2, "dynamicbase", dynamicbase, Flag, INVALID, INVALID, nullptr, 0, 0, |
| 42 | "Enable ASLR", nullptr, nullptr) | 45 | "Enable ASLR", nullptr, nullptr) |
deps/lld/COFF/Driver.cpp+3-1| ... | @@ -184,8 +184,10 @@ void LinkerDriver::addBuffer(std::unique_ptr<MemoryBuffer> mb, | ... | @@ -184,8 +184,10 @@ void LinkerDriver::addBuffer(std::unique_ptr<MemoryBuffer> mb, |
| 184 | if (wholeArchive) { | 184 | if (wholeArchive) { |
| 185 | std::unique_ptr<Archive> file = | 185 | std::unique_ptr<Archive> file = |
| 186 | CHECK(Archive::create(mbref), filename + ": failed to parse archive"); | 186 | CHECK(Archive::create(mbref), filename + ": failed to parse archive"); |
| 187 | Archive *archive = file.get(); | ||
| 188 | make<std::unique_ptr<Archive>>(std::move(file)); // take ownership | ||
| 187 | 189 | ||
| 188 | for (MemoryBufferRef m : getArchiveMembers(file.get())) | 190 | for (MemoryBufferRef m : getArchiveMembers(archive)) |
| 189 | addArchiveBuffer(m, "<whole-archive>", filename, 0); | 191 | addArchiveBuffer(m, "<whole-archive>", filename, 0); |
| 190 | return; | 192 | return; |
| 191 | } | 193 | } |
deps/lld/COFF/Writer.cpp+7| ... | @@ -1095,6 +1095,13 @@ Optional<coff_symbol16> Writer::createSymbol(Defined *def) { | ... | @@ -1095,6 +1095,13 @@ Optional<coff_symbol16> Writer::createSymbol(Defined *def) { |
| 1095 | } | 1095 | } |
| 1096 | } | 1096 | } |
| 1097 | 1097 | ||
| 1098 | // Symbols that are runtime pseudo relocations don't point to the actual | ||
| 1099 | // symbol data itself (as they are imported), but points to the IAT entry | ||
| 1100 | // instead. Avoid emitting them to the symbol table, as they can confuse | ||
| 1101 | // debuggers. | ||
| 1102 | if (def->isRuntimePseudoReloc) | ||
| 1103 | return None; | ||
| 1104 | |||
| 1098 | StringRef name = def->getName(); | 1105 | StringRef name = def->getName(); |
| 1099 | if (name.size() > COFF::NameSize) { | 1106 | if (name.size() > COFF::NameSize) { |
| 1100 | sym.Name.Offset.Zeroes = 0; | 1107 | sym.Name.Offset.Zeroes = 0; |
deps/lld/ELF/SyntheticSections.cpp+13-1| ... | @@ -3177,11 +3177,23 @@ static bool isDuplicateArmExidxSec(InputSection *prev, InputSection *cur) { | ... | @@ -3177,11 +3177,23 @@ static bool isDuplicateArmExidxSec(InputSection *prev, InputSection *cur) { |
| 3177 | 3177 | ||
| 3178 | // The .ARM.exidx table must be sorted in ascending order of the address of the | 3178 | // The .ARM.exidx table must be sorted in ascending order of the address of the |
| 3179 | // functions the table describes. Optionally duplicate adjacent table entries | 3179 | // functions the table describes. Optionally duplicate adjacent table entries |
| 3180 | // can be removed. At the end of the function the ExecutableSections must be | 3180 | // can be removed. At the end of the function the executableSections must be |
| 3181 | // sorted in ascending order of address, Sentinel is set to the InputSection | 3181 | // sorted in ascending order of address, Sentinel is set to the InputSection |
| 3182 | // with the highest address and any InputSections that have mergeable | 3182 | // with the highest address and any InputSections that have mergeable |
| 3183 | // .ARM.exidx table entries are removed from it. | 3183 | // .ARM.exidx table entries are removed from it. |
| 3184 | void ARMExidxSyntheticSection::finalizeContents() { | 3184 | void ARMExidxSyntheticSection::finalizeContents() { |
| 3185 | if (script->hasSectionsCommand) { | ||
| 3186 | // The executableSections and exidxSections that we use to derive the | ||
| 3187 | // final contents of this SyntheticSection are populated before the | ||
| 3188 | // linker script assigns InputSections to OutputSections. The linker script | ||
| 3189 | // SECTIONS command may have a /DISCARD/ entry that removes executable | ||
| 3190 | // InputSections and their dependent .ARM.exidx section that we recorded | ||
| 3191 | // earlier. | ||
| 3192 | auto isDiscarded = [](const InputSection *isec) { return !isec->isLive(); }; | ||
| 3193 | llvm::erase_if(executableSections, isDiscarded); | ||
| 3194 | llvm::erase_if(exidxSections, isDiscarded); | ||
| 3195 | } | ||
| 3196 | |||
| 3185 | // Sort the executable sections that may or may not have associated | 3197 | // Sort the executable sections that may or may not have associated |
| 3186 | // .ARM.exidx sections by order of ascending address. This requires the | 3198 | // .ARM.exidx sections by order of ascending address. This requires the |
| 3187 | // relative positions of InputSections to be known. | 3199 | // relative positions of InputSections to be known. |
deps/lld/MinGW/Driver.cpp+2| ... | @@ -303,6 +303,8 @@ bool mingw::link(ArrayRef<const char *> argsArr, raw_ostream &diag) { | ... | @@ -303,6 +303,8 @@ bool mingw::link(ArrayRef<const char *> argsArr, raw_ostream &diag) { |
| 303 | add("-include:" + StringRef(a->getValue())); | 303 | add("-include:" + StringRef(a->getValue())); |
| 304 | for (auto *a : args.filtered(OPT_undefined)) | 304 | for (auto *a : args.filtered(OPT_undefined)) |
| 305 | add("-includeoptional:" + StringRef(a->getValue())); | 305 | add("-includeoptional:" + StringRef(a->getValue())); |
| 306 | for (auto *a : args.filtered(OPT_delayload)) | ||
| 307 | add("-delayload:" + StringRef(a->getValue())); | ||
| 306 | 308 | ||
| 307 | std::vector<StringRef> searchPaths; | 309 | std::vector<StringRef> searchPaths; |
| 308 | for (auto *a : args.filtered(OPT_L)) { | 310 | for (auto *a : args.filtered(OPT_L)) { |
deps/lld/MinGW/Options.td+2| ... | @@ -80,6 +80,8 @@ def require_defined_eq: J<"require-defined=">, Alias<require_defined>; | ... | @@ -80,6 +80,8 @@ def require_defined_eq: J<"require-defined=">, Alias<require_defined>; |
| 80 | def _HASH_HASH_HASH : Flag<["-"], "###">, | 80 | def _HASH_HASH_HASH : Flag<["-"], "###">, |
| 81 | HelpText<"Print (but do not run) the commands to run for this compilation">; | 81 | HelpText<"Print (but do not run) the commands to run for this compilation">; |
| 82 | def appcontainer: F<"appcontainer">, HelpText<"Set the appcontainer flag in the executable">; | 82 | def appcontainer: F<"appcontainer">, HelpText<"Set the appcontainer flag in the executable">; |
| 83 | def delayload: S<"delayload">, HelpText<"DLL to load only on demand">; | ||
| 84 | def delayload_eq: J<"delayload=">, Alias<delayload>; | ||
| 83 | def mllvm: S<"mllvm">; | 85 | def mllvm: S<"mllvm">; |
| 84 | def pdb: S<"pdb">, HelpText<"Output PDB debug info file, chosen implicitly if the argument is empty">; | 86 | def pdb: S<"pdb">, HelpText<"Output PDB debug info file, chosen implicitly if the argument is empty">; |
| 85 | def pdb_eq: J<"pdb=">, Alias<pdb>; | 87 | def pdb_eq: J<"pdb=">, Alias<pdb>; |
deps/lld/docs/ReleaseNotes.rst+9| ... | @@ -28,6 +28,15 @@ ELF Improvements | ... | @@ -28,6 +28,15 @@ ELF Improvements |
| 28 | ``$ ld.lld --call-shared`` now prints | 28 | ``$ ld.lld --call-shared`` now prints |
| 29 | ``unknown argument '--call-shared', did you mean '--call_shared'``. | 29 | ``unknown argument '--call-shared', did you mean '--call_shared'``. |
| 30 | 30 | ||
| 31 | * lld now supports replacing ``JAL`` with ``JALX`` instructions in case | ||
| 32 | of MIPS - microMIPS cross-mode jumps. | ||
| 33 | |||
| 34 | * lld now creates LA25 thunks for MIPS R6 code. | ||
| 35 | |||
| 36 | * Put MIPS-specific .reginfo, .MIPS.options, and .MIPS.abiflags sections | ||
| 37 | into corresponding PT_MIPS_REGINFO, PT_MIPS_OPTIONS, and PT_MIPS_ABIFLAGS | ||
| 38 | segments. | ||
| 39 | |||
| 31 | * ... | 40 | * ... |
| 32 | 41 | ||
| 33 | COFF Improvements | 42 | COFF Improvements |
deps/lld/lib/ReaderWriter/MachO/ArchHandler_x86_64.cpp+1| ... | @@ -621,6 +621,7 @@ void ArchHandler_x86_64::applyFixupFinal( | ... | @@ -621,6 +621,7 @@ void ArchHandler_x86_64::applyFixupFinal( |
| 621 | // Fall into llvm_unreachable(). | 621 | // Fall into llvm_unreachable(). |
| 622 | break; | 622 | break; |
| 623 | } | 623 | } |
| 624 | llvm_unreachable("invalid x86_64 Reference Kind"); | ||
| 624 | } | 625 | } |
| 625 | 626 | ||
| 626 | void ArchHandler_x86_64::applyFixupRelocatable(const Reference &ref, | 627 | void ArchHandler_x86_64::applyFixupRelocatable(const Reference &ref, |
deps/lld/test/COFF/Inputs/mangled-symbol.s created+9| ... | @@ -0,0 +1,9 @@ | ||
| 1 | 	.text | ||
| 2 | |||
| 3 | 	.def "?f@@YAHXZ" | ||
| 4 | 		.scl 2 | ||
| 5 | 		.type 32 | ||
| 6 | 	.endef | ||
| 7 | 	.global "?f@@YAHXZ" | ||
| 8 | "?f@@YAHXZ": | ||
| 9 | 	retq $0 | ||
deps/lld/test/COFF/autoimport-gnu-implib.s+6-1| ... | @@ -7,9 +7,10 @@ | ... | @@ -7,9 +7,10 @@ |
| 7 | # RUN: llvm-ar rcs %t-implib.a %t-dabcdh.o %t-dabcds00000.o %t-dabcdt.o | 7 | # RUN: llvm-ar rcs %t-implib.a %t-dabcdh.o %t-dabcds00000.o %t-dabcdt.o |
| 8 | 8 | ||
| 9 | # RUN: llvm-mc -triple=x86_64-windows-gnu %s -filetype=obj -o %t.obj | 9 | # RUN: llvm-mc -triple=x86_64-windows-gnu %s -filetype=obj -o %t.obj |
| 10 | # RUN: lld-link -lldmingw -out:%t.exe -entry:main %t.obj %t-implib.a -verbose | 10 | # RUN: lld-link -lldmingw -debug:symtab -out:%t.exe -entry:main %t.obj %t-implib.a -verbose |
| 11 | 11 | ||
| 12 | # RUN: llvm-readobj --coff-imports %t.exe | FileCheck -check-prefix=IMPORTS %s | 12 | # RUN: llvm-readobj --coff-imports %t.exe | FileCheck -check-prefix=IMPORTS %s |
| 13 | # RUN: llvm-nm %t.exe | FileCheck -check-prefix=SYMBOLS %s | ||
| 13 | 14 | ||
| 14 | # IMPORTS: Import { | 15 | # IMPORTS: Import { |
| 15 | # IMPORTS-NEXT: Name: foo.dll | 16 | # IMPORTS-NEXT: Name: foo.dll |
| ... | @@ -18,6 +19,10 @@ | ... | @@ -18,6 +19,10 @@ |
| 18 | # IMPORTS-NEXT: Symbol: data (0) | 19 | # IMPORTS-NEXT: Symbol: data (0) |
| 19 | # IMPORTS-NEXT: } | 20 | # IMPORTS-NEXT: } |
| 20 | 21 | ||
| 22 | # Check that the automatically imported symbol "data" is not listed in | ||
| 23 | # the symbol table. | ||
| 24 | # SYMBOLS-NOT: {{ }}data | ||
| 25 | |||
| 21 | .global main | 26 | .global main |
| 22 | .text | 27 | .text |
| 23 | main: | 28 | main: |
deps/lld/test/COFF/autoimport-x86.s+7-2| ... | @@ -5,11 +5,12 @@ | ... | @@ -5,11 +5,12 @@ |
| 5 | # RUN: lld-link -out:%t-lib.dll -dll -entry:DllMainCRTStartup %t-lib.obj -lldmingw -implib:%t-lib.lib | 5 | # RUN: lld-link -out:%t-lib.dll -dll -entry:DllMainCRTStartup %t-lib.obj -lldmingw -implib:%t-lib.lib |
| 6 | 6 | ||
| 7 | # RUN: llvm-mc -triple=x86_64-windows-gnu %s -filetype=obj -o %t.obj | 7 | # RUN: llvm-mc -triple=x86_64-windows-gnu %s -filetype=obj -o %t.obj |
| 8 | # RUN: lld-link -lldmingw -out:%t.exe -entry:main %t.obj %t-lib.lib -verbose | 8 | # RUN: lld-link -lldmingw -debug:symtab -out:%t.exe -entry:main %t.obj %t-lib.lib -verbose |
| 9 | 9 | ||
| 10 | # RUN: llvm-readobj --coff-imports %t.exe | FileCheck -check-prefix=IMPORTS %s | 10 | # RUN: llvm-readobj --coff-imports %t.exe | FileCheck -check-prefix=IMPORTS %s |
| 11 | # RUN: llvm-objdump -d %t.exe | FileCheck -check-prefix=DISASM %s | 11 | # RUN: llvm-objdump -d %t.exe | FileCheck -check-prefix=DISASM %s |
| 12 | # RUN: llvm-objdump -s %t.exe | FileCheck -check-prefix=CONTENTS %s | 12 | # RUN: llvm-objdump -s %t.exe | FileCheck -check-prefix=CONTENTS %s |
| 13 | # RUN: llvm-nm %t.exe | FileCheck -check-prefix=SYMBOLS %s | ||
| 13 | 14 | ||
| 14 | # IMPORTS: Import { | 15 | # IMPORTS: Import { |
| 15 | # IMPORTS-NEXT: Name: autoimport-x86.s.tmp-lib.dll | 16 | # IMPORTS-NEXT: Name: autoimport-x86.s.tmp-lib.dll |
| ... | @@ -20,7 +21,7 @@ | ... | @@ -20,7 +21,7 @@ |
| 20 | 21 | ||
| 21 | # DISASM: Disassembly of section .text: | 22 | # DISASM: Disassembly of section .text: |
| 22 | # DISASM-EMPTY: | 23 | # DISASM-EMPTY: |
| 23 | # DISASM: .text: | 24 | # DISASM: main: |
| 24 | # Relative offset at 0x1002 pointing at the IAT at 0x2080. | 25 | # Relative offset at 0x1002 pointing at the IAT at 0x2080. |
| 25 | # DISASM: 140001000: 8b 05 7a 10 00 00 movl 4218(%rip), %eax | 26 | # DISASM: 140001000: 8b 05 7a 10 00 00 movl 4218(%rip), %eax |
| 26 | # DISASM: 140001006: c3 retq | 27 | # DISASM: 140001006: c3 retq |
| ... | @@ -41,6 +42,10 @@ | ... | @@ -41,6 +42,10 @@ |
| 41 | # CONTENTS: 140003000 80200040 01000000 00200040 01000000 | 42 | # CONTENTS: 140003000 80200040 01000000 00200040 01000000 |
| 42 | # CONTENTS: 140003010 24200040 01000000 | 43 | # CONTENTS: 140003010 24200040 01000000 |
| 43 | 44 | ||
| 45 | # Check that the automatically imported symbol "variable" is not listed in | ||
| 46 | # the symbol table. | ||
| 47 | # SYMBOLS-NOT: variable | ||
| 48 | |||
| 44 | .global main | 49 | .global main |
| 45 | .text | 50 | .text |
| 46 | main: | 51 | main: |
deps/lld/test/COFF/thin-archive.s created+32| ... | @@ -0,0 +1,32 @@ | ||
| 1 | # REQUIRES: x86 | ||
| 2 | |||
| 3 | # RUN: llvm-mc -filetype=obj -triple=x86_64-windows-msvc -o %t.main.obj %s | ||
| 4 | |||
| 5 | # RUN: llvm-mc -filetype=obj -triple=x86_64-windows-msvc -o %t.lib.obj \ | ||
| 6 | # RUN: %S/Inputs/mangled-symbol.s | ||
| 7 | # RUN: lld-link /lib /out:%t.lib %t.lib.obj | ||
| 8 | # RUN: lld-link /lib /llvmlibthin /out:%t_thin.lib %t.lib.obj | ||
| 9 | |||
| 10 | # RUN: lld-link /entry:main %t.main.obj %t.lib /out:%t.exe 2>&1 | \ | ||
| 11 | # RUN: FileCheck --allow-empty %s | ||
| 12 | # RUN: lld-link /entry:main %t.main.obj %t_thin.lib /out:%t.exe 2>&1 | \ | ||
| 13 | # RUN: FileCheck --allow-empty %s | ||
| 14 | # RUN: lld-link /entry:main %t.main.obj /wholearchive:%t_thin.lib /out:%t.exe 2>&1 | \ | ||
| 15 | # RUN: FileCheck --allow-empty %s | ||
| 16 | |||
| 17 | # RUN: rm %t.lib.obj | ||
| 18 | # RUN: lld-link /entry:main %t.main.obj %t.lib /out:%t.exe 2>&1 | \ | ||
| 19 | # RUN: FileCheck --allow-empty %s | ||
| 20 | |||
| 21 | # CHECK-NOT: error: could not get the buffer for the member defining | ||
| 22 | |||
| 23 | 	.text | ||
| 24 | |||
| 25 | 	.def main | ||
| 26 | 		.scl 2 | ||
| 27 | 		.type 32 | ||
| 28 | 	.endef | ||
| 29 | 	.global main | ||
| 30 | main: | ||
| 31 | 	call "?f@@YAHXZ" | ||
| 32 | 	retq $0 | ||
deps/lld/test/ELF/arm-exidx-partial-discard.s created+37| ... | @@ -0,0 +1,37 @@ | ||
| 1 | // REQUIRES: arm | ||
| 2 | // RUN: llvm-mc -filetype=obj -triple arm-gnu-linux-eabi -mcpu cortex-a7 -arm-add-build-attributes %s -o %t.o | ||
| 3 | // RUN: echo "SECTIONS { . = 0x10000; .text : { *(.text) } /DISCARD/ : { *(.exit.text) } }" > %t.script | ||
| 4 | // RUN: ld.lld -T %t.script %t.o -o %t.elf | ||
| 5 | // RUN: llvm-readobj -x .ARM.exidx --sections %t.elf | FileCheck %s | ||
| 6 | |||
| 7 | // CHECK-NOT: .exit.text | ||
| 8 | /// Expect 2 entries both CANTUNWIND as the .ARM.exidx.exit.text | ||
| 9 | // should have been removed. | ||
| 10 | // CHECK: Hex dump of section '.ARM.exidx': | ||
| 11 | // CHECK-NEXT: 0x00010000 10000000 01000000 10000000 01000000 | ||
| 12 | |||
| 13 | /// The /DISCARD/ is evaluated after sections have been assigned to the | ||
| 14 | /// .ARM.exidx synthetic section. We must account for the /DISCARD/ | ||
| 15 | .section .exit.text, "ax", %progbits | ||
| 16 | .globl foo | ||
| 17 | .type foo, %function | ||
| 18 | foo: | ||
| 19 | .fnstart | ||
| 20 | bx lr | ||
| 21 | .save {r7, lr} | ||
| 22 | .setfp r7, sp, #0 | ||
| 23 | .fnend | ||
| 24 | |||
| 25 | .text | ||
| 26 | .globl _start | ||
| 27 | .type _start, %function | ||
| 28 | _start: | ||
| 29 | .fnstart | ||
| 30 | bx lr | ||
| 31 | .cantunwind | ||
| 32 | .fnend | ||
| 33 | |||
| 34 | .section .text.__aeabi_unwind_cpp_pr0, "ax", %progbits | ||
| 35 | .global __aeabi_unwind_cpp_pr0 | ||
| 36 | __aeabi_unwind_cpp_pr0: | ||
| 37 | bx lr | ||
deps/lld/test/MinGW/driver.test+4| ... | @@ -200,3 +200,7 @@ APPCONTAINER: -appcontainer | ... | @@ -200,3 +200,7 @@ APPCONTAINER: -appcontainer |
| 200 | # RUN: ld.lld -m i386pep --help 2>&1 | FileCheck -check-prefix=HELP %s | 200 | # RUN: ld.lld -m i386pep --help 2>&1 | FileCheck -check-prefix=HELP %s |
| 201 | # HELP: USAGE: | 201 | # HELP: USAGE: |
| 202 | # HELP: --enable-auto-import | 202 | # HELP: --enable-auto-import |
| 203 | |||
| 204 | RUN: ld.lld -### -m i386pep foo.o -delayload user32.dll --delayload shell32.dll | FileCheck -check-prefix DELAYLOAD %s | ||
| 205 | RUN: ld.lld -### -m i386pep foo.o -delayload=user32.dll --delayload=shell32.dll | FileCheck -check-prefix DELAYLOAD %s | ||
| 206 | DELAYLOAD: -delayload:user32.dll -delayload:shell32.dll |
deps/lld/test/wasm/relocatable.ll+185-175| ... | @@ -1,7 +1,12 @@ | ... | @@ -1,7 +1,12 @@ |
| 1 | ; RUN: llc -filetype=obj %p/Inputs/hello.ll -o %t.hello.o | 1 | ; RUN: llc -filetype=obj %p/Inputs/hello.ll -o %t.hello.o |
| 2 | ; RUN: llc -filetype=obj %s -o %t.o | 2 | ; RUN: llc -filetype=obj %s -o %t.o |
| 3 | ; RUN: wasm-ld -r -o %t.wasm %t.hello.o %t.o | 3 | ; RUN: wasm-ld -r -o %t.wasm %t.hello.o %t.o |
| 4 | ; RUN: obj2yaml %t.wasm | FileCheck %s | 4 | ; RUN: obj2yaml %t.wasm | FileCheck %s --check-prefixes CHECK,NORMAL |
| 5 | |||
| 6 | ; RUN: llc -filetype=obj %p/Inputs/hello.ll -o %t.hello.bm.o -mattr=+bulk-memory | ||
| 7 | ; RUN: llc -filetype=obj %s -o %t.bm.o -mattr=+bulk-memory | ||
| 8 | ; RUN: wasm-ld -r -o %t.mt.wasm %t.hello.bm.o %t.bm.o --shared-memory --max-memory=131072 | ||
| 9 | ; RUN: obj2yaml %t.mt.wasm | FileCheck %s --check-prefixes CHECK,SHARED | ||
| 5 | 10 | ||
| 6 | target triple = "wasm32-unknown-unknown" | 11 | target triple = "wasm32-unknown-unknown" |
| 7 | 12 | ||
| ... | @@ -70,13 +75,18 @@ entry: | ... | @@ -70,13 +75,18 @@ entry: |
| 70 | ; CHECK-NEXT: Maximum: 0x00000004 | 75 | ; CHECK-NEXT: Maximum: 0x00000004 |
| 71 | ; CHECK-NEXT: - Type: MEMORY | 76 | ; CHECK-NEXT: - Type: MEMORY |
| 72 | ; CHECK-NEXT: Memories: | 77 | ; CHECK-NEXT: Memories: |
| 73 | ; CHECK-NEXT: - Initial: 0x00000001 | 78 | ; NORMAL-NEXT: - Initial: 0x00000001 |
| 79 | ; SHARED-NEXT: - Flags: [ HAS_MAX, IS_SHARED ] | ||
| 80 | ; SHARED-NEXT: Initial: 0x00000001 | ||
| 81 | ; SHARED-NEXT: Maximum: 0x00000002 | ||
| 74 | ; CHECK-NEXT: - Type: ELEM | 82 | ; CHECK-NEXT: - Type: ELEM |
| 75 | ; CHECK-NEXT: Segments: | 83 | ; CHECK-NEXT: Segments: |
| 76 | ; CHECK-NEXT: - Offset: | 84 | ; CHECK-NEXT: - Offset: |
| 77 | ; CHECK-NEXT: Opcode: I32_CONST | 85 | ; CHECK-NEXT: Opcode: I32_CONST |
| 78 | ; CHECK-NEXT: Value: 1 | 86 | ; CHECK-NEXT: Value: 1 |
| 79 | ; CHECK-NEXT: Functions: [ 4, 1, 2 ] | 87 | ; CHECK-NEXT: Functions: [ 4, 1, 2 ] |
| 88 | ; SHARED-NEXT: - Type: DATACOUNT | ||
| 89 | ; SHARED-NEXT: Count: 6 | ||
| 80 | ; CHECK-NEXT: - Type: CODE | 90 | ; CHECK-NEXT: - Type: CODE |
| 81 | ; CHECK-NEXT: Relocations: | 91 | ; CHECK-NEXT: Relocations: |
| 82 | ; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_SLEB | 92 | ; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_SLEB |
| ... | @@ -104,176 +114,176 @@ entry: | ... | @@ -104,176 +114,176 @@ entry: |
| 104 | ; CHECK-NEXT: - Index: 5 | 114 | ; CHECK-NEXT: - Index: 5 |
| 105 | ; CHECK-NEXT: Locals: | 115 | ; CHECK-NEXT: Locals: |
| 106 | ; CHECK-NEXT: Body: 419C808080000B | 116 | ; CHECK-NEXT: Body: 419C808080000B |
| 107 | ; CHECK-NEXT: - Type: DATA | 117 | ; NORMAL-NEXT: - Type: DATA |
| 108 | ; CHECK-NEXT: Relocations: | 118 | ; NORMAL-NEXT: Relocations: |
| 109 | ; CHECK-NEXT: - Type: R_WASM_TABLE_INDEX_I32 | 119 | ; NORMAL-NEXT: - Type: R_WASM_TABLE_INDEX_I32 |
| 110 | ; CHECK-NEXT: Index: 3 | 120 | ; NORMAL-NEXT: Index: 3 |
| 111 | ; CHECK-NEXT: Offset: 0x00000012 | 121 | ; NORMAL-NEXT: Offset: 0x00000012 |
| 112 | ; CHECK-NEXT: - Type: R_WASM_TABLE_INDEX_I32 | 122 | ; NORMAL-NEXT: - Type: R_WASM_TABLE_INDEX_I32 |
| 113 | ; CHECK-NEXT: Index: 4 | 123 | ; NORMAL-NEXT: Index: 4 |
| 114 | ; CHECK-NEXT: Offset: 0x0000001B | 124 | ; NORMAL-NEXT: Offset: 0x0000001B |
| 115 | ; CHECK-NEXT: - Type: R_WASM_TABLE_INDEX_I32 | 125 | ; NORMAL-NEXT: - Type: R_WASM_TABLE_INDEX_I32 |
| 116 | ; CHECK-NEXT: Index: 5 | 126 | ; NORMAL-NEXT: Index: 5 |
| 117 | ; CHECK-NEXT: Offset: 0x00000024 | 127 | ; NORMAL-NEXT: Offset: 0x00000024 |
| 118 | ; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_I32 | 128 | ; NORMAL-NEXT: - Type: R_WASM_MEMORY_ADDR_I32 |
| 119 | ; CHECK-NEXT: Index: 12 | 129 | ; NORMAL-NEXT: Index: 12 |
| 120 | ; CHECK-NEXT: Offset: 0x0000002D | 130 | ; NORMAL-NEXT: Offset: 0x0000002D |
| 121 | ; CHECK-NEXT: Segments: | 131 | ; NORMAL-NEXT: Segments: |
| 122 | ; CHECK-NEXT: - SectionOffset: 6 | 132 | ; NORMAL-NEXT: - SectionOffset: 6 |
| 123 | ; CHECK-NEXT: InitFlags: 0 | 133 | ; NORMAL-NEXT: InitFlags: 0 |
| 124 | ; CHECK-NEXT: Offset: | 134 | ; NORMAL-NEXT: Offset: |
| 125 | ; CHECK-NEXT: Opcode: I32_CONST | 135 | ; NORMAL-NEXT: Opcode: I32_CONST |
| 126 | ; CHECK-NEXT: Value: 0 | 136 | ; NORMAL-NEXT: Value: 0 |
| 127 | ; CHECK-NEXT: Content: 68656C6C6F0A00 | 137 | ; NORMAL-NEXT: Content: 68656C6C6F0A00 |
| 128 | ; CHECK-NEXT: - SectionOffset: 18 | 138 | ; NORMAL-NEXT: - SectionOffset: 18 |
| 129 | ; CHECK-NEXT: InitFlags: 0 | 139 | ; NORMAL-NEXT: InitFlags: 0 |
| 130 | ; CHECK-NEXT: Offset: | 140 | ; NORMAL-NEXT: Offset: |
| 131 | ; CHECK-NEXT: Opcode: I32_CONST | 141 | ; NORMAL-NEXT: Opcode: I32_CONST |
| 132 | ; CHECK-NEXT: Value: 8 | 142 | ; NORMAL-NEXT: Value: 8 |
| 133 | ; CHECK-NEXT: Content: '01000000' | 143 | ; NORMAL-NEXT: Content: '01000000' |
| 134 | ; CHECK-NEXT: - SectionOffset: 27 | 144 | ; NORMAL-NEXT: - SectionOffset: 27 |
| 135 | ; CHECK-NEXT: InitFlags: 0 | 145 | ; NORMAL-NEXT: InitFlags: 0 |
| 136 | ; CHECK-NEXT: Offset: | 146 | ; NORMAL-NEXT: Offset: |
| 137 | ; CHECK-NEXT: Opcode: I32_CONST | 147 | ; NORMAL-NEXT: Opcode: I32_CONST |
| 138 | ; CHECK-NEXT: Value: 12 | 148 | ; NORMAL-NEXT: Value: 12 |
| 139 | ; CHECK-NEXT: Content: '02000000' | 149 | ; NORMAL-NEXT: Content: '02000000' |
| 140 | ; CHECK-NEXT: - SectionOffset: 36 | 150 | ; NORMAL-NEXT: - SectionOffset: 36 |
| 141 | ; CHECK-NEXT: InitFlags: 0 | 151 | ; NORMAL-NEXT: InitFlags: 0 |
| 142 | ; CHECK-NEXT: Offset: | 152 | ; NORMAL-NEXT: Offset: |
| 143 | ; CHECK-NEXT: Opcode: I32_CONST | 153 | ; NORMAL-NEXT: Opcode: I32_CONST |
| 144 | ; CHECK-NEXT: Value: 16 | 154 | ; NORMAL-NEXT: Value: 16 |
| 145 | ; CHECK-NEXT: Content: '03000000' | 155 | ; NORMAL-NEXT: Content: '03000000' |
| 146 | ; CHECK-NEXT: - SectionOffset: 45 | 156 | ; NORMAL-NEXT: - SectionOffset: 45 |
| 147 | ; CHECK-NEXT: InitFlags: 0 | 157 | ; NORMAL-NEXT: InitFlags: 0 |
| 148 | ; CHECK-NEXT: Offset: | 158 | ; NORMAL-NEXT: Offset: |
| 149 | ; CHECK-NEXT: Opcode: I32_CONST | 159 | ; NORMAL-NEXT: Opcode: I32_CONST |
| 150 | ; CHECK-NEXT: Value: 24 | 160 | ; NORMAL-NEXT: Value: 24 |
| 151 | ; CHECK-NEXT: Content: '00000000' | 161 | ; NORMAL-NEXT: Content: '00000000' |
| 152 | ; CHECK-NEXT: - SectionOffset: 54 | 162 | ; NORMAL-NEXT: - SectionOffset: 54 |
| 153 | ; CHECK-NEXT: InitFlags: 0 | 163 | ; NORMAL-NEXT: InitFlags: 0 |
| 154 | ; CHECK-NEXT: Offset: | 164 | ; NORMAL-NEXT: Offset: |
| 155 | ; CHECK-NEXT: Opcode: I32_CONST | 165 | ; NORMAL-NEXT: Opcode: I32_CONST |
| 156 | ; CHECK-NEXT: Value: 28 | 166 | ; NORMAL-NEXT: Value: 28 |
| 157 | ; CHECK-NEXT: Content: '616263' | 167 | ; NORMAL-NEXT: Content: '616263' |
| 158 | ; CHECK-NEXT: - Type: CUSTOM | 168 | ; NORMAL-NEXT: - Type: CUSTOM |
| 159 | ; CHECK-NEXT: Name: linking | 169 | ; NORMAL-NEXT: Name: linking |
| 160 | ; CHECK-NEXT: Version: 2 | 170 | ; NORMAL-NEXT: Version: 2 |
| 161 | ; CHECK-NEXT: SymbolTable: | 171 | ; NORMAL-NEXT: SymbolTable: |
| 162 | ; CHECK-NEXT: - Index: 0 | 172 | ; NORMAL-NEXT: - Index: 0 |
| 163 | ; CHECK-NEXT: Kind: FUNCTION | 173 | ; NORMAL-NEXT: Kind: FUNCTION |
| 164 | ; CHECK-NEXT: Name: hello | 174 | ; NORMAL-NEXT: Name: hello |
| 165 | ; CHECK-NEXT: Flags: [ VISIBILITY_HIDDEN ] | 175 | ; NORMAL-NEXT: Flags: [ VISIBILITY_HIDDEN ] |
| 166 | ; CHECK-NEXT: Function: 3 | 176 | ; NORMAL-NEXT: Function: 3 |
| 167 | ; CHECK-NEXT: - Index: 1 | 177 | ; NORMAL-NEXT: - Index: 1 |
| 168 | ; CHECK-NEXT: Kind: DATA | 178 | ; NORMAL-NEXT: Kind: DATA |
| 169 | ; CHECK-NEXT: Name: hello_str | 179 | ; NORMAL-NEXT: Name: hello_str |
| 170 | ; CHECK-NEXT: Flags: [ ] | 180 | ; NORMAL-NEXT: Flags: [ ] |
| 171 | ; CHECK-NEXT: Segment: 0 | 181 | ; NORMAL-NEXT: Segment: 0 |
| 172 | ; CHECK-NEXT: Size: 7 | 182 | ; NORMAL-NEXT: Size: 7 |
| 173 | ; CHECK-NEXT: - Index: 2 | 183 | ; NORMAL-NEXT: - Index: 2 |
| 174 | ; CHECK-NEXT: Kind: FUNCTION | 184 | ; NORMAL-NEXT: Kind: FUNCTION |
| 175 | ; CHECK-NEXT: Name: puts | 185 | ; NORMAL-NEXT: Name: puts |
| 176 | ; CHECK-NEXT: Flags: [ UNDEFINED ] | 186 | ; NORMAL-NEXT: Flags: [ UNDEFINED ] |
| 177 | ; CHECK-NEXT: Function: 0 | 187 | ; NORMAL-NEXT: Function: 0 |
| 178 | ; CHECK-NEXT: - Index: 3 | 188 | ; NORMAL-NEXT: - Index: 3 |
| 179 | ; CHECK-NEXT: Kind: FUNCTION | 189 | ; NORMAL-NEXT: Kind: FUNCTION |
| 180 | ; CHECK-NEXT: Name: my_func | 190 | ; NORMAL-NEXT: Name: my_func |
| 181 | ; CHECK-NEXT: Flags: [ VISIBILITY_HIDDEN ] | 191 | ; NORMAL-NEXT: Flags: [ VISIBILITY_HIDDEN ] |
| 182 | ; CHECK-NEXT: Function: 4 | 192 | ; NORMAL-NEXT: Function: 4 |
| 183 | ; CHECK-NEXT: - Index: 4 | 193 | ; NORMAL-NEXT: - Index: 4 |
| 184 | ; CHECK-NEXT: Kind: FUNCTION | 194 | ; NORMAL-NEXT: Kind: FUNCTION |
| 185 | ; CHECK-NEXT: Name: foo_import | 195 | ; NORMAL-NEXT: Name: foo_import |
| 186 | ; CHECK-NEXT: Flags: [ UNDEFINED ] | 196 | ; NORMAL-NEXT: Flags: [ UNDEFINED ] |
| 187 | ; CHECK-NEXT: Function: 1 | 197 | ; NORMAL-NEXT: Function: 1 |
| 188 | ; CHECK-NEXT: - Index: 5 | 198 | ; NORMAL-NEXT: - Index: 5 |
| 189 | ; CHECK-NEXT: Kind: FUNCTION | 199 | ; NORMAL-NEXT: Kind: FUNCTION |
| 190 | ; CHECK-NEXT: Name: bar_import | 200 | ; NORMAL-NEXT: Name: bar_import |
| 191 | ; CHECK-NEXT: Flags: [ BINDING_WEAK, UNDEFINED ] | 201 | ; NORMAL-NEXT: Flags: [ BINDING_WEAK, UNDEFINED ] |
| 192 | ; CHECK-NEXT: Function: 2 | 202 | ; NORMAL-NEXT: Function: 2 |
| 193 | ; CHECK-NEXT: - Index: 6 | 203 | ; NORMAL-NEXT: - Index: 6 |
| 194 | ; CHECK-NEXT: Kind: FUNCTION | 204 | ; NORMAL-NEXT: Kind: FUNCTION |
| 195 | ; CHECK-NEXT: Name: func_comdat | 205 | ; NORMAL-NEXT: Name: func_comdat |
| 196 | ; CHECK-NEXT: Flags: [ BINDING_WEAK ] | 206 | ; NORMAL-NEXT: Flags: [ BINDING_WEAK ] |
| 197 | ; CHECK-NEXT: Function: 5 | 207 | ; NORMAL-NEXT: Function: 5 |
| 198 | ; CHECK-NEXT: - Index: 7 | 208 | ; NORMAL-NEXT: - Index: 7 |
| 199 | ; CHECK-NEXT: Kind: DATA | 209 | ; NORMAL-NEXT: Kind: DATA |
| 200 | ; CHECK-NEXT: Name: data_comdat | 210 | ; NORMAL-NEXT: Name: data_comdat |
| 201 | ; CHECK-NEXT: Flags: [ BINDING_WEAK ] | 211 | ; NORMAL-NEXT: Flags: [ BINDING_WEAK ] |
| 202 | ; CHECK-NEXT: Segment: 5 | 212 | ; NORMAL-NEXT: Segment: 5 |
| 203 | ; CHECK-NEXT: Size: 3 | 213 | ; NORMAL-NEXT: Size: 3 |
| 204 | ; CHECK-NEXT: - Index: 8 | 214 | ; NORMAL-NEXT: - Index: 8 |
| 205 | ; CHECK-NEXT: Kind: DATA | 215 | ; NORMAL-NEXT: Kind: DATA |
| 206 | ; CHECK-NEXT: Name: func_addr1 | 216 | ; NORMAL-NEXT: Name: func_addr1 |
| 207 | ; CHECK-NEXT: Flags: [ VISIBILITY_HIDDEN ] | 217 | ; NORMAL-NEXT: Flags: [ VISIBILITY_HIDDEN ] |
| 208 | ; CHECK-NEXT: Segment: 1 | 218 | ; NORMAL-NEXT: Segment: 1 |
| 209 | ; CHECK-NEXT: Size: 4 | 219 | ; NORMAL-NEXT: Size: 4 |
| 210 | ; CHECK-NEXT: - Index: 9 | 220 | ; NORMAL-NEXT: - Index: 9 |
| 211 | ; CHECK-NEXT: Kind: DATA | 221 | ; NORMAL-NEXT: Kind: DATA |
| 212 | ; CHECK-NEXT: Name: func_addr2 | 222 | ; NORMAL-NEXT: Name: func_addr2 |
| 213 | ; CHECK-NEXT: Flags: [ VISIBILITY_HIDDEN ] | 223 | ; NORMAL-NEXT: Flags: [ VISIBILITY_HIDDEN ] |
| 214 | ; CHECK-NEXT: Segment: 2 | 224 | ; NORMAL-NEXT: Segment: 2 |
| 215 | ; CHECK-NEXT: Size: 4 | 225 | ; NORMAL-NEXT: Size: 4 |
| 216 | ; CHECK-NEXT: - Index: 10 | 226 | ; NORMAL-NEXT: - Index: 10 |
| 217 | ; CHECK-NEXT: Kind: DATA | 227 | ; NORMAL-NEXT: Kind: DATA |
| 218 | ; CHECK-NEXT: Name: func_addr3 | 228 | ; NORMAL-NEXT: Name: func_addr3 |
| 219 | ; CHECK-NEXT: Flags: [ VISIBILITY_HIDDEN ] | 229 | ; NORMAL-NEXT: Flags: [ VISIBILITY_HIDDEN ] |
| 220 | ; CHECK-NEXT: Segment: 3 | 230 | ; NORMAL-NEXT: Segment: 3 |
| 221 | ; CHECK-NEXT: Size: 4 | 231 | ; NORMAL-NEXT: Size: 4 |
| 222 | ; CHECK-NEXT: - Index: 11 | 232 | ; NORMAL-NEXT: - Index: 11 |
| 223 | ; CHECK-NEXT: Kind: DATA | 233 | ; NORMAL-NEXT: Kind: DATA |
| 224 | ; CHECK-NEXT: Name: data_addr1 | 234 | ; NORMAL-NEXT: Name: data_addr1 |
| 225 | ; CHECK-NEXT: Flags: [ VISIBILITY_HIDDEN ] | 235 | ; NORMAL-NEXT: Flags: [ VISIBILITY_HIDDEN ] |
| 226 | ; CHECK-NEXT: Segment: 4 | 236 | ; NORMAL-NEXT: Segment: 4 |
| 227 | ; CHECK-NEXT: Size: 4 | 237 | ; NORMAL-NEXT: Size: 4 |
| 228 | ; CHECK-NEXT: - Index: 12 | 238 | ; NORMAL-NEXT: - Index: 12 |
| 229 | ; CHECK-NEXT: Kind: DATA | 239 | ; NORMAL-NEXT: Kind: DATA |
| 230 | ; CHECK-NEXT: Name: data_import | 240 | ; NORMAL-NEXT: Name: data_import |
| 231 | ; CHECK-NEXT: Flags: [ UNDEFINED ] | 241 | ; NORMAL-NEXT: Flags: [ UNDEFINED ] |
| 232 | ; CHECK-NEXT: SegmentInfo: | 242 | ; NORMAL-NEXT: SegmentInfo: |
| 233 | ; CHECK-NEXT: - Index: 0 | 243 | ; NORMAL-NEXT: - Index: 0 |
| 234 | ; CHECK-NEXT: Name: .rodata.hello_str | 244 | ; NORMAL-NEXT: Name: .rodata.hello_str |
| 235 | ; CHECK-NEXT: Alignment: 0 | 245 | ; NORMAL-NEXT: Alignment: 0 |
| 236 | ; CHECK-NEXT: Flags: [ ] | 246 | ; NORMAL-NEXT: Flags: [ ] |
| 237 | ; CHECK-NEXT: - Index: 1 | 247 | ; NORMAL-NEXT: - Index: 1 |
| 238 | ; CHECK-NEXT: Name: .data.func_addr1 | 248 | ; NORMAL-NEXT: Name: .data.func_addr1 |
| 239 | ; CHECK-NEXT: Alignment: 2 | 249 | ; NORMAL-NEXT: Alignment: 2 |
| 240 | ; CHECK-NEXT: Flags: [ ] | 250 | ; NORMAL-NEXT: Flags: [ ] |
| 241 | ; CHECK-NEXT: - Index: 2 | 251 | ; NORMAL-NEXT: - Index: 2 |
| 242 | ; CHECK-NEXT: Name: .data.func_addr2 | 252 | ; NORMAL-NEXT: Name: .data.func_addr2 |
| 243 | ; CHECK-NEXT: Alignment: 2 | 253 | ; NORMAL-NEXT: Alignment: 2 |
| 244 | ; CHECK-NEXT: Flags: [ ] | 254 | ; NORMAL-NEXT: Flags: [ ] |
| 245 | ; CHECK-NEXT: - Index: 3 | 255 | ; NORMAL-NEXT: - Index: 3 |
| 246 | ; CHECK-NEXT: Name: .data.func_addr3 | 256 | ; NORMAL-NEXT: Name: .data.func_addr3 |
| 247 | ; CHECK-NEXT: Alignment: 2 | 257 | ; NORMAL-NEXT: Alignment: 2 |
| 248 | ; CHECK-NEXT: Flags: [ ] | 258 | ; NORMAL-NEXT: Flags: [ ] |
| 249 | ; CHECK-NEXT: - Index: 4 | 259 | ; NORMAL-NEXT: - Index: 4 |
| 250 | ; CHECK-NEXT: Name: .data.data_addr1 | 260 | ; NORMAL-NEXT: Name: .data.data_addr1 |
| 251 | ; CHECK-NEXT: Alignment: 3 | 261 | ; NORMAL-NEXT: Alignment: 3 |
| 252 | ; CHECK-NEXT: Flags: [ ] | 262 | ; NORMAL-NEXT: Flags: [ ] |
| 253 | ; CHECK-NEXT: - Index: 5 | 263 | ; NORMAL-NEXT: - Index: 5 |
| 254 | ; CHECK-NEXT: Name: .rodata.data_comdat | 264 | ; NORMAL-NEXT: Name: .rodata.data_comdat |
| 255 | ; CHECK-NEXT: Alignment: 0 | 265 | ; NORMAL-NEXT: Alignment: 0 |
| 256 | ; CHECK-NEXT: Flags: [ ] | 266 | ; NORMAL-NEXT: Flags: [ ] |
| 257 | ; CHECK-NEXT: Comdats: | 267 | ; NORMAL-NEXT: Comdats: |
| 258 | ; CHECK-NEXT: - Name: func_comdat | 268 | ; NORMAL-NEXT: - Name: func_comdat |
| 259 | ; CHECK-NEXT: Entries: | 269 | ; NORMAL-NEXT: Entries: |
| 260 | ; CHECK-NEXT: - Kind: FUNCTION | 270 | ; NORMAL-NEXT: - Kind: FUNCTION |
| 261 | ; CHECK-NEXT: Index: 5 | 271 | ; NORMAL-NEXT: Index: 5 |
| 262 | ; CHECK-NEXT: - Kind: DATA | 272 | ; NORMAL-NEXT: - Kind: DATA |
| 263 | ; CHECK-NEXT: Index: 5 | 273 | ; NORMAL-NEXT: Index: 5 |
| 264 | ; CHECK-NEXT: - Type: CUSTOM | 274 | ; NORMAL-NEXT: - Type: CUSTOM |
| 265 | ; CHECK-NEXT: Name: name | 275 | ; NORMAL-NEXT: Name: name |
| 266 | ; CHECK-NEXT: FunctionNames: | 276 | ; NORMAL-NEXT: FunctionNames: |
| 267 | ; CHECK-NEXT: - Index: 0 | 277 | ; NORMAL-NEXT: - Index: 0 |
| 268 | ; CHECK-NEXT: Name: puts | 278 | ; NORMAL-NEXT: Name: puts |
| 269 | ; CHECK-NEXT: - Index: 1 | 279 | ; NORMAL-NEXT: - Index: 1 |
| 270 | ; CHECK-NEXT: Name: foo_import | 280 | ; NORMAL-NEXT: Name: foo_import |
| 271 | ; CHECK-NEXT: - Index: 2 | 281 | ; NORMAL-NEXT: - Index: 2 |
| 272 | ; CHECK-NEXT: Name: bar_import | 282 | ; NORMAL-NEXT: Name: bar_import |
| 273 | ; CHECK-NEXT: - Index: 3 | 283 | ; NORMAL-NEXT: - Index: 3 |
| 274 | ; CHECK-NEXT: Name: hello | 284 | ; NORMAL-NEXT: Name: hello |
| 275 | ; CHECK-NEXT: - Index: 4 | 285 | ; NORMAL-NEXT: - Index: 4 |
| 276 | ; CHECK-NEXT: Name: my_func | 286 | ; NORMAL-NEXT: Name: my_func |
| 277 | ; CHECK-NEXT: - Index: 5 | 287 | ; NORMAL-NEXT: - Index: 5 |
| 278 | ; CHECK-NEXT: Name: func_comdat | 288 | ; NORMAL-NEXT: Name: func_comdat |
| 279 | ; CHECK-NEXT: ... | 289 | ; NORMAL-NEXT:... |
deps/lld/wasm/Writer.cpp+1-1| ... | @@ -898,7 +898,7 @@ void Writer::run() { | ... | @@ -898,7 +898,7 @@ void Writer::run() { |
| 898 | createCallCtorsFunction(); | 898 | createCallCtorsFunction(); |
| 899 | } | 899 | } |
| 900 | 900 | ||
| 901 | if (config->sharedMemory && !config->shared) | 901 | if (!config->relocatable && config->sharedMemory && !config->shared) |
| 902 | createInitTLSFunction(); | 902 | createInitTLSFunction(); |
| 903 | 903 | ||
| 904 | if (errorCount()) | 904 | if (errorCount()) |