Skip to content

Commit 0563bf8

Browse files
authored
Don't require __wasm_apply_data_relocs. NFC (#25669)
This symbol is optionally created by the linker and optionally used in preamble.js and libdylink.js. However this requirement here was forcing it to be exported. The only reason I think this didn't cause any issues is that its not really possible to create a main module with zero data relocations today.
1 parent 5304ef8 commit 0563bf8

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

test/codesize/test_codesize_hello_dylink.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
2-
"a.out.js": 26919,
3-
"a.out.js.gz": 11469,
2+
"a.out.js": 26974,
3+
"a.out.js.gz": 11477,
44
"a.out.nodebug.wasm": 18567,
55
"a.out.nodebug.wasm.gz": 9199,
6-
"total": 45486,
7-
"total_gz": 20668,
6+
"total": 45541,
7+
"total_gz": 20676,
88
"sent": [
99
"__heap_base",
1010
"__indirect_function_table",

test/codesize/test_codesize_hello_dylink_all.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"a.out.js": 245868,
2+
"a.out.js": 245923,
33
"a.out.nodebug.wasm": 597779,
4-
"total": 843647,
4+
"total": 843702,
55
"sent": [
66
"IMG_Init",
77
"IMG_Load",

tools/link.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1386,9 +1386,6 @@ def limit_incoming_module_api():
13861386
# make_invoke depends on stackSave and stackRestore
13871387
settings.DEFAULT_LIBRARY_FUNCS_TO_INCLUDE += ['$stackSave', '$stackRestore']
13881388

1389-
if settings.RELOCATABLE:
1390-
settings.REQUIRED_EXPORTS += ['__wasm_apply_data_relocs']
1391-
13921389
if settings.SIDE_MODULE and 'GLOBAL_BASE' in user_settings:
13931390
diagnostics.warning('unused-command-line-argument', 'GLOBAL_BASE is not compatible with SIDE_MODULE')
13941391

0 commit comments

Comments
 (0)