I am trying to set clang to use a function called entry() (instead of main) as the entry point (in order to prevent C-runtime initialization), but the compiler does not seem to recognize any of the entry-setting arguments -- it keeps saying that the arguments that should work are unused). Doing -eentry makes this message appear:
clang: warning: argument unused during compilation: '-e entry' [-Wunused-command-line-argument]
and later:
clang: error: linker command failed with exit code 1561 (use -v to see invocation)
Doing -Wl,-emymain makes this message appear:
At line:1 char:120
+ ... -nostartfiles -nostdinc -nostdlib -nodefaultlibs --debug -Wl,-eentry
+ ~
Missing argument in parameter list.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : MissingArgument
and later:
clang: error: linker command failed with exit code 1561 (use -v to see invocation)
Doing -Xlinker -eentry makes this message appear:
clang: warning: argument unused during compilation: '-Xlinker -eentry' [-Wunused-command-line-argument]
and later:
clang: error: linker command failed with exit code 1561 (use -v to see invocation)