mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-23 03:10:05 +00:00
i386: Use "movl main@GOT(%ebx), %eax" in start.S
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".
This commit is contained in:
parent
02d2d8927d
commit
955774751b
@ -1,3 +1,8 @@
|
||||
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
|
||||
|
@ -99,8 +99,11 @@ _start:
|
||||
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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user