diff options
| author | Julian Brown <julian@codesourcery.com> | 2009-10-22 19:22:35 +0000 |
|---|---|---|
| committer | Joseph Myers <joseph@codesourcery.com> | 2009-10-22 19:22:35 +0000 |
| commit | b5c2620bee9fb698c642fa609ee03d6a87ac1552 (patch) | |
| tree | c06fe894b9d37946dc015e9568889abeecca22d0 | |
| parent | afd09ae82a5f6cc0a358acfe72e8463b37003131 (diff) | |
| download | glibc-b5c2620bee9fb698c642fa609ee03d6a87ac1552.tar.xz glibc-b5c2620bee9fb698c642fa609ee03d6a87ac1552.zip | |
Fix locating GOT for Thumb-2 PIE binaries.
* sysdeps/arm/elf/start.S (_start): Avoid dependency on PC pipeline
offset.
| -rw-r--r-- | ChangeLog.arm | 5 | ||||
| -rw-r--r-- | sysdeps/arm/elf/start.S | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/ChangeLog.arm b/ChangeLog.arm index 4fcce6106a..643a071c4e 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -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 diff --git a/sysdeps/arm/elf/start.S b/sysdeps/arm/elf/start.S index 0cf4339b46..d21102ea58 100644 --- a/sysdeps/arm/elf/start.S +++ b/sysdeps/arm/elf/start.S @@ -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) |
