On Fri, May 29, 2015 at 1:02 AM, H.J. Lu <hongjiu...@intel.com> wrote: > On Thu, May 28, 2015 at 10:37:53AM -0700, H.J. Lu wrote: >> This patch extends -fno-plt to normal non-PIC calls on x86. -fno-plt >> works in 64-bit mode with the existing binutils. For 32-bit, we need >> the updated assembler and linker to support "call/jmp *foo@GOT" with >> a new relocation different from R_386_GOT32 to indicate that this >> relocation applies to indirect branches. A configure time check is >> added to verify that 32-bit assembler generates a known relocation >> which is different from R_386_GOT32. A new 32-bit relocaton is needed >> since "call/jmp *foo@GOT" requires a different relocation from R_386_GOT32 >> which is used together with a GOT register in "call/jmp *foo@GOT(%reg)". >> >> OK for master? >> >> Thanks. >> >> H.J. >> --- >> * configure.ac (HAVE_AS_INDIRECT_BRANCH_VIA_GOT): New. Defined >> if 32-bit assembler generates a known relocation which is >> different from R_386_GOT32. >> * config.in: Regenerated. >> * configure: Likewise. >> * config/i386/i386.c (ix86_output_call_insn): Extend -fno-plt >> to normal non-PIC branches. > > > Here is the updated patch to properly handle local functions with > testcases.
Please get someone to review the functional aspect of the patch. I'm not that familiar with all linker details to do any meaningful review here. Uros.