http://sourceware.org/bugzilla/show_bug.cgi?id=16546
Bug ID: 16546 Summary: powerpc __tls_get_addr should be ignored in ppc_elf_relax_section Product: binutils Version: 2.14 Status: NEW Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: wang.deqiang1 at zte dot com.cn Created attachment 7400 --> http://sourceware.org/bugzilla/attachment.cgi?id=7400&action=edit source code when i static link the source in attachment with ld relax option,i get a error like this: ~/toolchain/ppc_gcc4.5.2_glibc2.13.0_multi/bin/ppc6xx-softfloat-linux-gnu-gcc -o test pthread_tls_relax_tst.c -lpthread --save-temps --static -Wl,--relax /home/wangdeqiang/gcc4.5.2_glibc2.13.0/src/ppc_multi/build-binutils/ld/ld-new: BFD (GNU Binutils) 2.24 assertion fail /home/wangdeqiang/gcc4.5.2_glibc2.13.0/src/ppc_multi/binutils-2.21/bfd/elf32-ppc.c:7731 when i look into the code , i find ppc_elf_relax_section relax the call to __tls_get_addr, and modify the relocation of tls access in global-dynamic and local-dynamic mode , in fuction ppc_elf_relocate_section when we do tls optimize to change the global-dynamic mode or local-dynamic mode to initial-exec mode, we need the relocation type information, but it is changed in ppc_elf_relax_section, so we got this error. normally powerpc ld always do tls optimize, so i think we should just ignore the tls_get_addr symbol in ppc_elf_relax_section . -- 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