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

    <tr>
        <th>Summary</th>
        <td>
            lld-11 and older create section overlap
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    [lld-test.tar.gz](https://github.com/llvm/llvm-project/files/9831193/lld-test.tar.gz)
Attached is a test-case:
```
$ ./test.sh
ld.lld-11 -melf_i386 -static --build-id=sha1 -o fdppkrnl.elf -Tkernel.ld kernel.o entry.o io.o console.o serial.o printer.o execrh.o nlssupt.o procsupt.o dosidle.o int2f.o nls_hc.o intr.o irqstack.o cpu.o plt.o cdata.o floppy.o rdpcclk.o wrpcclk.o wratclk.o --defsym=DOS_PSP=0x60
ld.lld-11: error: section .ptext virtual address range overlaps with .note.gnu.build-id
>>> .ptext range is [0x0, 0xFF]
>>> .note.gnu.build-id range is [0x14, 0x37]
```

If you run `./test.sh good` then it will
use more recent lld and the link succeeds.

Even though the problem is fixed, ubuntu-20.04
is affected, and it has an LTS status. Therefore I
ask you to please back-port the needed fix to
lld-10, 11 and whatever older releases you still
support.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyVVE1v3DgM_TWeC2FDI9uT8cGH7KYBChRogeQeyBJta0cjefWRTPbXL2VPkjY9FTAsWnx8pMknDU699kX7lzGqjBhiFYWvpv-K9q7gxznGJRT1bcHv6Zl0nNNQSXemD2Oe35Zy8e4flJE-R20w0Nod6_2-q1fAr7y8K9hdwW5vYxRyRgU6gICMKKUImJOt_uLArs_2yRuoiG6lCvO2aVSV6fd7KM9oxiddHw9QhiiillCWQ9Lk1aqo78IsCORgVMty8tZUBIfy8YTeoqmMgqvlAG30r7RqRy_pbHAGyQrotcj-xWsb0WfkBaWfybAmhLTE1enk1VQuaLWGEp6PG-xplttGjtf-XypVnnKeJeVokwOlElHQOhq3LLkSrxYpTYa9-A9LxM0qS4VjeD3TT959f3j68fCDLHZ569t7i6ixgN47n41A09LOQrVEvER41j4mYUAo5TEE8MJOCO4ZvRFLgBeaO1TWRawmm6r3tm6Dqb9szxvZFkxTJVGxCyv438Au9_dZUJ8DfqP8FLxvtuj65iP6kyzW99cRXl0CnyyQ5yeZwOScoi2IM1rQkX7FmC0mBYSz8wgeJc0cqEsgrMpIMNqeICQpEVWofs705Zl44uzSNK9IGvhg8JwrHvUFVa43DcnGVHJWsWaLyhIfR-r5BshpqJZZ0LaFb48PkCWbQgWPM3occ1Vft0gRTuuvxawOpPMBAymmXJyPa35LFdIZotwEuU48j3ttO52LnOplFhFpluCMorfHlSisvCG-N4R0m2mrHfb7w-HAb24axnaqr1VXd2IXdTTYX49bpt3YpEdifxfUVTO75E3_x5eHpmO03h7tsWV8N_e8VUN7YIduQNbWfBhY3QxsRByPUg6C7YwY0IR8fRWcW3yBlYJs0stO95xxvmec7Zuma7uKd93AhqZthoYd6qYtGoZnoen8Ux2V89PO92tJQ5oCOY0OMXw4RQh6ooav6YhfJBKC7wmz7Na8_Vr3_6OHtTA">