https://sourceware.org/bugzilla/show_bug.cgi?id=17560
Bug ID: 17560 Summary: mips: assertion failure with --as-needed + weak + hidden main function Product: binutils Version: 2.26 (HEAD) Status: NEW Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: james410 at cowgill dot org.uk With the combination of: - MIPS - Linking with --as-needed - The main() function being declared hidden - Linking with a shared library which references main() declared as weak Causes this error: >/home/jcowgill/binutils-gdb/ld/.libs/lt-ld-new: BFD (GNU Binutils) >2.25.51.20141105 assertion fail elf-strtab.c:254 >/home/jcowgill/binutils-gdb/ld/.libs/lt-ld-new: BFD (GNU Binutils) >2.25.51.20141105 assertion fail elf-strtab.c:272 test-obj.c ==== __attribute__((visibility ("hidden"))) int main(void) { return 42; } test-dso.c ==== __attribute__((weak)) int main(void); int blob(void) { return main(); } compile with ==== gcc -c test-obj.c gcc -shared -fPIC -o test-dso.so test-dso.c gcc -Wl,--as-needed test-obj.o test-dso.so debian bug: https://bugs.debian.org/767863 -- 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