https://sourceware.org/bugzilla/show_bug.cgi?id=17878

            Bug ID: 17878
           Summary: Need support on bfd ld for LLVMgold.so plugin
           Product: binutils
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
          Assignee: unassigned at sourceware dot org
          Reporter: robert.cox at intel dot com

On a Red Hat 7.0 system, there is in theory support for the LLVMgold.so plugin
in the bfd linker.  But if I use clang:

-bash-4.2$ clang -c -flto sm1.c
-bash-4.2$ clang -c -flto sm2.c
-bash-4.2$ clang -flto sm1.o sm2.o
sm1.o: file not recognized: File format not recognized
clang-3.6: error: linker command failed with exit code 1 (use -v to see
invocation)

-bash-4.2$ cat sm1.c
static int myfunc(int a, int b)
{
    return a - b;
}

extern int foo(int a, int b)
{
   return myfunc(a, b);
}

extern int goo(int a, int b);

extern int main(void)
{
   return foo(2, 3) + goo(4, 5);
}

-bash-4.2$ cat sm2.c
static int myfunc(int a, int b)
{
    return a + b;
}

extern int goo(int a, int b)
{
   return myfunc(a, b);
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.

_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to