<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - multiple out of order SECTIONS"
   href="https://bugs.llvm.org/show_bug.cgi?id=50472">50472</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>multiple out of order SECTIONS
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>lld
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>ELF
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>vicencb@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, smithp352@googlemail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>The issue is found when building
<a href="https://github.com/ARM-software/arm-trusted-firmware">https://github.com/ARM-software/arm-trusted-firmware</a>
with
make PLAT=rk3328 CC=clang AR=llvm-ar OC=llvm-objcopy OD=llvm-objdump E=0 V=1
after manually fixing
<a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - .asciz directive does not concatenate strings"
   href="show_bug.cgi?id=50470">https://bugs.llvm.org/show_bug.cgi?id=50470</a>
<a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - no memory region specified for section '.eh_frame'"
   href="show_bug.cgi?id=50471">https://bugs.llvm.org/show_bug.cgi?id=50471</a>

The linker script contains multiple SECTIONS out of order:
SECTIONS { . = 0xFF090000; .text_pmusram : {} >PMUSRAM }
SECTIONS { . = 0x40000; ro . : {} >RAM }
and lld complains with:
ld.lld: error: address (0x40318) of section ro is not a multiple of alignment
(65536)

Swapping the two entries fixes the issue, but the original linker script works
fine with the gnu toolchain.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>