Handle weak undefined globals/functions#47
Open
NWilson wants to merge 1 commit intoWebAssembly:mainfrom
Open
Conversation
Weak undefined globals are prohibited; for functions we specify the use of a synthetic stub.
jyknight
pushed a commit
to jyknight/llvm-monorepo
that referenced
this pull request
Mar 9, 2018
This implements WebAssembly/tool-conventions#47 Differential Revision: https://reviews.llvm.org/D44201 llvm-svn=327146
earl
pushed a commit
to earl/llvm-mirror
that referenced
this pull request
Mar 9, 2018
This implements WebAssembly/tool-conventions#47 Differential Revision: https://reviews.llvm.org/D44201 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@327146 91177308-0d34-0410-b5e6-96231b3b80d8
sbc100
reviewed
Mar 11, 2018
| exist all but one (unspecified) are discarded; and finally it is an error if | ||
| more than one definition remains. | ||
|
|
||
| It is an error to apply this flag to undefined global symbols; when linking, |
Member
There was a problem hiding this comment.
How about just "This flag may not be applied to symbols of type SYMBOL_TYPE_GLOBAL"?
(Also I think the abort SYMTAB_XXX should be more like SYMBOL_TYPE_XX)
| which may not be defined; a definition or import must exist for all global | ||
| symbols in the linked output. | ||
| `R_WEBASSEMBLY_FUNCTION_INDEX_LEB` relocations shall not fail to be processed. | ||
| In case where the function symbol is weakly-undefined, there is no function |
Member
There was a problem hiding this comment.
I don''t think you need the first sentence of this para.
| must either be defined (weakly or strongly), or if undefined must be strong. | ||
| Hence, there is always a global in the final output to use as the target of | ||
| the relocation. (If weak undefined globals were permitted, there would be no | ||
| Wasm global in the final output for the relocation to target.) |
Member
There was a problem hiding this comment.
I don't think you need this last paragraph either. If you do want to keep it perhaps it can be at least shortened.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Weak undefined globals are prohibited; for functions we specify the use of a synthetic stub.
Resolves #46