Update elf_machine_load_address for x32
authorH.J. Lu <hjl.tools@gmail.com>
Mon, 14 May 2012 22:17:30 +0000 (15:17 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Mon, 14 May 2012 22:17:30 +0000 (15:17 -0700)
ChangeLog
sysdeps/x86_64/dl-machine.h

index 6fbcc32..7c487bd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
 
+       * sysdeps/x86_64/dl-machine.h (elf_machine_load_address): Remove
+       the `q' suffix from lea and replace .quad with ASM_ADDR.
+
+2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
+
        * sysdeps/unix/sysv/linux/x86_64/sysdep.h (PTR_MANGLE): Remove
        the `q' suffix from xor/rol instructions.  Use $2*LP_SIZE+1
        instead of $17.
index 32814b1..9c27ecf 100644 (file)
@@ -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");