[LLVMbugs] [Bug 21090] New: bad relocation (unknown type) linking Mach-O on OS X to crt1.o

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Sep 28 02:04:52 PDT 2014


            Bug ID: 21090
           Summary: bad relocation (unknown type) linking Mach-O on OS X
                    to crt1.o
           Product: lld
           Version: unspecified
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: All Bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: alexchandel at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Linking a dummy object file with only 1 symbol, _main, using the command:

  `lld -flavor darwin /usr/lib/crt1.o /usr/lib/libSystem.B.dylib test.o`

produces the following error:

  `Cannot open /usr/lib/crt1.o: bad relocation (unknown type) in section
__TEXT/__text (r_address=0, r_type=0, r_extern=0, r_length=0, r_pcrel=0,

crt1.o is a fat Mach-O binary:

$ file /usr/lib/crt1.o
/usr/lib/crt1.o: Mach-O universal binary with 2 architectures
/usr/lib/crt1.o (for architecture x86_64):    Mach-O 64-bit object x86_64
/usr/lib/crt1.o (for architecture i386):    Mach-O object i386

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/20140928/079f13c0/attachment.html>

More information about the llvm-bugs mailing list