[PATCH] D40559: Run Wasm entrypoint on load
Sam Clegg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 29 16:19:24 PST 2017
sbc100 added a comment.
I'm not a big fan of having `--entry ''` be the way to disable the entry point. If we really want to allow that then perhaps --no-entry? I'm not sure we really need that feature though. The other linkers all require an entry point I think.
Anyway, perhaps this change can be split into pieces?
1. Add support for --undefined/-u
2. Create Start section with Config->Entry
3. Add --no-entry option
(2) is the real substantive change here, I'm working on change the musl so that we can land it without breaking the waterfall.
================
Comment at: test/wasm/data-layout.ll:3
; RUN: llc -filetype=obj %s -o %t.o
-; RUN: lld -flavor wasm --emit-relocs --allow-undefined -o %t.wasm %t.o %t.hello.o
+; RUN: lld -flavor wasm --emit-relocs --allow-undefined --entry '' -o %t.wasm %t.o %t.hello.o
; RUN: obj2yaml %t.wasm | FileCheck %s
----------------
Why is this needed? Shouldn't allow-undefined be enough here?
================
Comment at: wasm/Driver.cpp:301
Config->SearchPaths = getArgs(Args, OPT_L);
+ Config->Undefined = getArgs(Args, OPT_undefined);
Config->StripAll = Args.hasArg(OPT_strip_all);
----------------
Does this need to be in Config, or can it just be a local ?
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D40559
More information about the llvm-commits
mailing list