Skip to content

Adjust ASM_CONST indexes when building with -s RELOCATABLE#9747

Merged
sbc100 merged 1 commit intoincomingfrom
adjustment_for_asmconst
Oct 31, 2019
Merged

Adjust ASM_CONST indexes when building with -s RELOCATABLE#9747
sbc100 merged 1 commit intoincomingfrom
adjustment_for_asmconst

Conversation

@sbc100
Copy link
Copy Markdown
Collaborator

@sbc100 sbc100 commented Oct 31, 2019

For reloctable code (i.e. MAIN_MODULE) ASM_CONST offsets are relative to
the GLOBAL_BASE.

@sbc100
Copy link
Copy Markdown
Collaborator Author

sbc100 commented Oct 31, 2019

I should have landed this before: WebAssembly/binaryen#2408

This is now blocking binaryen from rolling in emscripten-releases. Once we land this PR binaryen should be able to roll again.

Comment thread emscripten.py Outdated
if shared.Settings.RELOCATABLE:
# TODO(sbc): remove this conidtion after
# https://github.com/WebAssembly/binaryen/pull/2408 lands
preamble += '\n if (core > %s) code -= %s;\n' % (shared.Settings.GLOBAL_BASE, shared.Settings.GLOBAL_BASE)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: in general can use '{0} foo {0}'.format(bar) to deduplicate str format args

Not really needed for this temp thing so lgtm as-is

For reloctable code (i.e. MAIN_MODULE) ASM_CONST offsets are relative to
the GLOBAL_BASE.
@sbc100 sbc100 force-pushed the adjustment_for_asmconst branch from b8cdbc1 to 4dc4c64 Compare October 31, 2019 18:37
@sbc100 sbc100 merged commit ea20ce8 into incoming Oct 31, 2019
@sbc100 sbc100 deleted the adjustment_for_asmconst branch October 31, 2019 19:28
belraquib pushed a commit to belraquib/emscripten that referenced this pull request Dec 23, 2020
…ten-core#9747)

For reloctable code (i.e. MAIN_MODULE) ASM_CONST offsets are relative to
the GLOBAL_BASE.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants