<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/96368>96368</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
LLVM Language Reference for Prefix Data self-contradictory re: function entry point versus function descriptor
</td>
</tr>
<tr>
<th>Labels</th>
<td>
llvm
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
hubert-reinterpretcast
</td>
</tr>
</table>
<pre>
https://llvm.org/docs/LangRef.html#prologuedata says:
> Prefix data is data associated with a function which the code generator will emit immediately before the function’s entrypoint.
However, it goes on to say:
> To access the data for a given function, a program may bitcast the function pointer to a pointer to the constant’s type and dereference index -1.
These statements are contradictory for targets that use function descriptors (an example being the 64-bit PowerPC ELFv1 ABI: https://refspecs.linuxfoundation.org/ELF/ppc64/PPC-elf64abi.html#FUNC-DES).
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxsU9GOqzYQ_RrzMgoCQ0h44GFvNqiV0iq6ve37YA_gytjIHpLN31ewu_fuVvtiy9J45pw552CMZnBEjdh_E_vnBBcefWjGpaPAu0DGMYU5ECuMnHReP5qReY6ieBKyFbK19jalPgxCttqrKGR7QTd8pz4debJCFnPw1g8LaWSEiI_ta_YssvezOMM1UG9eYCsx8fXGGL0yyKThbngEhH5xio13cB-NGoFHAuU1wUCOArIPcDfWAk2GwUwT6fW3fUBHvQ-01b-3EGcpjpmo6wjkODxmbxynH2H95u90oyDkCQzD4CmCd8B-pfAFgx8eUCmKcRuzEeh9AITB3Mj9mitPgDAHPwScYMIHdGZb7Sd0sMGhsI7Dj49Xyi4yOv5AgR8zAToNmgL1FMgpAuM0vcAu_8Tqx0iRIDIyTeQ4AoatIwfURrEPjw02YxiIVy7IsMQPyDRFFczMPkQQ8ogO6AWn2RJ0ZNywIazKXWcYrv5O4XqC86W95fD07XdRPMFn8wTq40wqpta45aX3i9O4jnkz1PmyFs2zqkoh2-v1tCPbVyV25t1c7d9_nnbP57-ErNNEN4WuixoTavJDXmd5edznydjUspSHfZXpTFVFWctjVxP2WGb7_rgv9CExjcxkmVVSZll2KPJUH6r9ITvmKKlWZa9FmdGExqbvbk9MjAs1dVVUx8RiRzZuCZJyrRBSrlkKzfrYdcsQRZlZEzn-asCGLTWXyz9_wBqYBQeC7z_FW0V4C8Xzlhuy_e6zToHWff4UZrPxq1fgRiEu8SvRkiXY_wV4MDwuXar89Jbmt2s3B_8vKRay3ciu0X7le2vkfwEAAP__R6No1A">