]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix locating GOT for Thumb-2 PIE binaries.
authorJulian Brown <julian@codesourcery.com>
Thu, 22 Oct 2009 19:22:35 +0000 (19:22 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Thu, 22 Oct 2009 19:22:35 +0000 (19:22 +0000)
* sysdeps/arm/elf/start.S (_start): Avoid dependency on PC pipeline
offset.

ChangeLog.arm
sysdeps/arm/elf/start.S

index 4fcce6106ac0585ee36aa1d4af47c362623508b0..643a071c4ee32cfad68682cf39a0bd06dda5be3d 100644 (file)
@@ -1,3 +1,8 @@
+2009-10-22  Julian Brown  <julian@codesourcery.com>
+
+       * sysdeps/arm/elf/start.S (_start): Avoid dependency on PC pipeline
+       offset.
+
 2009-10-03  Joseph Myers  <joseph@codesourcery.com>
 
        * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Define F_SETOWN_EX and
index 0cf4339b46f6eea398a2f56e9c3390dacd290c84..d21102ea5859ea4d7d791266ca831f45b804295c 100644 (file)
@@ -87,8 +87,8 @@ _start:
 
 #ifdef SHARED
        ldr sl, .L_GOT
-.L_GOT_OFF:
-       add sl, pc, sl
+       adr a4, .L_GOT
+       add sl, sl, a4
 
        ldr ip, .L_GOT+4        /* __libc_csu_fini */
        ldr ip, [sl, ip]
@@ -125,7 +125,7 @@ _start:
 
 #ifdef SHARED
 .L_GOT:
-       .word _GLOBAL_OFFSET_TABLE_-(.L_GOT_OFF+8)
+       .word _GLOBAL_OFFSET_TABLE_ - .L_GOT
        .word __libc_csu_fini(GOT)
        .word __libc_csu_init(GOT)
        .word main(GOT)