about summary refs log tree commit diff
path: root/sysdeps/i386/dl-machine.h
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2014-12-30 14:30:37 -0800
committerH.J. Lu <hjl.tools@gmail.com>2014-12-30 14:31:58 -0800
commit7062bd4230a9b94adff4101af9ae6c6a0d53c6e6 (patch)
tree75a9f52f3ad753160639e1e091a78ecb4ad616e8 /sysdeps/i386/dl-machine.h
parent07256e183efe00ed833d1f744f7eef1e103afd74 (diff)
downloadglibc-7062bd4230a9b94adff4101af9ae6c6a0d53c6e6.tar.gz
glibc-7062bd4230a9b94adff4101af9ae6c6a0d53c6e6.tar.xz
glibc-7062bd4230a9b94adff4101af9ae6c6a0d53c6e6.zip
Don't check PI_STATIC_AND_HIDDEN in i386 dl-machine.h
PI_STATIC_AND_HIDDEN is always defined for i386.  There is no need to
check PI_STATIC_AND_HIDDEN in sysdeps/i386/dl-machine.h.

	[BZ #17775]
	* sysdeps/i386/dl-machine.h (PI_STATIC_AND_HIDDEN): Removed.
	(elf_machine_dynamic) [!PI_STATIC_AND_HIDDEN]: Likewise.
	(elf_machine_load_address) [!PI_STATIC_AND_HIDDEN]: Likewise.
Diffstat (limited to 'sysdeps/i386/dl-machine.h')
-rw-r--r--sysdeps/i386/dl-machine.h33
1 files changed, 0 insertions, 33 deletions
diff --git a/sysdeps/i386/dl-machine.h b/sysdeps/i386/dl-machine.h
index 94a6d38377..e38fae6e19 100644
--- a/sysdeps/i386/dl-machine.h
+++ b/sysdeps/i386/dl-machine.h
@@ -34,8 +34,6 @@ elf_machine_matches_host (const Elf32_Ehdr *ehdr)
 }
 
 
-#ifdef PI_STATIC_AND_HIDDEN
-
 /* Return the link-time address of _DYNAMIC.  Conveniently, this is the
    first element of the GOT, a special entry that is never relocated.  */
 static inline Elf32_Addr __attribute__ ((unused, const))
@@ -59,37 +57,6 @@ elf_machine_load_address (void)
   return (Elf32_Addr) &bygotoff - elf_machine_dynamic ();
 }
 
-#else  /* Without .hidden support, we can't compile the code above.  */
-
-/* Return the link-time address of _DYNAMIC.  Conveniently, this is the
-   first element of the GOT.  This must be inlined in a function which
-   uses global data.  */
-static inline Elf32_Addr __attribute__ ((unused))
-elf_machine_dynamic (void)
-{
-  register Elf32_Addr *got asm ("%ebx");
-  return *got;
-}
-
-
-/* Return the run-time load address of the shared object.  */
-static inline Elf32_Addr __attribute__ ((unused))
-elf_machine_load_address (void)
-{
-  /* It doesn't matter what variable this is, the reference never makes
-     it to assembly.  We need a dummy reference to some global variable
-     via the GOT to make sure the compiler initialized %ebx in time.  */
-  extern int _dl_argc;
-  Elf32_Addr addr;
-  asm ("leal _dl_start@GOTOFF(%%ebx), %0\n"
-       "subl _dl_start@GOT(%%ebx), %0"
-       : "=r" (addr) : "m" (_dl_argc) : "cc");
-  return addr;
-}
-
-#endif
-
-
 /* Set up the loaded object described by L so its unrelocated PLT
    entries will jump to the on-demand fixup code in dl-runtime.c.  */