Check R_386_GOT32/R_386_GOT32X without base register
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 28 Oct 2015 16:15:17 +0000 (09:15 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 28 Oct 2015 16:15:40 +0000 (09:15 -0700)
commit3043c1aba16b1b5bfdf6813d90ec661988ddfa3f
treeedd7a887608668e498675ee58023b14917e6f48b
parenta3718e9efd2e0035dc0c008c754309edd8d5ae28
Check R_386_GOT32/R_386_GOT32X without base register

The R_386_GOT32 and R_386_GOT32X relocations may be used without base
register:

movl bar@GOT, %eax

Its calculation is G + A, instead of G + A - GOT, and it can only used
to generate non-PIC executable.  Include the .got.plt section address
for R_386_GOT32 and R_386_GOT32X relocations without base register.
Don't allow R_386_GOT32 and R_386_GOT32X relocations without base
register when making a PIC output.

PR gold/19177
* i386.cc (Target_i386::Relocate::relocate): Check R_386_GOT32
and R_386_GOT32X relocations without base register.
gold/ChangeLog
gold/i386.cc
This page took 0.025037 seconds and 4 git commands to generate.