On Mon, Aug 29, 2011 at 9:36 AM, H.J. Lu <hjl.to...@gmail.com> wrote: > On Mon, Aug 29, 2011 at 9:11 AM, Bernd Schmidt <ber...@codesourcery.com> > wrote: >> We currently generate >> >> __i686.get_pc_thunk.bx: >> movl (%esp), %ebx >> ret >> in PIC binaries. This can cause problems if the assembly output ends up >> in a .S file which is then compiled again: __i686 is a predefined macro >> and expands to "1". This happens in glibc when compiling csu/crti.S, >> which is generated from initfini.c; presumably this worked before >> Richard removed the !TARGET_DEEP_BRANCH_PREDICTION code. >> A simple way of fixing it would be to change the name of the thunk, as >> below. Of course, libc also has copies of this code, so worst case we'd >> end up with two of the thunks, which doesn't seem like a massive problem. >> >> Tested on i686-linux (with a few failures which I can attribute to a >> different patch in the tree). >> > > Doesn't Google have a patch to change it to __x86.get_pc_thunk.bx? >
http://gcc.gnu.org/ml/gcc-patches/2011-04/msg02422.html -- H.J.