<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/59115>59115</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
LLD produces an unusable binary with `-no_pie` on arm64
</td>
</tr>
<tr>
<th>Labels</th>
<td>
lld:MachO
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
petrhosek
</td>
</tr>
</table>
<pre>
```
$ cat >a.c <<EOF
int main() {
return 0;
}
EOF
$ clang -fuse-ld=lld -fno-pie a.c
$ ./a.out
zsh: killed ./a.out
```
Looks like PIE is required on arm64, ld64 appears to ignore `-no_pie` with a warning:
```
$ clang -fno-pie a.c
ld: warning: -no_pie is deprecated when targeting new OS versions
ld: warning: -no_pie ignored for arm64
```
Perhaps LLD should do the same?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzNU9tu2zAM_Rr5hYhhy45dP_ghbRJgQIYU2AcMssXYWhTJ06VB9_VjnPSKAnudQUAiRR4eHkudlc8tq7KbZWuWrRgvoRcBWLERaU_LA9lmv72eKhPgJJRh_I7xBlh9f40DOAzRGchYcQuxen3dvBbP0FqYARaH6HGhJSvWWktyjV1MCoE6vqWmjG9FamOA__S7Uv3jR1as4Ki0RjnHX4nfZvko8M7aowetjgiP3zagPEn3OypHxdaAcKeqZPwBtKxKENOEwnkIFtRgrEMgmIWxP0ks2sFZhREEnIUzygxE48uO73X_LPTlH6zeAcAN_cJL4uSQ7gIxO49oIAg3YKA8MHiG_Q94QueVNf5fUDN1CQfrbvN9xfIR3SgmD7vdGvxoI90LaSGMCF6ckBXbBNu8qpqsyjKeJ7ItZFM0IgkqaGwvVZOzMvboQRiIJnrRaYROGeGer0p9FO9F7SQ63Y4hTP4iIN-SDZQdu7S3J3K0fnpZFtTiF_aBXOV9RE-bZZPny2RsEcsur8s6u8OukJyXVS17rFGKBpu-rxMtOtS-Zct7xrme1fou-nFPHluuE9XyjPM8J2sIJU-LOs-LRh7umrxpukqwMkN6ezq9MEmtGxLXzqS6OHg61MoH_3YovCfhEeeGhC9iGK1rJwxutB6PyTxBO9P_C7bGIgQ">