[llvm-bugs] [Bug 50079] New: Regression(fc5d804ddbe): lld can't link simple binary

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Apr 22 11:11:53 PDT 2021


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

            Bug ID: 50079
           Summary: Regression(fc5d804ddbe): lld can't link simple binary
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: MachO
          Assignee: unassignedbugs at nondot.org
          Reporter: nicolasweber at gmx.de
                CC: gkm at fb.com, jezreel at gmail.com,
                    llvm-bugs at lists.llvm.org, smeenai at fb.com

thakis at MBP llvm-project % cat main.s
.globl _main
_main:
  retq

thakis at MBP llvm-project % out/gn/bin/clang main.s

thakis at MBP llvm-project % out/gn/bin/clang main.s  -fuse-ld=lld
ld64.lld: warning: Option `-no_deduplicate' is not yet implemented. Stay
tuned...
ld64.lld: error: /usr/lib/system/libsystem_kernel.dylib has platform
macCatalyst, which is different from target platform macOS
ld64.lld: error: /usr/lib/system/libsystem_platform.dylib has platform
macCatalyst, which is different from target platform macOS
ld64.lld: error: /usr/lib/system/libsystem_pthread.dylib has platform
macCatalyst, which is different from target platform macOS
clang: error: linker command failed with exit code 1 (use -v to see invocation)

thakis at MBP llvm-project % file /usr/lib/system/libsystem_platform.dylib
/usr/lib/system/libsystem_platform.dylib: Mach-O universal binary with 2
architectures: [x86_64:Mach-O 64-bit dynamically linked shared library x86_64]
[i386:Mach-O dynamically linked shared library i386]
/usr/lib/system/libsystem_platform.dylib (for architecture x86_64):     Mach-O
64-bit dynamically linked shared library x86_64
/usr/lib/system/libsystem_platform.dylib (for architecture i386):       Mach-O
dynamically linked shared library i386


 % otool -l /usr/lib/system/libsystem_platform.dylib | grep -i -C4 platf
/usr/lib/system/libsystem_platform.dylib:
Load command 0
      cmd LC_SEGMENT_64
  cmdsize 632
  segname __TEXT
--
--
    flags 0x0
Load command 3
          cmd LC_ID_DYLIB
      cmdsize 72
         name /usr/lib/system/libsystem_platform.dylib (offset 24)
   time stamp 1 Wed Dec 31 19:00:01 1969
      current version 220.100.1
compatibility version 1.0.0
Load command 4
--
--
      sdk 10.15.6
Load command 9
      cmd LC_BUILD_VERSION
  cmdsize 32
 platform 6
    minos 13.6
      sdk 13.6
   ntools 1
     tool 3



I'm using Xcode 12.4 on intel macOS 10.15.7 . Not sure why lld thinks that
/usr/lib/system/libsystem_platform.dylib is for catalyst?

-- 
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/20210422/b588a578/attachment.html>


More information about the llvm-bugs mailing list