[Bug lto/82575] New: [8 Regression] lto debugobj references __gnu_lto_slim, ld test liblto-17 fails
amodra at gmail dot com
gcc-bugzilla@gcc.gnu.org
Wed Oct 18 11:11:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82575
Bug ID: 82575
Summary: [8 Regression] lto debugobj references __gnu_lto_slim,
ld test liblto-17 fails
Product: gcc
Version: 8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: lto
Assignee: unassigned at gcc dot gnu.org
Reporter: amodra at gmail dot com
CC: marxin at gcc dot gnu.org
Target Milestone: ---
Summary: [8 Regression] lto debugobj references __gnu_lto_slim,
ld test liblto-17 fails
I recently upgraded the set of cross-compilers I use to test binutils, and
found that gcc trunk causes fails of some ld lto tests.
+FAIL: Build liblto-17a.so
+FAIL: Build liblto-17b.so 1
+FAIL: Build liblto-17b.so 2
Seen on aarch64-linux, arm-linuxeabi, hppa-linux, m68k-linux, mips64-linux,
nios2-linux, powerpc64le-linux, powerpc64-linux, powerpc-linux, s390-linux,
s390x-linux, sparc64-linux, tilepro-linux, and x86_64-linux.
Breakpoint 3, elf_link_add_object_symbols (info=<optimised out>, abfd=0xa6d1c0)
at /home/alan/src/binutils-gdb/bfd/elflink.c:4336
4336 if (isym->st_shndx == SHN_COMMON
(gdb) p name
$8 = 0xa70cd3 "__gnu_lto_slim"
(gdb) p abfd->filename
$9 = 0xa6d100 "/tmp/ccF0RcA1debugobj"
The debugobj is from
powerpc64le-linux-gcc -B /home/alan/build/gas/powerpc64le-linux/ld/tmpdir/ld/
-mcpu=power8 -r -nostdlib -o /tmp/ccF0RcA1debugobj /tmp/ccuOMpMydebugobjtem
[Leaving LTRANS /tmp/ccuOMpMydebugobjtem]
$ readelf -s --wide /tmp/ccF0RcA1debugobj
Symbol table '.symtab' contains 8 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
1: 0000000000000000 0 SECTION LOCAL DEFAULT 1
2: 0000000000000000 0 SECTION LOCAL DEFAULT 3
3: 0000000000000000 0 SECTION LOCAL DEFAULT 4
4: 0000000000000000 0 FILE LOCAL DEFAULT ABS lto-17a.c
5: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND __gnu_lto_slim
6: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND __gnu_lto_v1
7: 0000000000000000 0 NOTYPE WEAK HIDDEN 1 lto_17a.c.4af7515b
$ readelf -s --wide /tmp/ccuOMpMydebugobjtem
...
22: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND __gnu_lto_v1
23: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND __gnu_lto_slim
These references in LTO *output* files result in __gnu_lto_slim appearing as a
dynamic symbol in liblto-17a.so and liblto-17b.so. nm doesn't like that, and
you get a complaint about missing plugins. I don't believe the linker is doing
anything wrong here..
More information about the Gcc-bugs
mailing list