diff options
author | Kenny Root <kroot@google.com> | 2012-03-02 13:05:25 -0800 |
---|---|---|
committer | Kenny Root <kroot@google.com> | 2012-03-02 13:09:36 -0800 |
commit | 93cb30813764b140f0adbaa620dcdbb1cae56dd8 (patch) | |
tree | 3e96ed0c75c2b4e06edfd7fa1d637bc8142f1f4a /libc/arch-arm | |
parent | 3690bcb217668a26675a7144637a4eed14bf7741 (diff) | |
download | bionic-93cb30813764b140f0adbaa620dcdbb1cae56dd8.zip bionic-93cb30813764b140f0adbaa620dcdbb1cae56dd8.tar.gz bionic-93cb30813764b140f0adbaa620dcdbb1cae56dd8.tar.bz2 |
Reference __dso_handle in PIC way
Use the same pattern in atexit.S to reference __dso_handle in a way that
doesn't require a TEXTREL flag to be set.
Change-Id: Id69d20863ee203d2b2f7ef0db230f9b548657741
Diffstat (limited to 'libc/arch-arm')
-rw-r--r-- | libc/arch-arm/bionic/crtbegin_so.S | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/libc/arch-arm/bionic/crtbegin_so.S b/libc/arch-arm/bionic/crtbegin_so.S index 9275b1e..8123254 100644 --- a/libc/arch-arm/bionic/crtbegin_so.S +++ b/libc/arch-arm/bionic/crtbegin_so.S @@ -34,17 +34,18 @@ # standard. # __on_dlclose: - adr r0, 0f + ldr r0, .L1 +.LPIC0: + add r0, pc ldr r0, [r0] b __cxa_finalize +.L1: + .word __dso_handle-(.LPIC0+4) -0: - .long __dso_handle - - .section .init_array, "aw" - .globl __INIT_ARRAY__ + .section .init_array, "aw" + .globl __INIT_ARRAY__ __INIT_ARRAY__: - .long -1 + .long -1 .section .fini_array, "aw" .globl __FINI_ARRAY__ |