<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/140141>140141</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [lld]  Bug with Assert in linker scripts
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            lld
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          lquinn2015
      </td>
    </tr>
</table>

<pre>
    This test https://github.com/llvm/llvm-project/blob/main/lld/test/ELF/linkerscript/assert.s

A semicolon after an Assert statement causes some type of bad state in LLVM lld this is problematic 


The error statement is totally misleading 

![Image](https://github.com/user-attachments/assets/3d100293-49a9-4a99-aa50-87b785c5fdce)


I believe fixing it is as simple as adding a peak consume in the parsing logic of assert statements. credit @pitust   I will try and make a fix tomorrow
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyUk0FvpDgQhX-NuZS6ZQxOw4FDR9mWImVv0d4LUw3eGMy6imT7349MJzOjOYw0J0pU8Xj1_BmZ_bgQdco-KvtU4CZTTF34b_PLYnRpiz4Ot-518gxCLDCJrKyqszIXZS6jl2nrjy7OylxCeP96HNYU_yUnylz6EHtlLjP6ZW8OylyykjKXv16yRvDLGyV2ya_5JTJTkiMrfVb6fAam2bsY4gJ4FUqAC5z3EWBBoZkWAYcbEwPHmUBuK0G8Qo_DfQL8Ai8v__wNIQwgeRHPsKbYB5pRvIP7n5Q-v04ElFJMP0nnvaNgCDeYPQfCwS_j1yemVPbxecaRlH1SpvlNOBtTOqAIuinr8ueme1ENpdamrQ51i-2hxrY9IFp9aE79qbHOXgdHyrTffT5DT8HTO8HV_5_t-N0nMrCf10C5wmE3irASvoGLC2_zHoVMBCsmzt0QR-9yWPhLonwEl2jwAqrWq5eNBQCe4cOHAJJugMsAM74RYPYAEueYUvwohq4a2qrFgrryVJ-quqrNqZg6atwDNlRhWTZ127fN0Fz75tTY8mor0n3hO6ON1ba0piy1OR1NRXVLtnHX-gE1larWNKMPx8zXMaax8MwbdWWty7osAvYUeMfYmJ0yk3lO3Y5jv42sah08C_8QEC9hJz_P2yeAx22EDy_TF2F-gTudcMeTiy2F7o-vwG40H_Sn1_fOfAsAAP__DakjDQ">