[llvm-bugs] [Bug 50472] New: multiple out of order SECTIONS

via llvm-bugs llvm-bugs at lists.llvm.org
Tue May 25 16:59:40 PDT 2021


https://bugs.llvm.org/show_bug.cgi?id=50472

            Bug ID: 50472
           Summary: multiple out of order SECTIONS
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: ELF
          Assignee: unassignedbugs at nondot.org
          Reporter: vicencb at gmail.com
                CC: llvm-bugs at lists.llvm.org, smithp352 at googlemail.com

The issue is found when building
https://github.com/ARM-software/arm-trusted-firmware
with
make PLAT=rk3328 CC=clang AR=llvm-ar OC=llvm-objcopy OD=llvm-objdump E=0 V=1
after manually fixing
https://bugs.llvm.org/show_bug.cgi?id=50470
https://bugs.llvm.org/show_bug.cgi?id=50471

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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210525/e636de08/attachment.html>


More information about the llvm-bugs mailing list