[llvm-bugs] [Bug 36768] New: Linker script OVERLAYs not supported

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Mar 16 09:51:01 PDT 2018


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

            Bug ID: 36768
           Summary: Linker script OVERLAYs not supported
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: ELF
          Assignee: unassignedbugs at nondot.org
          Reporter: dmitry.mikulin at sony.com
                CC: llvm-bugs at lists.llvm.org

I used the following manual, section 4.6.9, and GNU linker v. 2.29.1 on Ubuntu
as a reference.
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/4/html/Using_ld_the_GNU_Linker/sections.html

According to the manual, "the OVERLAY command is just syntactic sugar, since
everything it does can be done using the more basic commands". 

There is no support for the OVERLAY syntax in ELF lld.
Also, laying out 2 segments with overlapping virtual addresses using basic
commands results in the following error with lld:
ld.lld: error: section .text.zzz virtual address range overlaps with .text.xxx
>>> .text.zzz range is [0x1000, 0x100C]
>>> .text.xxx range is [0x1000, 0x100C]

This is the script used:
PHDRS {
  zzz_text        PT_LOAD;
  xxx_text        PT_LOAD;
}
SECTIONS {
  .text.zzz 0x1000 : AT (0x4000) { zzz.o (.text*) } : zzz_text
  .text.xxx 0x1000 : AT (0x4000 + SIZEOF (.text.zzz)) { xxx.o (.text*) } :
xxx_text
}

-- 
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/20180316/af9ea280/attachment-0001.html>


More information about the llvm-bugs mailing list