https://sourceware.org/bugzilla/show_bug.cgi?id=33709
Bug ID: 33709
Summary: LTO 15 fails on x86 with -ffat-lto-objects
Product: binutils
Version: 2.45
Status: NEW
Severity: normal
Priority: P2
Component: ld
Assignee: unassigned at sourceware dot org
Reporter: sam at gentoo dot org
CC: hjl.tools at gmail dot com
Target Milestone: ---
Created attachment 16510
--> https://sourceware.org/bugzilla/attachment.cgi?id=16510&action=edit
test.sh
We pass -ffat-lto-objects when building binutils so libiberty.a can be stripped
later and not have IR.
This causes a test failure on x86 (only there):
```
$ ./test.sh
+ rm lto-15a.o lto-15b.o liblto-15.a a.out
+ gcc -ffat-lto-objects -m32 -c -flto lto-15a.c -o lto-15a.o
+ gcc -ffat-lto-objects -m32 -c -flto lto-15b.c -o lto-15b.o
+ ar q liblto-15.a lto-15b.o
ar: creating liblto-15.a
+ ranlib liblto-15.a
+ gcc -ffat-lto-objects -m32 -O2 -flto -fuse-linker-plugin -Wl,--start-group
liblto-15.a lto-15a.o -Wl,--end-group
+ ./a.out
PASS
./test.sh: line 15: 521355 Aborted (core dumped) ./a.out
```
```
$ cat lto-15a.c
#include <stdio.h>
int main(int argc, char **argv)
{
printf ("PASS\n");
return (int) ((unsigned long long) argc / argv[0][0]);
}
```
```
$ cat lto-15b.c
extern void abort (void);
unsigned long long
__udivdi3(unsigned long long n, unsigned long long d)
{
abort ();
return n + d;
}
```
--
You are receiving this mail because:
You are on the CC list for the bug.