summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2016-07-29 14:26:09 +0100
committerWaldemar Brodkorb <wbx@uclibc-ng.org>2016-07-31 12:50:54 +0200
commit3649052470197e302eee69de7c7f519d63dd1f45 (patch)
treed112ac2dc1dd95d83c383658fceec19bdb3d0984
parent334ddb1b8fe5d4b473a9e410b882952f2075b417 (diff)
ARC: Update relocation syntax for old-thread model code
This commit reverses a change introduced in commit 20554a78a9bba that split some of the ARC code into two based on whether uClibc was configured with native threads or not. The native thread code was updated to use the relocation syntax of modern binutils, while the non-native code path used a syntax only accepted in older versions of binutils. The problem with this is that the choice of old binutils or not is orthogonal to the choice of native threads or not, and so, inevitably a user with a recent version of binutils can make the choice to configure uClibc with non-native thread support, and run into code that will not assemble. The solution is either to abandon support for the old tools completely, or to add a new compile time flag for ARC that is set when the version of binutils being used is old; this new flag would allow the old relocation structure to be selected. In this commit I have simply dropped support for older versions of the tools.
-rw-r--r--ldso/ldso/arc/dl-startup.h7
-rw-r--r--ldso/ldso/arc/dl-sysdep.h10
2 files changed, 0 insertions, 17 deletions
diff --git a/ldso/ldso/arc/dl-startup.h b/ldso/ldso/arc/dl-startup.h
index fadc4330d..232ecb975 100644
--- a/ldso/ldso/arc/dl-startup.h
+++ b/ldso/ldso/arc/dl-startup.h
@@ -34,15 +34,8 @@ __asm__(
" ; skip the extra args calc by dl_start() \n"
" ld_s r1, [sp] ; orig argc from aux-vec Tbl \n"
-#ifdef __UCLIBC_HAS_THREADS_NATIVE__
" ld r12, [pcl, _dl_skip_args@pcl] \n"
-
" add r2, pcl, _dl_fini@pcl ; finalizer \n"
-#else
- " add r12, pcl, _dl_skip_args-.+(.&2) \n"
- " ld r12, [r12] \n"
- " add r2, pcl, _dl_fini-.+(.&2) ; finalizer \n"
-#endif
" add2 sp, sp, r12 ; discard argv entries from stack\n"
" sub_s r1, r1, r12 ; adjusted argc, on stack \n"
diff --git a/ldso/ldso/arc/dl-sysdep.h b/ldso/ldso/arc/dl-sysdep.h
index caece997d..c6086e68e 100644
--- a/ldso/ldso/arc/dl-sysdep.h
+++ b/ldso/ldso/arc/dl-sysdep.h
@@ -132,7 +132,6 @@ static __always_inline Elf32_Addr elf_machine_dynamic(void)
/* Return the run-time load address of the shared object. */
static __always_inline Elf32_Addr elf_machine_load_address(void)
{
-#ifdef __UCLIBC_HAS_THREADS_NATIVE__
/* To find the loadaddr we subtract the runtime addr of a non-local symbol
* say _DYNAMIC from it's build-time addr.
* N.B., gotpc loads get optimized by the linker if it finds the symbol
@@ -150,15 +149,6 @@ static __always_inline Elf32_Addr elf_machine_load_address(void)
"sub %0, %0, %1 ;delta" "\n"
: "=&r" (addr), "=r"(tmp)
);
-#else
- Elf32_Addr addr, tmp;
- __asm__ (
- "ld %1, [pcl, _dl_start@gotpc] ;build addr of _dl_start \n"
- "add %0, pcl, _dl_start-.+(.&2) ;runtime addr of _dl_start \n"
- "sub %0, %0, %1 ;delta \n"
- : "=&r" (addr), "=r"(tmp)
- );
-#endif
return addr;
}