Don't use "leal main@GOTOFF(%ebx), %eax" since main may be in a
shared object. Linker will convert "movl main@GOT(%ebx), %eax"
to "leal main@GOTOFF(%ebx), %eax" if main is defined locally.
* sysdeps/i386/start.S: Replace "leal main@GOT(%ebx), %eax" with
"movl main@GOTOFF(%ebx), %eax".
+2017-10-03 H.J. Lu <hongjiu.lu@intel.com>
+
+ * sysdeps/i386/start.S: Replace "leal main@GOT(%ebx), %eax" with
+ "movl main@GOTOFF(%ebx), %eax".
+
2017-10-03 H.J. Lu <hongjiu.lu@intel.com>
* sysdeps/i386/dl-machine.h (elf_machine_load_address): Don't
pushl main@GOT(%ebx)
# else
/* Avoid relocation in static PIE since _start is called before
- it is relocated. */
- leal main@GOTOFF(%ebx), %eax
+ it is relocated. Don't use "leal main@GOTOFF(%ebx), %eax"
+ since main may be in a shared object. Linker will convert
+ "movl main@GOT(%ebx), %eax" to "leal main@GOTOFF(%ebx), %eax"
+ if main is defined locally. */
+ movl main@GOT(%ebx), %eax
pushl %eax
# endif