Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
------------------------------------------------------------------------ r368310 | sbc | 2019-08-08 09:58:36 -0700 (Thu, 08 Aug 2019) | 11 lines [lld][WebAssembly] Add optional symbols after input file handling This allows undefined references in input files be resolved by the optional symbols. Previously we were doing this before input file reading which means it was working only for command line symbols references (i.e. -u or --export). Also use addOptionalDataSymbol for __dso_handle and make all optional symbols hidden by default. Differential Revision: https://reviews.llvm.org/D65920 ------------------------------------------------------------------------
- Loading branch information
Showing
6 changed files
with
35 additions
and
24 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
; RUN: llc -filetype=obj -o %t.o %s | ||
; RUN: wasm-ld --export=get_handle %t.o -o %t.wasm | ||
|
||
target triple = "wasm32-unknown-unknown" | ||
|
||
@__dso_handle = external global i8* | ||
|
||
define i8** @get_handle() { | ||
ret i8** @__dso_handle | ||
} | ||
|
||
define void @_start() { | ||
ret void | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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