diff options
author | Vineet Gupta <Vineet.Gupta1@synopsys.com> | 2017-01-13 12:24:52 -0800 |
---|---|---|
committer | Waldemar Brodkorb <wbx@uclibc-ng.org> | 2017-01-15 19:20:48 +0100 |
commit | d36553c70fd1e64277fdb8c09efd915b706131af (patch) | |
tree | dad8a578d564b1a956a50b69138d0885cf8cae46 | |
parent | 88b5d9c6ea420dedf23238a952ac117cd7d5a7c1 (diff) |
ARC: ldso: don't use _DYNAMIC@gotpc construct #1
This converts elf_machine_dynamic() to not use the _DYNAMIC@xx construct
which was historically converted by assembler into _GLOBAL_OFFSET_TABLE
Now that "hack" is being removed from assembler, we need to make sure
that no code relies on that magic "conversion".
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
-rw-r--r-- | ldso/ldso/arc/dl-sysdep.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ldso/ldso/arc/dl-sysdep.h b/ldso/ldso/arc/dl-sysdep.h index c6086e68e..2b43efde5 100644 --- a/ldso/ldso/arc/dl-sysdep.h +++ b/ldso/ldso/arc/dl-sysdep.h @@ -119,14 +119,14 @@ extern unsigned __udivmodsi4(unsigned, unsigned) attribute_hidden; | (((type) == R_ARC_COPY) * ELF_RTYPE_CLASS_COPY)) /* - * Get the runtime address of GOT[0] + * Get build time address of .dynamic as setup in GOT[0] + * This is called very early in _dl_start() so it has not been relocated to + * runtime value */ static __always_inline Elf32_Addr elf_machine_dynamic(void) { - Elf32_Addr dyn; - - __asm__("ld %0,[pcl,_DYNAMIC@gotpc]\n\t" : "=r" (dyn)); - return dyn; + extern const Elf32_Addr _GLOBAL_OFFSET_TABLE_[] attribute_hidden; + return _GLOBAL_OFFSET_TABLE_[0]; } /* Return the run-time load address of the shared object. */ |