diff options
author | Cupertino Miranda <cmiranda@synopsys.com> | 2016-08-01 10:44:42 +0300 |
---|---|---|
committer | Waldemar Brodkorb <wbx@uclibc-ng.org> | 2016-08-01 13:43:08 +0200 |
commit | e189f98fcf778031299378f193c52447af6e752a (patch) | |
tree | 2304154a6888bc833c1ce11a1023657d4ff70a41 /libc/sysdeps | |
parent | ef7cb0f8678ea5cf55aa210c09e8f27d262f42d9 (diff) |
arc: crt1: Fix to PIE
crt1.S needed to use a got relative reference.
Libraries like pthreads define a _init and unless it is GOT, the
linker will fail because it will try to create a dynamic reloc on
.text section, more precisely on __start.
Signed-off-by: Cupertino Miranda <cmiranda@synopsys.com>
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Vlad Zakharov <vzakhar@synopsys.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'libc/sysdeps')
-rw-r--r-- | libc/sysdeps/linux/arc/crt1.S | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libc/sysdeps/linux/arc/crt1.S b/libc/sysdeps/linux/arc/crt1.S index 178c5b44f..ae863e7ac 100644 --- a/libc/sysdeps/linux/arc/crt1.S +++ b/libc/sysdeps/linux/arc/crt1.S @@ -42,9 +42,9 @@ __start: mov_s r5, r0 ; rltd_fini add_s r2, sp, 4 ; argv #ifdef L_Scrt1 - add r0, pcl, @main@pcl - add r3, pcl, @_init@pcl - add r4, pcl, @_fini@pcl + ld r0, [pcl, @main@gotpc] + ld r3, [pcl, @_init@gotpc] + ld r4, [pcl, @_fini@gotpc] #else mov_s r0, main mov_s r3, _init |