bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/12291] New: "ld -r" doesn't work with mixed IR/non-IR objects


From: hjl.tools at gmail dot com
Subject: [Bug ld/12291] New: "ld -r" doesn't work with mixed IR/non-IR objects
Date: Mon, 6 Dec 2010 22:28:36 +0000

http://sourceware.org/bugzilla/show_bug.cgi?id=12291

           Summary: "ld -r" doesn't work with mixed IR/non-IR objects
           Product: binutils
           Version: 2.22 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
        AssignedTo: address@hidden
        ReportedBy: address@hidden


address@hidden pr-1]$ cat foo.c
#include <stdio.h>

void foo(void)
{
  printf ("hello foo\n");
}
address@hidden pr-1]$ cat main.c
extern void foo(void);

int main(void)
{
  foo();
  return 0;
}
address@hidden pr-1]$ make
/usr/gcc-4.6/bin/gcc -B./ -c -O -flto -fuse-linker-plugin main.c -o main.o
/usr/gcc-4.6/bin/gcc -B./ -c -O foo.c -o foo.o
./ld -r -o prog.o main.o foo.o
/usr/gcc-4.6/bin/gcc -B./ -flto -fuse-linker-plugin prog.o -o prog
/tmp/ccAWLRVh.ltrans0.ltrans.o: In function `main':
ccAWLRVh.ltrans0.o:(.text.startup+0x5): undefined reference to `foo'
collect2: ld returned 1 exit status
make: *** [prog] Error 1
address@hidden pr-1]$

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]