https://sourceware.org/bugzilla/show_bug.cgi?id=22842
--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> --- (In reply to Rafael Ávila de Espíndola from comment #2) > (In reply to H.J. Lu from comment #1) > > Created attachment 10816 [details] > > A patch > > > > Please try this. > > The runtime warning is gone, but I still get two different values for the > address: > > $ ./run.sh > 0x55d0082e2580 0x7f00497992d0 > > The symbol foo is also just a plain undefined: > > 0000000000000000 0 FUNC GLOBAL DEFAULT UND foo Fixed on master branch by commit 1031c264fd23641111df1e12a35d0a8f7e82fb80 Author: H.J. Lu <hjl.to...@gmail.com> Date: Tue Feb 13 14:31:53 2018 -0800 x86: Properly check building shared library If a symbol is not defined in a regular file, and we are not generating a shared library, then set the symbol to its location in the .plt. This is required to make function pointers compare as equal between the normal executable and the shared library. * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check bfd_link_dll, instead of bfd_link_pic, for building shared library. -- 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