https://sourceware.org/bugzilla/show_bug.cgi?id=29551
--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> --- We can't change _GLOBAL_OFFSET_TABLE_ nor _GLOBAL_OFFSET_TABLE_(%rip). _GLOBAL_OFFSET_TABLE_ generates GOTPC32 relocation. _GLOBAL_OFFSET_TABLE_(%rip) generates GOTPC32 relocation which is the same as PC32 since symbol is GOT. But we should handle _GLOBAL_OFFSET_TABLE_@GOTPCREL(%rip). i386_displacement first generates BFD_RELOC_X86_64_GOTPCREL for symbol@GOTPCREL(%rip). Then i386_finalize_displacement changes it to BFD_RELOC_32_PCREL. Before i386_validate_fix changes BFD_RELOC_32_PCREL back to BFD_RELOC_X86_64_GOTPCREL, output_disp changes BFD_RELOC_32_PCREL to BFD_RELOC_X86_64_GOTPC32 because symbol == _GLOBAL_OFFSET_TABLE_. -- You are receiving this mail because: You are on the CC list for the bug.