[Bug ld/29512] ld non-canon ref to canon protected function check breaks Solaris/x86
https://sourceware.org/bugzilla/show_bug.cgi?id=29512 H.J. Lu changed: What|Removed |Added Resolution|--- |FIXED Target Milestone|--- |2.40 Status|NEW |RESOLVED --- Comment #5 from H.J. Lu --- Fixed -- You are receiving this mail because: You are on the CC list for the bug.
[Bug ld/29512] ld non-canon ref to canon protected function check breaks Solaris/x86
https://sourceware.org/bugzilla/show_bug.cgi?id=29512 Florian Weimer changed: What|Removed |Added CC||fweimer at redhat dot com -- You are receiving this mail because: You are on the CC list for the bug.
[Bug ld/29512] ld non-canon ref to canon protected function check breaks Solaris/x86
https://sourceware.org/bugzilla/show_bug.cgi?id=29512 --- Comment #4 from cvs-commit at gcc dot gnu.org --- The master branch has been updated by H.J. Lu : https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=2c43d202aefb2b6f202a44bbb8a0baf251aae845 commit 2c43d202aefb2b6f202a44bbb8a0baf251aae845 Author: H.J. Lu Date: Mon Aug 22 10:26:17 2022 -0700 x86: Ignore protected visibility in shared libraries on Solaris On x86, the PLT entry in executable may be used as function address for functions in shared libraries. If functions are protected, the function address used in executable can be different from the function address used in shared library. This will lead to incorrect run-time behavior if function pointer equality is needed. By default, x86 linker issues an error in this case. On Solaris, linker issued an error for struct tm *tb = (kind == CPP_time_kind::FIXED ? gmtime : localtime) (); where gmtime is a protected function in libc.so. Use gmtime's PLT entry in executable as function address is safe since function pointer equality isn't needed. Ignore protected visibility in shared libraries on Solaris to disable linker error. If function pointer equality is needed, linker will silently generate executable with incorrect run-time behavior on Solaris. PR ld/29512 * elf32-i386.c (elf_i386_scan_relocs): Ignore protected visibility in shared libraries on Solaris. * elf64-x86-64.c (elf_x86_64_scan_relocs): Likewise. -- You are receiving this mail because: You are on the CC list for the bug.
[Bug ld/29512] ld non-canon ref to canon protected function check breaks Solaris/x86
https://sourceware.org/bugzilla/show_bug.cgi?id=29512 --- Comment #3 from Rainer Orth --- > --- Comment #2 from H.J. Lu --- > Created attachment 14288 > --> https://sourceware.org/bugzilla/attachment.cgi?id=14288=edit > A patch > > Try this. I've just successfully completed a i386-pc-solaris2.11 bootstrap. Looks good to go. Thanks. -- You are receiving this mail because: You are on the CC list for the bug.
[Bug ld/29512] ld non-canon ref to canon protected function check breaks Solaris/x86
https://sourceware.org/bugzilla/show_bug.cgi?id=29512 --- Comment #1 from H.J. Lu --- The code in question is struct tm *tb = (kind == CPP_time_kind::FIXED ? gmtime : localtime) (); There is no pointer comparison here. We can ignore protected visibility in shared libraries on Solaris. -- You are receiving this mail because: You are on the CC list for the bug.
[Bug ld/29512] ld non-canon ref to canon protected function check breaks Solaris/x86
https://sourceware.org/bugzilla/show_bug.cgi?id=29512 H.J. Lu changed: What|Removed |Added Assignee|unassigned at sourceware dot org |hjl.tools at gmail dot com --- Comment #2 from H.J. Lu --- Created attachment 14288 --> https://sourceware.org/bugzilla/attachment.cgi?id=14288=edit A patch Try this. -- You are receiving this mail because: You are on the CC list for the bug.