| ... | ... | @@ -70,23 +70,27 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize_mode: std.builtin.Opt |
| 70 | 70 | check_exe.checkExact("type function"); |
| 71 | 71 | if (optimize_mode == .Debug) { |
| 72 | 72 | check_exe.checkExact("name __wasm_init_memory"); |
| 73 | check_exe.checkExact("name __wasm_init_tls"); |
| 73 | 74 | } |
| 74 | | check_exe.checkExact("name __wasm_init_tls"); |
| 75 | 75 | check_exe.checkExact("type global"); |
| 76 | 76 | |
| 77 | 77 | // In debug mode the symbol __tls_base is resolved to an undefined symbol |
| 78 | 78 | // from the object file, hence its placement differs than in release modes |
| 79 | 79 | // where the entire tls segment is optimized away, and tls_base will have |
| 80 | 80 | // its original position. |
| 81 | | check_exe.checkExact("name __tls_base"); |
| 82 | | check_exe.checkExact("name __tls_size"); |
| 83 | | check_exe.checkExact("name __tls_align"); |
| 84 | | |
| 85 | | check_exe.checkExact("type data_segment"); |
| 86 | 81 | if (optimize_mode == .Debug) { |
| 82 | check_exe.checkExact("name __tls_base"); |
| 83 | check_exe.checkExact("name __tls_size"); |
| 84 | check_exe.checkExact("name __tls_align"); |
| 85 | |
| 86 | check_exe.checkExact("type data_segment"); |
| 87 | 87 | check_exe.checkExact("names 1"); |
| 88 | 88 | check_exe.checkExact("index 0"); |
| 89 | 89 | check_exe.checkExact("name .tdata"); |
| 90 | } else { |
| 91 | check_exe.checkNotPresent("name __tls_base"); |
| 92 | check_exe.checkNotPresent("name __tls_size"); |
| 93 | check_exe.checkNotPresent("name __tls_align"); |
| 90 | 94 | } |
| 91 | 95 | |
| 92 | 96 | test_step.dependOn(&check_exe.step); |