<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/112340>112340</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
No relocation are emitted for pointer on weak function with arm_aapcscc
</td>
</tr>
<tr>
<th>Labels</th>
<td>
bug,
backend:ARM,
miscompilation
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
Ralender
</td>
</tr>
</table>
<pre>
Make file with the following named tmp.ll
```llvm
define weak dso_local arm_aapcscc i32 @foo() {
ret i32 9
}
define dso_local arm_aapcscc ptr @get() {
ret ptr @foo
}
```
run:
```bash
clang++ -target arm-none-linux-android tmp.ll -c -o out.o
llvm-objdump -r out.o
```
the function pointer in `get` may get overridden by the `foo` from an other TU. so the compiler needs to generate a relocation. but in this case it doesn't.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxsU0FvszgQ_TXmMgIZQ0I4cEg2yq17qHbP1YAHcGtsZA_t9t-vgLRfVFVCYGbgPb_3xhijGRxRIw4XcbgmuPDoQ_OMlpymkLRefzZP-EbQG0vwYXgEHgl6b63_MG4AhxNp4GnOrBXyKuRZHOV-Wfs-7SVNvXEEH4RvoKN_sb5DCximF8S5i10HplAgStl7L9RJqBpEddn_BQjEW7--41fX--IR-3fYmcMKOxD_Dnvvr7Q_sL9E7K9hcaI4w49ei3HcS51FNwh1EeoCKWMYiNd9pM47Sq1xy38pOh28-bIK0g5SD37h7E69upX69lUv0wxpeGz92Mx-32JYXMfGO5i9cUwBjANx3OQeJUz4CetG_DuFYLQmB-3nFp84bpKPEvrgJ0AHnkcK8M-_GUS_fdL5aTaWAjgiHYE9DOQoIBMgBFqtXpkzaBdeaXk0ETqMBIZBe4pOqIqzRDeFrosaE2rySp3qU1ke8mRsclVR2_ayxGMlS2yLPq8LqtUR-55OdZmYRklV5jI_yFpVRZ6hLmXRV3VLSuV46EQpaUJjs9W5zIchMTEu1OS5KkqZWGzJxm2wlWqXQSgl1F_rGrs3cloU5_Pz03d1MnGXvMlay4drEpotlXYZoiilNZHjHzY2bKn52z-4ARgIaDLMpKH34TsX7_bh_w5sO0kPk5oswTYj8xxFcRbqJtRtMDwubdb5Sajbdpb2RzoH_0odC3XbBEehbnfN7436PwAA__9BsDHN">