mirror of git://sourceware.org/git/glibc.git
(ELF_MACHINE_LOAD_ADDRESS): Support loading big binaries where @gprel(sym) cannot be handled in 'add' but instead has to be used with 'movl'.
This commit is contained in:
parent
8269c5f1c9
commit
333b24d321
|
@ -24,13 +24,13 @@
|
||||||
#include <sysdeps/generic/dl-fptr.h>
|
#include <sysdeps/generic/dl-fptr.h>
|
||||||
|
|
||||||
#define COMPARE_AND_SWAP(ptr, old, new) \
|
#define COMPARE_AND_SWAP(ptr, old, new) \
|
||||||
__sync_bool_compare_and_swap ((ptr), (old), (new))
|
__sync_bool_compare_and_swap (ptr, old, new)
|
||||||
|
|
||||||
/* There are currently 123 dynamic symbols in ld.so.
|
/* There are currently 123 dynamic symbols in ld.so.
|
||||||
ELF_MACHINE_BOOT_FPTR_TABLE_LEN needs to be at least that big. */
|
ELF_MACHINE_BOOT_FPTR_TABLE_LEN needs to be at least that big. */
|
||||||
#define ELF_MACHINE_BOOT_FPTR_TABLE_LEN 200
|
#define ELF_MACHINE_BOOT_FPTR_TABLE_LEN 200
|
||||||
|
|
||||||
#define ELF_MACHINE_LOAD_ADDRESS(var, symbol) \
|
#define ELF_MACHINE_LOAD_ADDRESS(var, symbol) \
|
||||||
asm ("addl %0 = @gprel (" #symbol "), gp" : "=r" (var));
|
asm ("movl %0 = @gprel (" #symbol ");; add %0 = %0, gp" : "=&r" (var));
|
||||||
|
|
||||||
#endif /* !dl_ia64_fptr_h */
|
#endif /* !dl_ia64_fptr_h */
|
||||||
|
|
Loading…
Reference in New Issue