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

            Bug ID: 21479
           Summary: strip doesn't handle lto archives
           Product: binutils
           Version: 2.29 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: binutils
          Assignee: unassigned at sourceware dot org
          Reporter: markus at trippelsdorf dot de
  Target Milestone: ---

markus@x4 /tmp % cat a.c
extern void foo1(void);
void foo2(void) { foo1(); }
void foo3(void) {}

markus@x4 /tmp % cat b.c
extern void foo2(void);
extern void foo3(void);
void foo1(void) { foo3(); }
int main(void) { foo2(); }

markus@x4 /tmp % gcc -c -flto a.c
markus@x4 /tmp % ar cr a.a a.o
markus@x4 /tmp % gcc b.c a.a

markus@x4 /tmp % strip -v --strip-unneeded a.a
copy from `a.a(a.o)' [elf64-x86-64] to `sthHR2ab/a.o' [elf64-x86-64]
strip: sthHR2ab/a.o: plugin needed to handle lto object
markus@x4 /tmp % gcc b.c a.a
/tmp/cc5eDBC4.o:b.c:function foo1: error: undefined reference to 'foo3'
/tmp/cc5eDBC4.o:b.c:function main: error: undefined reference to 'foo2'
collect2: error: ld returned 1 exit status

-- 
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