https://sourceware.org/bugzilla/show_bug.cgi?id=21334
Bug ID: 21334 Summary: [MIPS] Undefined hidden symbols cause assertion failure bfd/elfxx-mips.c:3860 Product: binutils Version: 2.28 Status: UNCONFIRMED Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: james410 at cowgill dot org.uk Target Milestone: --- Originally from the Debian supermin package: https://buildd.debian.org/status/fetch.php?pkg=supermin&arch=mipsel&ver=5.1.17-7%2Bb1&stamp=1490538317&raw=0 And possibly related to a bug mentioned in PR/21233 Attempting to link any object containing an undefined hidden symbol causes ld to give an assertion failure. $ cat test.c extern int a __attribute__((visibility("hidden"))); int x(void) { a = 1; } $ mipsel-linux-gnu-gcc -c test.c $ readelf --syms test.o Symbol table '.symtab' contains 14 entries: Num: Value Size Type Bind Vis Ndx Name 0: 00000000 0 NOTYPE LOCAL DEFAULT UND 1: 00000000 0 FILE LOCAL DEFAULT ABS test.c 2: 00000000 0 SECTION LOCAL DEFAULT 1 3: 00000000 0 SECTION LOCAL DEFAULT 3 4: 00000000 0 SECTION LOCAL DEFAULT 4 5: 00000000 0 SECTION LOCAL DEFAULT 9 6: 00000000 0 SECTION LOCAL DEFAULT 5 7: 00000000 0 SECTION LOCAL DEFAULT 6 8: 00000000 0 SECTION LOCAL DEFAULT 7 9: 00000000 0 SECTION LOCAL DEFAULT 10 10: 00000000 0 SECTION LOCAL DEFAULT 11 11: 00000000 60 FUNC GLOBAL DEFAULT 1 x 12: 00000000 0 OBJECT GLOBAL DEFAULT UND _gp_disp 13: 00000000 0 NOTYPE GLOBAL HIDDEN UND a $ ../build-mips/ld/ld-new test.o ../build-mips/ld/ld-new: warning: cannot find entry symbol __start; defaulting to 00000000004000f0 ../build-mips/ld/ld-new: BFD (GNU Binutils) 2.28.51.20170330 assertion fail ../../binutils-gdb/bfd/elfxx-mips.c:3860 test.o: In function `x': test.c:(.text+0x18): undefined reference to `a' The bug in supermin was actually caused by musl's use of this feature in __libc_start_main, so I suspect that nothing will be able to link against musl libc when using binutils 2.28. -- 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