PATCH: Update elf_machine_load_address for x32
H.J. Lu
hongjiu.lu@intel.com
Mon May 14 22:03:00 GMT 2012
Hi,
This patch removes the `q' suffix from lea and replaces the .quad
directive with ASM_ADDR. Tested on Linu/x32 and Linux/x86-64. OK
to install?
H.J.
--
* sysdeps/x86_64/dl-machine.h (elf_machine_load_address): Remove
the `q' suffix from lea and replace .quad with ASM_ADDR.
diff --git a/sysdeps/x86_64/dl-machine.h b/sysdeps/x86_64/dl-machine.h
index 32814b1..9c27ecf 100644
--- a/sysdeps/x86_64/dl-machine.h
+++ b/sysdeps/x86_64/dl-machine.h
@@ -72,10 +72,10 @@ elf_machine_load_address (void)
load offset which is zero if the binary was loaded at the address
it is prelinked for. */
- asm ("leaq _dl_start(%%rip), %0\n\t"
- "subq 1f(%%rip), %0\n\t"
+ asm ("lea _dl_start(%%rip), %0\n\t"
+ "sub 1f(%%rip), %0\n\t"
".section\t.data.rel.ro\n"
- "1:\t.quad _dl_start\n\t"
+ "1:\t" ASM_ADDR " _dl_start\n\t"
".previous\n\t"
: "=r" (addr) : : "cc");
More information about the Libc-alpha
mailing list