<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/68355>68355</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang] --entry command line option is broken
</td>
</tr>
<tr>
<th>Labels</th>
<td>
good first issue,
clang:driver
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
s-barannikov
</td>
</tr>
</table>
<pre>
Optoion '--entry' ('--entry=') should be forwarded to linker the same way as its aliasee '-e' is forwarded. Currently, it complains about unsupported option.
```
clang test.c --entry=my_start
clang: error: unsupported option '--entry=my_start'
```
Apparently, the option is declared as a flag, i.e. clang accepts this, but linker non-surprisingly fails:
```
clang test.c --entry
/usr/bin/ld: warning: cannot find entry symbol --library=gcc; defaulting to 0000000000001040
```
Reference:
https://gcc.gnu.org/onlinedocs/gcc/Link-Options.html#index-e
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMU12PqzYQ_TXmZQRyDCThgYfsRjxVWql_oBrbA7gxNrJNtvn3FWSzSXuvri5CfNgzZ845nsEYzeCIWla_sfqc4ZJGH9qYSwzonLn4aya9vrUfc_LGO2DikOfkUrgxcQAmji8L5ZmJAxMNxNEvVoMk6H34xKBJQ_JgjbtQgDQSRJwIPvEGGMGkCGgNRqINnlZkE5-5BbwvIZBL9sbEO5gEyk-zReMioPRLgsXFZZ59SKTBz8l4VzB-ZvzE9vzr3n6VRTdAopgKBU_a0-2vmDCklyBWnoBC8GH9-BEe_iP7O18cflr2_jzNMz5VrC58YZkImpTFQHr1A6G3OGxKCyrgzhmVojlFSKOJ65Zc0sNP510elzAHE40b7A16NDay8vT7FtwDRbfEwEQnjWOis3qV_onBmbsdCp3zCXrjNGxpEG-T9Bby3BoZcLNiUIqVb6Cpx8Ums5bywF-uHa_4L0z6k3oK5BR98x9Tmjc1omOiG5QqBrcUPgxMdN5Z40h7Fe9bTHR_GHfJPzZjYzGmyTJRGqfpn5zueJluS92UDWbU7vbNvq52Vc2zsa12mpPckaqE7LERDa9E2ewrJHGoOK8y0wouyh3ntdiVvGqKA6_p2KBs8HCU-5JYxWlCYwtrr9NKMTMxLtTuj2VdZxYl2bhNmhCD9xp6E2KCLYYJwcQ7E-LRfTqYK4V1uT5noV0Rc7kMkVXcmpjis0YyyW4DfE-tz49jXcdkQqfXRnltNhn8hVy2BNv-z1yTxkUWyk_r-dvr45XPwf9NKjHRbWRXtzdN_wYAAP__gupXvQ">