mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-28 00:21:52 +03:00
Remove support for !USE___THREAD
This commit is contained in:
38
ChangeLog
38
ChangeLog
@ -1,5 +1,43 @@
|
||||
2011-09-10 Ulrich Drepper <drepper@gmail.com>
|
||||
|
||||
* include/tls.h: Removed. USE___THREAD must always be defined.
|
||||
* bits/libc-tsd.h: Don't handle !USE___THREAD.
|
||||
* elf/dl-libc.c: Likewise.
|
||||
* elf/dl-tsd.c: Likewise.
|
||||
* include/errno.h: Likewise.
|
||||
* include/netdb.h: Likewise.
|
||||
* include/resolv.h: Likewise.
|
||||
* inet/herrno-loc.c: Likewise.
|
||||
* inet/herrno.c: Likewise.
|
||||
* malloc/arena.c: Likewise.
|
||||
* malloc/hooks.c: Likewise.
|
||||
* malloc/malloc.c: Likewise.
|
||||
* resolv/res-state.c: Likewise.
|
||||
* resolv/res_libc.c: Likewise.
|
||||
* sysdeps/i386/dl-machine.h: Likewise.
|
||||
* sysdeps/ia64/dl-machine.h: Likewise.
|
||||
* sysdeps/powerpc/powerpc32/dl-machine.h: Likewise.
|
||||
* sysdeps/powerpc/powerpc64/dl-machine.h: Likewise.
|
||||
* sysdeps/s390/s390-32/dl-machine.h: Likewise.
|
||||
* sysdeps/s390/s390-64/dl-machine.h: Likewise.
|
||||
* sysdeps/sh/dl-machine.h: Likewise.
|
||||
* sysdeps/sparc/sparc32/dl-machine.h: Likewise.
|
||||
* sysdeps/sparc/sparc64/dl-machine.h: Likewise.
|
||||
* sysdeps/unix/i386/sysdep.S: Likewise.
|
||||
* sysdeps/unix/sysv/linux/i386/sysdep.h: Likewise.
|
||||
* sysdeps/unix/sysv/linux/ia64/sysdep.S: Likewise.
|
||||
* sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S: Likewise.
|
||||
* sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h: Likewise.
|
||||
* sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S: Likewise.
|
||||
* sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h: Likewise.
|
||||
* sysdeps/unix/sysv/linux/sh/sysdep.h: Likewise.
|
||||
* sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h: Likewise.
|
||||
* sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h: Likewise.
|
||||
* sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise.
|
||||
* sysdeps/unix/x86_64/sysdep.S: Likewise.
|
||||
* sysdeps/x86_64/dl-machine.h: Likewise.
|
||||
* tls.make.c: Likewise.
|
||||
|
||||
* configure.in: Remove --with-__thread option. Make tests for
|
||||
--no-whole-archive, __builtin_expect, symbol redirection, __thread,
|
||||
tls_model attribute fail if no support is available. Remove
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* libc-internal interface for thread-specific data. Stub or TLS version.
|
||||
Copyright (C) 1998,2001,2002,2008 Free Software Foundation, Inc.
|
||||
Copyright (C) 1998,2001,2002,2008,2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -51,20 +51,11 @@
|
||||
We don't define an enum for the possible key values, because the KEYs
|
||||
translate directly into variables by macro magic. */
|
||||
|
||||
#if USE___THREAD
|
||||
#define __libc_tsd_define(CLASS, TYPE, KEY) \
|
||||
CLASS __thread TYPE __libc_tsd_##KEY attribute_tls_model_ie;
|
||||
|
||||
#define __libc_tsd_address(TYPE, KEY) (&__libc_tsd_##KEY)
|
||||
#define __libc_tsd_get(TYPE, KEY) (__libc_tsd_##KEY)
|
||||
#define __libc_tsd_set(TYPE, KEY, VALUE) (__libc_tsd_##KEY = (VALUE))
|
||||
#else
|
||||
# define __libc_tsd_define(CLASS, TYPE, KEY) \
|
||||
CLASS TYPE __libc_tsd_##KEY##_data;
|
||||
|
||||
# define __libc_tsd_address(TYPE, KEY) (&__libc_tsd_##KEY##_data)
|
||||
# define __libc_tsd_get(TYPE, KEY) (__libc_tsd_##KEY##_data)
|
||||
# define __libc_tsd_set(TYPE, KEY, VALUE) (__libc_tsd_##KEY##_data = (VALUE))
|
||||
#endif
|
||||
|
||||
#endif /* bits/libc-tsd.h */
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* MT support function to get address of `errno' variable, non-threaded
|
||||
version.
|
||||
Copyright (C) 1996, 1998, 2002, 2004 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996, 1998, 2002, 2004, 2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -21,15 +21,7 @@
|
||||
#include <errno.h>
|
||||
#include <tls.h>
|
||||
|
||||
#if ! USE___THREAD && !RTLD_PRIVATE_ERRNO
|
||||
#undef errno
|
||||
extern int errno;
|
||||
#endif
|
||||
|
||||
int *
|
||||
#if ! USE___THREAD
|
||||
weak_const_function
|
||||
#endif
|
||||
__errno_location (void)
|
||||
{
|
||||
return &errno;
|
||||
|
21
csu/errno.c
21
csu/errno.c
@ -1,5 +1,5 @@
|
||||
/* Definition of `errno' variable. Canonical version.
|
||||
Copyright (C) 2002, 2004 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2004, 2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -27,27 +27,10 @@
|
||||
/* Code compiled for rtld refers only to this name. */
|
||||
int rtld_errno attribute_hidden;
|
||||
|
||||
#elif USE___THREAD
|
||||
#else
|
||||
|
||||
__thread int errno;
|
||||
extern __thread int __libc_errno __attribute__ ((alias ("errno")))
|
||||
attribute_hidden;
|
||||
|
||||
#else
|
||||
|
||||
/* This differs from plain `int errno;' in that it doesn't create
|
||||
a common definition, but a plain symbol that resides in .bss,
|
||||
which can have an alias. */
|
||||
int errno __attribute__ ((nocommon));
|
||||
strong_alias (errno, _errno)
|
||||
|
||||
/* We declare these with compat_symbol so that they are not visible at
|
||||
link time. Programs must use the accessor functions. RTLD is special,
|
||||
since it's not exported from there at any time. */
|
||||
# if defined HAVE_ELF && defined SHARED && defined DO_VERSIONING
|
||||
# include <shlib-compat.h>
|
||||
compat_symbol (libc, errno, errno, GLIBC_2_0);
|
||||
compat_symbol (libc, _errno, _errno, GLIBC_2_0);
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
@ -307,8 +307,6 @@ libc_freeres_fn (free_mem)
|
||||
}
|
||||
}
|
||||
|
||||
if (USE___THREAD || GL(dl_tls_dtv_slotinfo_list) != NULL)
|
||||
{
|
||||
/* Free the memory allocated for the dtv slotinfo array. We can do
|
||||
this only if all modules which used this memory are unloaded. */
|
||||
#ifdef SHARED
|
||||
@ -322,7 +320,6 @@ libc_freeres_fn (free_mem)
|
||||
It was allocated in the dynamic linker (i.e., with a different
|
||||
malloc), and in the static library it's in .bss space. */
|
||||
free_slotinfo (&GL(dl_tls_dtv_slotinfo_list)->next);
|
||||
}
|
||||
|
||||
void *scope_free_list = GL(dl_scope_free_list);
|
||||
GL(dl_scope_free_list) = NULL;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Thread-local data used by error handling for runtime dynamic linker.
|
||||
Copyright (C) 2002, 2005 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2005, 2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -30,17 +30,13 @@
|
||||
void ** __attribute__ ((const))
|
||||
_dl_initial_error_catch_tsd (void)
|
||||
{
|
||||
# if USE___THREAD
|
||||
static __thread void *data;
|
||||
# else
|
||||
static void *data;
|
||||
# endif
|
||||
return &data;
|
||||
}
|
||||
void **(*_dl_error_catch_tsd) (void) __attribute__ ((const))
|
||||
= &_dl_initial_error_catch_tsd;
|
||||
|
||||
# elif USE___THREAD
|
||||
# else
|
||||
|
||||
/* libpthread sets _dl_error_catch_tsd to point to this function.
|
||||
We define it here instead of in libpthread so that it doesn't
|
||||
|
@ -21,7 +21,6 @@ extern int rtld_errno attribute_hidden;
|
||||
|
||||
# include <tls.h>
|
||||
|
||||
# if USE___THREAD
|
||||
# undef errno
|
||||
# ifndef NOT_IN_libc
|
||||
# define errno __libc_errno
|
||||
@ -29,7 +28,6 @@ extern int rtld_errno attribute_hidden;
|
||||
# define errno errno /* For #ifndef errno tests. */
|
||||
# endif
|
||||
extern __thread int errno attribute_tls_model_ie;
|
||||
# endif
|
||||
|
||||
# endif /* RTLD_PRIVATE_ERRNO */
|
||||
|
||||
|
@ -2,29 +2,19 @@
|
||||
#include <resolv/netdb.h>
|
||||
|
||||
/* Macros for accessing h_errno from inside libc. */
|
||||
# undef h_errno
|
||||
# ifdef _LIBC_REENTRANT
|
||||
# include <tls.h>
|
||||
# if USE___THREAD
|
||||
# undef h_errno
|
||||
# ifndef NOT_IN_libc
|
||||
# define h_errno __libc_h_errno
|
||||
# else
|
||||
# define h_errno h_errno /* For #ifndef h_errno tests. */
|
||||
# endif
|
||||
extern __thread int h_errno attribute_tls_model_ie;
|
||||
# define __set_h_errno(x) (h_errno = (x))
|
||||
# else
|
||||
static inline int
|
||||
__set_h_errno (int __err)
|
||||
{
|
||||
return *__h_errno_location () = __err;
|
||||
}
|
||||
# endif
|
||||
# else
|
||||
# undef h_errno
|
||||
# define __set_h_errno(x) (h_errno = (x))
|
||||
extern int h_errno;
|
||||
# endif /* _LIBC_REENTRANT */
|
||||
# define __set_h_errno(x) (h_errno = (x))
|
||||
|
||||
libc_hidden_proto (hstrerror)
|
||||
libc_hidden_proto (innetgr)
|
||||
|
@ -15,14 +15,12 @@
|
||||
|
||||
# ifdef _LIBC_REENTRANT
|
||||
# include <tls.h>
|
||||
# if USE___THREAD
|
||||
# undef _res
|
||||
# ifndef NOT_IN_libc
|
||||
# define __resp __libc_resp
|
||||
# endif
|
||||
# define _res (*__resp)
|
||||
extern __thread struct __res_state *__resp attribute_tls_model_ie;
|
||||
# endif
|
||||
# else
|
||||
# ifndef __BIND_NOSTATIC
|
||||
# undef _res
|
||||
|
@ -1,18 +0,0 @@
|
||||
/* This file defines USE___THREAD to 1 or 0 to cut down on the #if mess. */
|
||||
|
||||
#ifndef _include_tls_h
|
||||
#define _include_tls_h 1
|
||||
|
||||
#include_next <tls.h>
|
||||
|
||||
#if !defined NOT_IN_libc || defined IS_IN_libpthread
|
||||
|
||||
# define USE___THREAD 1
|
||||
|
||||
#else
|
||||
|
||||
# define USE___THREAD 0
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1996, 97, 98, 2002 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1996, 97, 98, 2002, 2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -19,10 +19,6 @@
|
||||
#include <netdb.h>
|
||||
#include <tls.h>
|
||||
|
||||
#if ! USE___THREAD
|
||||
# undef h_errno
|
||||
extern int h_errno;
|
||||
#endif
|
||||
|
||||
/* When threaded, h_errno may be a per-thread variable. */
|
||||
int *
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1996,97,98,2002,2003 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1996,97,98,2002,2003,2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -25,23 +25,7 @@
|
||||
/* We need to have the error status variable of the resolver
|
||||
accessible in the libc. */
|
||||
|
||||
#if USE___THREAD
|
||||
__thread int h_errno;
|
||||
extern __thread int __libc_h_errno __attribute__ ((alias ("h_errno")))
|
||||
attribute_hidden;
|
||||
#define h_errno __libc_h_errno
|
||||
#else
|
||||
/* This differs from plain `int h_errno;' in that it doesn't create
|
||||
a common definition, but a plain symbol that resides in .bss,
|
||||
which can have an alias. */
|
||||
int h_errno __attribute__((section (".bss")));
|
||||
weak_alias (h_errno, _h_errno)
|
||||
|
||||
/* We declare these with compat_symbol so that they are not
|
||||
visible at link time. Programs must use the accessor functions. */
|
||||
# if defined HAVE_ELF && defined SHARED && defined DO_VERSIONING
|
||||
# include <shlib-compat.h>
|
||||
compat_symbol (libc, h_errno, h_errno, GLIBC_2_0);
|
||||
compat_symbol (libc, _h_errno, _h_errno, GLIBC_2_0);
|
||||
# endif
|
||||
#endif
|
||||
|
@ -173,10 +173,6 @@ int __malloc_initialized = -1;
|
||||
|
||||
static __malloc_ptr_t (*save_malloc_hook) (size_t __size,
|
||||
__const __malloc_ptr_t);
|
||||
# if !defined _LIBC || (defined SHARED && !USE___THREAD)
|
||||
static __malloc_ptr_t (*save_memalign_hook) (size_t __align, size_t __size,
|
||||
__const __malloc_ptr_t);
|
||||
# endif
|
||||
static void (*save_free_hook) (__malloc_ptr_t __ptr,
|
||||
__const __malloc_ptr_t);
|
||||
static Void_t* save_arena;
|
||||
@ -432,34 +428,6 @@ __failing_morecore (ptrdiff_t d)
|
||||
extern struct dl_open_hook *_dl_open_hook;
|
||||
libc_hidden_proto (_dl_open_hook);
|
||||
# endif
|
||||
|
||||
# if defined SHARED && !USE___THREAD
|
||||
/* This is called by __pthread_initialize_minimal when it needs to use
|
||||
malloc to set up the TLS state. We cannot do the full work of
|
||||
ptmalloc_init (below) until __pthread_initialize_minimal has finished,
|
||||
so it has to switch to using the special startup-time hooks while doing
|
||||
those allocations. */
|
||||
void
|
||||
__libc_malloc_pthread_startup (bool first_time)
|
||||
{
|
||||
if (first_time)
|
||||
{
|
||||
ptmalloc_init_minimal ();
|
||||
save_malloc_hook = __malloc_hook;
|
||||
save_memalign_hook = __memalign_hook;
|
||||
save_free_hook = __free_hook;
|
||||
__malloc_hook = malloc_starter;
|
||||
__memalign_hook = memalign_starter;
|
||||
__free_hook = free_starter;
|
||||
}
|
||||
else
|
||||
{
|
||||
__malloc_hook = save_malloc_hook;
|
||||
__memalign_hook = save_memalign_hook;
|
||||
__free_hook = save_free_hook;
|
||||
}
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
||||
static void
|
||||
@ -475,13 +443,6 @@ ptmalloc_init (void)
|
||||
if(__malloc_initialized >= 0) return;
|
||||
__malloc_initialized = 0;
|
||||
|
||||
#ifdef _LIBC
|
||||
# if defined SHARED && !USE___THREAD
|
||||
/* ptmalloc_init_minimal may already have been called via
|
||||
__libc_malloc_pthread_startup, above. */
|
||||
if (mp_.pagesize == 0)
|
||||
# endif
|
||||
#endif
|
||||
ptmalloc_init_minimal();
|
||||
|
||||
mutex_init(&main_arena.mutex);
|
||||
|
@ -417,7 +417,7 @@ memalign_check(alignment, bytes, caller)
|
||||
#ifndef NO_THREADS
|
||||
|
||||
# ifdef _LIBC
|
||||
# if USE___THREAD || !defined SHARED
|
||||
# ifndef SHARED
|
||||
/* These routines are never needed in this configuration. */
|
||||
# define NO_STARTER
|
||||
# endif
|
||||
|
@ -1649,19 +1649,7 @@ static Void_t* realloc_check(Void_t* oldmem, size_t bytes,
|
||||
static Void_t* memalign_check(size_t alignment, size_t bytes,
|
||||
const Void_t *caller);
|
||||
#ifndef NO_THREADS
|
||||
# ifdef _LIBC
|
||||
# if USE___THREAD || !defined SHARED
|
||||
/* These routines are never needed in this configuration. */
|
||||
# define NO_STARTER
|
||||
# endif
|
||||
# endif
|
||||
# ifdef NO_STARTER
|
||||
# undef NO_STARTER
|
||||
# else
|
||||
static Void_t* malloc_starter(size_t sz, const Void_t *caller);
|
||||
static Void_t* memalign_starter(size_t aln, size_t sz, const Void_t *caller);
|
||||
static void free_starter(Void_t* mem, const Void_t *caller);
|
||||
# endif
|
||||
static Void_t* malloc_atfork(size_t sz, const Void_t *caller);
|
||||
static void free_atfork(Void_t* mem, const Void_t *caller);
|
||||
#endif
|
||||
|
@ -1,5 +1,20 @@
|
||||
2011-09-10 Ulrich Drepper <drepper@gmail.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Don't handle
|
||||
!USE___THREAD.
|
||||
* sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
|
||||
* sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
|
||||
* sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
|
||||
* sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
|
||||
* sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
|
||||
* sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
|
||||
* sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
|
||||
* sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
|
||||
* sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
|
||||
* sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
|
||||
* sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
|
||||
* sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
|
||||
|
||||
* tst-tls1.c: Support for __thread is now mandatory.
|
||||
* tst-tls2.c: Likewise.
|
||||
* tst-tls3.c: Likewise.
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2002, 2003, 2005, 2007, 2008 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2002,2003,2005,2007,2008,2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
|
||||
|
||||
@ -81,7 +81,6 @@ __new_sem_post:
|
||||
4:
|
||||
#endif
|
||||
addl $_GLOBAL_OFFSET_TABLE_, %ebx
|
||||
#if USE___THREAD
|
||||
#ifdef NO_TLS_DIRECT_SEG_REFS
|
||||
movl errno@gotntpoff(%ebx), %edx
|
||||
addl %gs:0, %edx
|
||||
@ -90,10 +89,6 @@ __new_sem_post:
|
||||
movl errno@gotntpoff(%ebx), %edx
|
||||
movl $EINVAL, %gs:(%edx)
|
||||
#endif
|
||||
#else
|
||||
call __errno_location@plt
|
||||
movl $EINVAL, (%eax)
|
||||
#endif
|
||||
|
||||
orl $-1, %eax
|
||||
popl %ebx
|
||||
@ -107,7 +102,6 @@ __new_sem_post:
|
||||
5:
|
||||
#endif
|
||||
addl $_GLOBAL_OFFSET_TABLE_, %ebx
|
||||
#if USE___THREAD
|
||||
#ifdef NO_TLS_DIRECT_SEG_REFS
|
||||
movl errno@gotntpoff(%ebx), %edx
|
||||
addl %gs:0, %edx
|
||||
@ -116,10 +110,6 @@ __new_sem_post:
|
||||
movl errno@gotntpoff(%ebx), %edx
|
||||
movl $EOVERFLOW, %gs:(%edx)
|
||||
#endif
|
||||
#else
|
||||
call __errno_location@plt
|
||||
movl $EOVERFLOW, (%eax)
|
||||
#endif
|
||||
|
||||
orl $-1, %eax
|
||||
popl %ebx
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2002, 2003, 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2002-2005, 2007, 2009, 2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
|
||||
|
||||
@ -154,7 +154,6 @@ sem_timedwait:
|
||||
4:
|
||||
#endif
|
||||
addl $_GLOBAL_OFFSET_TABLE_, %ebx
|
||||
#if USE___THREAD
|
||||
#ifdef NO_TLS_DIRECT_SEG_REFS
|
||||
movl errno@gotntpoff(%ebx), %edx
|
||||
addl %gs:0, %edx
|
||||
@ -163,10 +162,6 @@ sem_timedwait:
|
||||
movl errno@gotntpoff(%ebx), %edx
|
||||
movl %esi, %gs:(%edx)
|
||||
#endif
|
||||
#else
|
||||
call __errno_location@plt
|
||||
movl %esi, (%eax)
|
||||
#endif
|
||||
|
||||
movl 28(%esp), %ebx /* Load semaphore address. */
|
||||
orl $-1, %eax
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2002, 2003, 2005, 2007 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2002, 2003, 2005, 2007, 2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
|
||||
|
||||
@ -49,7 +49,6 @@ __new_sem_trywait:
|
||||
3:
|
||||
#endif
|
||||
addl $_GLOBAL_OFFSET_TABLE_, %ecx
|
||||
#if USE___THREAD
|
||||
#ifdef NO_TLS_DIRECT_SEG_REFS
|
||||
movl errno@gotntpoff(%ecx), %edx
|
||||
addl %gs:0, %edx
|
||||
@ -57,10 +56,6 @@ __new_sem_trywait:
|
||||
#else
|
||||
movl errno@gotntpoff(%ecx), %edx
|
||||
movl $EAGAIN, %gs:(%edx)
|
||||
# endif
|
||||
#else
|
||||
call __errno_location@plt
|
||||
movl $EAGAIN, (%eax)
|
||||
#endif
|
||||
orl $-1, %eax
|
||||
ret
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2002, 2003, 2005, 2007 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2002, 2003, 2005, 2007, 2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
|
||||
|
||||
@ -114,7 +114,6 @@ __new_sem_wait:
|
||||
8:
|
||||
#endif
|
||||
addl $_GLOBAL_OFFSET_TABLE_, %ebx
|
||||
#if USE___THREAD
|
||||
#ifdef NO_TLS_DIRECT_SEG_REFS
|
||||
movl errno@gotntpoff(%ebx), %edx
|
||||
addl %gs:0, %edx
|
||||
@ -122,10 +121,6 @@ __new_sem_wait:
|
||||
#else
|
||||
movl errno@gotntpoff(%ebx), %edx
|
||||
movl %esi, %gs:(%edx)
|
||||
# endif
|
||||
#else
|
||||
call __errno_location@plt
|
||||
movl %esi, (%eax)
|
||||
#endif
|
||||
orl $-1, %eax
|
||||
|
||||
@ -333,7 +328,6 @@ __old_sem_wait:
|
||||
4:
|
||||
#endif
|
||||
addl $_GLOBAL_OFFSET_TABLE_, %ebx
|
||||
#if USE___THREAD
|
||||
#ifdef NO_TLS_DIRECT_SEG_REFS
|
||||
movl errno@gotntpoff(%ebx), %edx
|
||||
addl %gs:0, %edx
|
||||
@ -341,10 +335,6 @@ __old_sem_wait:
|
||||
#else
|
||||
movl errno@gotntpoff(%ebx), %edx
|
||||
movl %esi, %gs:(%edx)
|
||||
# endif
|
||||
#else
|
||||
call __errno_location@plt
|
||||
movl %esi, (%eax)
|
||||
#endif
|
||||
orl $-1, %eax
|
||||
jmp 5b
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2002, 2003, 2004, 2006, 2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Jakub Jelinek <jakub@redhat.com>, 2002.
|
||||
|
||||
@ -27,7 +27,6 @@
|
||||
|
||||
# undef PSEUDO
|
||||
|
||||
# if USE___THREAD
|
||||
# ifndef NOT_IN_libc
|
||||
# define SYSDEP_CANCEL_ERRNO __libc_errno
|
||||
# else
|
||||
@ -53,28 +52,6 @@ __syscall_error_##args: \
|
||||
add loc4 = loc4, r13;; \
|
||||
st4 [loc4] = loc3; \
|
||||
mov ar.pfs = loc0
|
||||
# else
|
||||
# define SYSDEP_CANCEL_ERROR(args) \
|
||||
.section .gnu.linkonce.t.__syscall_error_##args, "ax"; \
|
||||
.align 32; \
|
||||
.proc __syscall_error_##args; \
|
||||
.global __syscall_error_##args; \
|
||||
.hidden __syscall_error_##args; \
|
||||
.size __syscall_error_##args, 64; \
|
||||
__syscall_error_##args: \
|
||||
.prologue; \
|
||||
.regstk args, 5, args, 0; \
|
||||
.save ar.pfs, loc0; \
|
||||
.save rp, loc1; \
|
||||
.body; \
|
||||
mov loc4 = r1;; \
|
||||
br.call.sptk.many b0 = __errno_location;; \
|
||||
st4 [r8] = loc3; \
|
||||
mov r1 = loc4; \
|
||||
mov rp = loc1; \
|
||||
mov r8 = -1; \
|
||||
mov ar.pfs = loc0
|
||||
# endif
|
||||
|
||||
# ifndef USE_DL_SYSINFO
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2003, 2004, 2007, 2008 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2003, 2004, 2007, 2008, 2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -73,7 +73,6 @@ __new_sem_post:
|
||||
mov.l .Lgot3, r12
|
||||
add r0, r12
|
||||
|
||||
#if USE___THREAD
|
||||
mov.l .Lerrno3, r0
|
||||
stc gbr, r1
|
||||
mov.l @(r0, r12), r0
|
||||
@ -84,14 +83,6 @@ __new_sem_post:
|
||||
.long errno@GOTTPOFF
|
||||
.Lexit:
|
||||
mov.l r2, @r0
|
||||
#else
|
||||
mov r2, r8
|
||||
mov.l .Lerrloc3, r1
|
||||
bsrf r1
|
||||
nop
|
||||
.Lerrloc3b:
|
||||
mov r8, @r0
|
||||
#endif
|
||||
lds.l @r15+, pr
|
||||
mov.l @r15+, r8
|
||||
mov.l @r15+, r12
|
||||
@ -103,9 +94,5 @@ __new_sem_post:
|
||||
.long SEM_VALUE_MAX
|
||||
.Lgot3:
|
||||
.long _GLOBAL_OFFSET_TABLE_
|
||||
#if !USE___THREAD
|
||||
.Lerrloc3:
|
||||
.long __errno_location@PLT-(.Lerrloc3b-.)
|
||||
#endif
|
||||
.size __new_sem_post,.-__new_sem_post
|
||||
versioned_symbol(libpthread, __new_sem_post, sem_post, GLIBC_2_1)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2003, 2004, 2007, 2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -173,7 +173,6 @@ sem_timedwait:
|
||||
mov.l .Lgot2, r12
|
||||
add r0, r12
|
||||
|
||||
#if USE___THREAD
|
||||
mov.l .Lerrno2, r0
|
||||
stc gbr, r1
|
||||
mov.l @(r0, r12), r0
|
||||
@ -183,12 +182,6 @@ sem_timedwait:
|
||||
.Lerrno2:
|
||||
.long errno@GOTTPOFF
|
||||
.Lexit:
|
||||
#else
|
||||
mov.l .Lerrloc2, r1
|
||||
bsrf r1
|
||||
nop
|
||||
.Lerrloc2b:
|
||||
#endif
|
||||
mov.l r10, @r0
|
||||
DEC (@(NWAITERS,r8), r2)
|
||||
bra 10b
|
||||
@ -201,10 +194,6 @@ sem_timedwait:
|
||||
.long 1000000000
|
||||
.Lgot2:
|
||||
.long _GLOBAL_OFFSET_TABLE_
|
||||
#if !USE___THREAD
|
||||
.Lerrloc2:
|
||||
.long __errno_location@PLT-(.Lerrloc2b-.)
|
||||
#endif
|
||||
.Lenable0:
|
||||
.long __pthread_enable_asynccancel-.Lenable0b
|
||||
.Ldisable0:
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2003, 2004, 2007, 2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -57,7 +57,6 @@ __new_sem_trywait:
|
||||
mov.l .Lgot1, r12
|
||||
add r0, r12
|
||||
|
||||
#if USE___THREAD
|
||||
mov.l .Lerrno1, r0
|
||||
stc gbr, r1
|
||||
mov.l @(r0, r12), r0
|
||||
@ -67,12 +66,6 @@ __new_sem_trywait:
|
||||
.Lerrno1:
|
||||
.long errno@GOTTPOFF
|
||||
.Lexit:
|
||||
#else
|
||||
mov.l .Lerrloc1, r1
|
||||
bsrf r1
|
||||
nop
|
||||
.Lerrloc1b:
|
||||
#endif
|
||||
mov.l r8, @r0
|
||||
lds.l @r15+, pr
|
||||
mov.l @r15+, r8
|
||||
@ -83,9 +76,5 @@ __new_sem_trywait:
|
||||
.align 2
|
||||
.Lgot1:
|
||||
.long _GLOBAL_OFFSET_TABLE_
|
||||
#if !USE___THREAD
|
||||
.Lerrloc1:
|
||||
.long __errno_location@PLT-(.Lerrloc1b-.)
|
||||
#endif
|
||||
.size __new_sem_trywait,.-__new_sem_trywait
|
||||
versioned_symbol(libpthread, __new_sem_trywait, sem_trywait, GLIBC_2_1)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2003, 2004, 2007, 2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -131,7 +131,6 @@ __new_sem_wait:
|
||||
mov.l .Lgot0, r12
|
||||
add r0, r12
|
||||
|
||||
#if USE___THREAD
|
||||
mov.l .Lerrno0, r0
|
||||
stc gbr, r1
|
||||
mov.l @(r0, r12), r0
|
||||
@ -141,12 +140,6 @@ __new_sem_wait:
|
||||
.Lerrno0:
|
||||
.long errno@GOTTPOFF
|
||||
.Lexit:
|
||||
#else
|
||||
mov.l .Lerrloc0, r1
|
||||
bsrf r1
|
||||
nop
|
||||
.Lerrloc0b:
|
||||
#endif
|
||||
mov.l r8, @r0
|
||||
bra 9b
|
||||
mov #-1, r0
|
||||
@ -154,10 +147,6 @@ __new_sem_wait:
|
||||
.align 2
|
||||
.Lgot0:
|
||||
.long _GLOBAL_OFFSET_TABLE_
|
||||
#if !USE___THREAD
|
||||
.Lerrloc0:
|
||||
.long __errno_location@PLT-(.Lerrloc0b-.)
|
||||
#endif
|
||||
.Lenable0:
|
||||
.long __pthread_enable_asynccancel-.Lenable0b
|
||||
.Ldisable0:
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2002, 2003, 2005, 2007, 2008 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2002,2003,2005,2007,2008,2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
|
||||
|
||||
@ -62,29 +62,15 @@ sem_post:
|
||||
retq
|
||||
|
||||
1:
|
||||
#if USE___THREAD
|
||||
movl $EINVAL, %eax
|
||||
#else
|
||||
callq __errno_location@plt
|
||||
movl $EINVAL, %edx
|
||||
#endif
|
||||
jmp 4f
|
||||
|
||||
3:
|
||||
#if USE___THREAD
|
||||
movl $EOVERFLOW, %eax
|
||||
#else
|
||||
callq __errno_location@plt
|
||||
movl $EOVERFLOW, %edx
|
||||
#endif
|
||||
|
||||
4:
|
||||
#if USE___THREAD
|
||||
movq errno@gottpoff(%rip), %rdx
|
||||
movl %eax, %fs:(%rdx)
|
||||
#else
|
||||
movl %edx, (%rax)
|
||||
#endif
|
||||
orl $-1, %eax
|
||||
retq
|
||||
.size sem_post,.-sem_post
|
||||
|
@ -143,39 +143,24 @@ sem_timedwait:
|
||||
|
||||
cfi_adjust_cfa_offset(8)
|
||||
3: negq %r9
|
||||
#if USE___THREAD
|
||||
movq errno@gottpoff(%rip), %rdx
|
||||
movl %r9d, %fs:(%rdx)
|
||||
#else
|
||||
callq __errno_location@plt
|
||||
movl %r9d, (%rax)
|
||||
#endif
|
||||
|
||||
orl $-1, %eax
|
||||
jmp 15b
|
||||
|
||||
cfi_adjust_cfa_offset(-8)
|
||||
6:
|
||||
#if USE___THREAD
|
||||
movq errno@gottpoff(%rip), %rdx
|
||||
movl $EINVAL, %fs:(%rdx)
|
||||
#else
|
||||
callq __errno_location@plt
|
||||
movl $EINVAL, (%rax)
|
||||
#endif
|
||||
|
||||
orl $-1, %eax
|
||||
|
||||
retq
|
||||
|
||||
16:
|
||||
#if USE___THREAD
|
||||
movq errno@gottpoff(%rip), %rdx
|
||||
movl $ETIMEDOUT, %fs:(%rdx)
|
||||
#else
|
||||
callq __errno_location@plt
|
||||
movl $ETIMEDOUT, (%rax)
|
||||
#endif
|
||||
|
||||
orl $-1, %eax
|
||||
|
||||
@ -303,13 +288,8 @@ sem_timedwait:
|
||||
cfi_rel_offset(%r14, STACKFRAME)
|
||||
33: negq %r14
|
||||
36:
|
||||
#if USE___THREAD
|
||||
movq errno@gottpoff(%rip), %rdx
|
||||
movl %r14d, %fs:(%rdx)
|
||||
#else
|
||||
callq __errno_location@plt
|
||||
movl %r14d, (%rax)
|
||||
#endif
|
||||
|
||||
orl $-1, %eax
|
||||
jmp 45b
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2002, 2003, 2005, 2007 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2002, 2003, 2005, 2007, 2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
|
||||
|
||||
@ -41,13 +41,8 @@ sem_trywait:
|
||||
retq
|
||||
|
||||
1:
|
||||
#if USE___THREAD
|
||||
movq errno@gottpoff(%rip), %rdx
|
||||
movl $EAGAIN, %fs:(%rdx)
|
||||
#else
|
||||
callq __errno_location@plt
|
||||
movl $EAGAIN, (%rax)
|
||||
#endif
|
||||
orl $-1, %eax
|
||||
retq
|
||||
.size sem_trywait,.-sem_trywait
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2002, 2003, 2005, 2007, 2009 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2002, 2003, 2005, 2007, 2009, 2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
|
||||
|
||||
@ -125,14 +125,8 @@ sem_wait:
|
||||
|
||||
cfi_adjust_cfa_offset(8)
|
||||
4: negq %rcx
|
||||
#if USE___THREAD
|
||||
movq errno@gottpoff(%rip), %rdx
|
||||
movl %ecx, %fs:(%rdx)
|
||||
#else
|
||||
# error "not supported. %rcx and %rdi must be preserved"
|
||||
callq __errno_location@plt
|
||||
movl %ecx, (%rax)
|
||||
#endif
|
||||
orl $-1, %eax
|
||||
|
||||
jmp 9b
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1996, 97, 98, 2002, 2003 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1996, 97, 98, 2002, 2003, 2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -19,27 +19,10 @@
|
||||
#include <resolv.h>
|
||||
#include <tls.h>
|
||||
|
||||
#if ! USE___THREAD
|
||||
|
||||
# undef _res
|
||||
extern struct __res_state _res;
|
||||
|
||||
/* When threaded, _res may be a per-thread variable. */
|
||||
struct __res_state *
|
||||
weak_const_function
|
||||
__res_state (void)
|
||||
{
|
||||
return &_res;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
struct __res_state *
|
||||
__res_state (void)
|
||||
{
|
||||
return __resp;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
libc_hidden_def (__res_state)
|
||||
|
@ -126,12 +126,10 @@ struct __res_state _res __attribute__((section (".bss")));
|
||||
|
||||
#include <tls.h>
|
||||
|
||||
#if USE___THREAD
|
||||
#undef __resp
|
||||
__thread struct __res_state *__resp = &_res;
|
||||
extern __thread struct __res_state *__libc_resp
|
||||
__attribute__ ((alias ("__resp"))) attribute_hidden;
|
||||
#endif
|
||||
|
||||
/* We declare this with compat_symbol so that it's not
|
||||
visible at link time. Programs must use the accessor functions. */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Machine-dependent ELF dynamic relocation inline functions. i386 version.
|
||||
Copyright (C) 1995-2005, 2006, 2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995-2005, 2006, 2009, 2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -243,18 +243,12 @@ _dl_start_user:\n\
|
||||
define the value.
|
||||
ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one
|
||||
of the main executable's symbols, as for a COPY reloc. */
|
||||
#if !defined RTLD_BOOTSTRAP || USE___THREAD
|
||||
# define elf_machine_type_class(type) \
|
||||
((((type) == R_386_JMP_SLOT || (type) == R_386_TLS_DTPMOD32 \
|
||||
|| (type) == R_386_TLS_DTPOFF32 || (type) == R_386_TLS_TPOFF32 \
|
||||
|| (type) == R_386_TLS_TPOFF || (type) == R_386_TLS_DESC) \
|
||||
* ELF_RTYPE_CLASS_PLT) \
|
||||
| (((type) == R_386_COPY) * ELF_RTYPE_CLASS_COPY))
|
||||
#else
|
||||
# define elf_machine_type_class(type) \
|
||||
((((type) == R_386_JMP_SLOT) * ELF_RTYPE_CLASS_PLT) \
|
||||
| (((type) == R_386_COPY) * ELF_RTYPE_CLASS_COPY))
|
||||
#endif
|
||||
|
||||
/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */
|
||||
#define ELF_MACHINE_JMP_SLOT R_386_JMP_SLOT
|
||||
@ -357,7 +351,6 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
|
||||
*reloc_addr = value;
|
||||
break;
|
||||
|
||||
# if !defined RTLD_BOOTSTRAP || USE___THREAD
|
||||
case R_386_TLS_DTPMOD32:
|
||||
# ifdef RTLD_BOOTSTRAP
|
||||
/* During startup the dynamic linker is always the module
|
||||
@ -443,7 +436,6 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
|
||||
}
|
||||
# endif
|
||||
break;
|
||||
# endif /* use TLS */
|
||||
|
||||
# ifndef RTLD_BOOTSTRAP
|
||||
case R_386_32:
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Machine-dependent ELF dynamic relocation inline functions. IA-64 version.
|
||||
Copyright (C) 1995-1997, 2000-2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995-1997, 2000-2006, 2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -311,15 +311,10 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
|
||||
of the main executable's symbols, as for a COPY reloc, which we don't
|
||||
use. */
|
||||
/* ??? Ignore *MSB for now. */
|
||||
#if !defined RTLD_BOOTSTRAP || USE___THREAD
|
||||
#define elf_machine_type_class(type) \
|
||||
(((type) == R_IA64_IPLTLSB || (type) == R_IA64_DTPMOD64LSB \
|
||||
|| (type) == R_IA64_DTPREL64LSB || (type) == R_IA64_TPREL64LSB) \
|
||||
* ELF_RTYPE_CLASS_PLT)
|
||||
#else
|
||||
#define elf_machine_type_class(type) \
|
||||
(((type) == R_IA64_IPLTLSB) * ELF_RTYPE_CLASS_PLT)
|
||||
#endif
|
||||
|
||||
/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */
|
||||
#define ELF_MACHINE_JMP_SLOT R_IA64_IPLTLSB
|
||||
@ -432,7 +427,6 @@ elf_machine_rela (struct link_map *map,
|
||||
value = _dl_make_fptr (sym_map, sym, value);
|
||||
else if (R_IA64_TYPE (r_type) == R_IA64_TYPE (R_IA64_PCREL64LSB))
|
||||
value -= (Elf64_Addr) reloc_addr & -16;
|
||||
#if !defined RTLD_BOOTSTRAP || defined USE___THREAD
|
||||
else if (R_IA64_TYPE (r_type) == R_IA64_TYPE (R_IA64_DTPMOD64LSB))
|
||||
#ifdef RTLD_BOOTSTRAP
|
||||
/* During startup the dynamic linker is always index 1. */
|
||||
@ -451,7 +445,6 @@ elf_machine_rela (struct link_map *map,
|
||||
#endif
|
||||
value += sym_map->l_tls_offset - sym_map->l_addr;
|
||||
}
|
||||
#endif
|
||||
else
|
||||
_dl_reloc_bad_type (map, r_type, 0);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Machine-dependent ELF dynamic relocation inline functions. PowerPC version.
|
||||
Copyright (C) 1995-2002, 2003, 2005, 2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995-2003, 2005, 2006, 2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -135,7 +135,6 @@ __elf_preferred_address(struct link_map *loader, size_t maplength,
|
||||
/* We never want to use a PLT entry as the destination of a
|
||||
reloc, when what is being relocated is a branch. This is
|
||||
partly for efficiency, but mostly so we avoid loops. */
|
||||
#if !defined RTLD_BOOTSTRAP || USE___THREAD
|
||||
#define elf_machine_type_class(type) \
|
||||
((((type) == R_PPC_JMP_SLOT \
|
||||
|| (type) == R_PPC_REL24 \
|
||||
@ -143,13 +142,6 @@ __elf_preferred_address(struct link_map *loader, size_t maplength,
|
||||
&& (type) <= R_PPC_DTPREL32) \
|
||||
|| (type) == R_PPC_ADDR24) * ELF_RTYPE_CLASS_PLT) \
|
||||
| (((type) == R_PPC_COPY) * ELF_RTYPE_CLASS_COPY))
|
||||
#else
|
||||
#define elf_machine_type_class(type) \
|
||||
((((type) == R_PPC_JMP_SLOT \
|
||||
|| (type) == R_PPC_REL24 \
|
||||
|| (type) == R_PPC_ADDR24) * ELF_RTYPE_CLASS_PLT) \
|
||||
| (((type) == R_PPC_COPY) * ELF_RTYPE_CLASS_COPY))
|
||||
#endif
|
||||
|
||||
/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */
|
||||
#define ELF_MACHINE_JMP_SLOT R_PPC_JMP_SLOT
|
||||
@ -331,8 +323,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
|
||||
*reloc_addr = value;
|
||||
break;
|
||||
|
||||
#if (!defined RTLD_BOOTSTRAP || USE___THREAD) \
|
||||
&& !defined RESOLVE_CONFLICT_FIND_MAP
|
||||
#ifndef RESOLVE_CONFLICT_FIND_MAP
|
||||
# ifdef RTLD_BOOTSTRAP
|
||||
# define NOT_BOOTSTRAP 0
|
||||
# else
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* Machine-dependent ELF dynamic relocation inline functions.
|
||||
PowerPC64 version.
|
||||
Copyright 1995-2005, 2006, 2008, 2010 Free Software Foundation, Inc.
|
||||
Copyright 1995-2005, 2006, 2008, 2010, 2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -505,7 +505,6 @@ elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc,
|
||||
*reloc_addr = l_addr + reloc->r_addend;
|
||||
}
|
||||
|
||||
#if !defined RTLD_BOOTSTRAP || USE___THREAD
|
||||
/* This computes the value used by TPREL* relocs. */
|
||||
auto inline Elf64_Addr __attribute__ ((always_inline, const))
|
||||
elf_machine_tprel (struct link_map *map,
|
||||
@ -524,7 +523,6 @@ elf_machine_tprel (struct link_map *map,
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Call function at address VALUE (an OPD entry) to resolve ifunc relocs. */
|
||||
auto inline Elf64_Addr __attribute__ ((always_inline))
|
||||
@ -611,7 +609,6 @@ elf_machine_rela (struct link_map *map,
|
||||
#endif
|
||||
return;
|
||||
|
||||
#if !defined RTLD_BOOTSTRAP || USE___THREAD
|
||||
case R_PPC64_DTPMOD64:
|
||||
#ifdef RTLD_BOOTSTRAP
|
||||
/* During startup the dynamic linker is always index 1. */
|
||||
@ -692,7 +689,6 @@ elf_machine_rela (struct link_map *map,
|
||||
value = elf_machine_tprel (map, sym_map, sym, reloc);
|
||||
*(Elf64_Half *) reloc_addr = PPC_HIGHESTA (value);
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifndef RTLD_BOOTSTRAP /* None of the following appear in ld.so */
|
||||
case R_PPC64_ADDR16_LO_DS:
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Machine-dependent ELF dynamic relocation inline functions. S390 Version.
|
||||
Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006
|
||||
Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2011
|
||||
Free Software Foundation, Inc.
|
||||
Contributed by Carl Pederson & Martin Schwidefsky.
|
||||
This file is part of the GNU C Library.
|
||||
@ -316,8 +316,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
|
||||
*reloc_addr = value + reloc->r_addend;
|
||||
break;
|
||||
|
||||
#if (!defined RTLD_BOOTSTRAP || USE___THREAD) \
|
||||
&& !defined RESOLVE_CONFLICT_FIND_MAP
|
||||
#ifndef RESOLVE_CONFLICT_FIND_MAP
|
||||
case R_390_TLS_DTPMOD:
|
||||
# ifdef RTLD_BOOTSTRAP
|
||||
/* During startup the dynamic linker is always the module
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* Machine-dependent ELF dynamic relocation inline functions.
|
||||
64 bit S/390 Version.
|
||||
Copyright (C) 2001-2005, 2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 2001-2005, 2006, 2011 Free Software Foundation, Inc.
|
||||
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
@ -288,8 +288,7 @@ elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc,
|
||||
*reloc_addr = value + reloc->r_addend;
|
||||
break;
|
||||
|
||||
#if (!defined RTLD_BOOTSTRAP || USE___THREAD) \
|
||||
&& !defined RESOLVE_CONFLICT_FIND_MAP
|
||||
#ifndef RESOLVE_CONFLICT_FIND_MAP
|
||||
case R_390_TLS_DTPMOD:
|
||||
# ifdef RTLD_BOOTSTRAP
|
||||
/* During startup the dynamic linker is always the module
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Machine-dependent ELF dynamic relocation inline functions. SH version.
|
||||
Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
|
||||
Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2011
|
||||
Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
@ -208,17 +208,11 @@ __fpscr_values:\n\
|
||||
define the value.
|
||||
ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one
|
||||
of the main executable's symbols, as for a COPY reloc. */
|
||||
#if !defined RTLD_BOOTSTRAP || USE___THREAD
|
||||
#define elf_machine_type_class(type) \
|
||||
((((type) == R_SH_JMP_SLOT || (type) == R_SH_TLS_DTPMOD32 \
|
||||
|| (type) == R_SH_TLS_DTPOFF32 || (type) == R_SH_TLS_TPOFF32) \
|
||||
* ELF_RTYPE_CLASS_PLT) \
|
||||
| (((type) == R_SH_COPY) * ELF_RTYPE_CLASS_COPY))
|
||||
#else
|
||||
#define elf_machine_type_class(type) \
|
||||
((((type) == R_SH_JMP_SLOT) * ELF_RTYPE_CLASS_PLT) \
|
||||
| (((type) == R_SH_COPY) * ELF_RTYPE_CLASS_COPY))
|
||||
#endif
|
||||
|
||||
/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */
|
||||
#define ELF_MACHINE_JMP_SLOT R_SH_JMP_SLOT
|
||||
@ -354,7 +348,6 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
|
||||
/* These addresses are always aligned. */
|
||||
*reloc_addr = value;
|
||||
break;
|
||||
#if !defined RTLD_BOOTSTRAP || USE___THREAD
|
||||
/* XXX Remove TLS relocations which are not needed. */
|
||||
case R_SH_TLS_DTPMOD32:
|
||||
#ifdef RTLD_BOOTSTRAP
|
||||
@ -395,7 +388,6 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
#endif /* use TLS */
|
||||
case R_SH_DIR32:
|
||||
{
|
||||
#ifndef RTLD_BOOTSTRAP
|
||||
|
@ -193,17 +193,11 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
|
||||
PLT entries should not be allowed to define the value.
|
||||
ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one
|
||||
of the main executable's symbols, as for a COPY reloc. */
|
||||
#if !defined RTLD_BOOTSTRAP || USE___THREAD
|
||||
#define elf_machine_type_class(type) \
|
||||
((((type) == R_SPARC_JMP_SLOT \
|
||||
|| ((type) >= R_SPARC_TLS_GD_HI22 && (type) <= R_SPARC_TLS_TPOFF64)) \
|
||||
* ELF_RTYPE_CLASS_PLT) \
|
||||
| (((type) == R_SPARC_COPY) * ELF_RTYPE_CLASS_COPY))
|
||||
#else
|
||||
# define elf_machine_type_class(type) \
|
||||
((((type) == R_SPARC_JMP_SLOT) * ELF_RTYPE_CLASS_PLT) \
|
||||
| (((type) == R_SPARC_COPY) * ELF_RTYPE_CLASS_COPY))
|
||||
#endif
|
||||
|
||||
/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */
|
||||
#define ELF_MACHINE_JMP_SLOT R_SPARC_JMP_SLOT
|
||||
@ -454,8 +448,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
|
||||
sparc_fixup_plt (reloc, reloc_addr, value, 0, do_flush);
|
||||
}
|
||||
break;
|
||||
#if (!defined RTLD_BOOTSTRAP || USE___THREAD) \
|
||||
&& !defined RESOLVE_CONFLICT_FIND_MAP
|
||||
#ifndef RESOLVE_CONFLICT_FIND_MAP
|
||||
case R_SPARC_TLS_DTPMOD32:
|
||||
/* Get the information from the link map returned by the
|
||||
resolv function. */
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* Machine-dependent ELF dynamic relocation inline functions. Sparc64 version.
|
||||
Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
|
||||
2009, 2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 1997-2006, 2009, 2010, 2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -115,17 +114,11 @@ elf_machine_plt_value (struct link_map *map, const Elf64_Rela *reloc,
|
||||
PLT entries should not be allowed to define the value.
|
||||
ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one
|
||||
of the main executable's symbols, as for a COPY reloc. */
|
||||
#if !defined RTLD_BOOTSTRAP || USE___THREAD
|
||||
#define elf_machine_type_class(type) \
|
||||
((((type) == R_SPARC_JMP_SLOT \
|
||||
|| ((type) >= R_SPARC_TLS_GD_HI22 && (type) <= R_SPARC_TLS_TPOFF64)) \
|
||||
* ELF_RTYPE_CLASS_PLT) \
|
||||
| (((type) == R_SPARC_COPY) * ELF_RTYPE_CLASS_COPY))
|
||||
#else
|
||||
# define elf_machine_type_class(type) \
|
||||
((((type) == R_SPARC_JMP_SLOT) * ELF_RTYPE_CLASS_PLT) \
|
||||
| (((type) == R_SPARC_COPY) * ELF_RTYPE_CLASS_COPY))
|
||||
#endif
|
||||
|
||||
/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */
|
||||
#define ELF_MACHINE_JMP_SLOT R_SPARC_JMP_SLOT
|
||||
@ -479,8 +472,7 @@ elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc,
|
||||
sparc64_fixup_plt (map, reloc, reloc_addr, value, reloc->r_addend, 0);
|
||||
#endif
|
||||
break;
|
||||
#if (!defined RTLD_BOOTSTRAP || USE___THREAD) \
|
||||
&& !defined RESOLVE_CONFLICT_FIND_MAP
|
||||
#ifndef RESOLVE_CONFLICT_FIND_MAP
|
||||
case R_SPARC_TLS_DTPMOD64:
|
||||
/* Get the information from the link map returned by the
|
||||
resolv function. */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991,1992,1993,1994,1995,1996,1997,2000,2002,2004,2005
|
||||
/* Copyright (C) 1991-1997,2000,2002,2004,2005,2011
|
||||
Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
@ -46,27 +46,15 @@ syscall_error:
|
||||
notb:
|
||||
#endif
|
||||
#ifndef PIC
|
||||
# if USE___THREAD
|
||||
# ifndef NO_TLS_DIRECT_SEG_REFS
|
||||
movl %eax, %gs:C_SYMBOL_NAME(errno@NTPOFF)
|
||||
# else
|
||||
movl %gs:0, %ecx
|
||||
movl %eax, C_SYMBOL_NAME(errno@NTPOFF)(%ecx)
|
||||
# endif
|
||||
# elif !defined _LIBC_REENTRANT
|
||||
movl %eax, C_SYMBOL_NAME(errno)
|
||||
# else
|
||||
pushl %eax
|
||||
PUSH_ERRNO_LOCATION_RETURN
|
||||
call BP_SYM (__errno_location)
|
||||
POP_ERRNO_LOCATION_RETURN
|
||||
popl %ecx
|
||||
movl %ecx, (%eax)
|
||||
# endif
|
||||
#else
|
||||
/* The caller has pushed %ebx and then set it up to
|
||||
point to the GOT before calling us through the PLT. */
|
||||
# if USE___THREAD
|
||||
movl C_SYMBOL_NAME(errno@GOTNTPOFF)(%ebx), %ecx
|
||||
|
||||
/* Pop %ebx value saved before jumping here. */
|
||||
@ -77,27 +65,6 @@ notb:
|
||||
# else
|
||||
movl %eax, %gs:0(%ecx)
|
||||
# endif
|
||||
# elif RTLD_PRIVATE_ERRNO
|
||||
movl %eax, C_SYMBOL_NAME(rtld_errno@GOTOFF)(%ebx)
|
||||
|
||||
/* Pop %ebx value saved before jumping here. */
|
||||
popl %ebx
|
||||
# elif !defined _LIBC_REENTRANT
|
||||
movl C_SYMBOL_NAME(errno@GOT)(%ebx), %ecx
|
||||
|
||||
/* Pop %ebx value saved before jumping here. */
|
||||
popl %ebx
|
||||
movl %eax, (%ecx)
|
||||
# else
|
||||
pushl %eax
|
||||
PUSH_ERRNO_LOCATION_RETURN
|
||||
call C_SYMBOL_NAME (BP_SYM (__errno_location)@PLT)
|
||||
POP_ERRNO_LOCATION_RETURN
|
||||
popl %ecx
|
||||
/* Pop %ebx value saved before jumping here. */
|
||||
popl %ebx
|
||||
movl %ecx, (%eax)
|
||||
# endif
|
||||
#endif
|
||||
movl $-1, %eax
|
||||
ret
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1992,1993,1995-2000,2002-2006,2007
|
||||
/* Copyright (C) 1992,1993,1995-2000,2002-2006,2007,2011
|
||||
Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper, <drepper@gnu.org>, August 1995.
|
||||
@ -121,7 +121,6 @@
|
||||
|
||||
# elif defined _LIBC_REENTRANT
|
||||
|
||||
# if USE___THREAD
|
||||
# ifndef NOT_IN_libc
|
||||
# define SYSCALL_ERROR_ERRNO __libc_errno
|
||||
# else
|
||||
@ -145,31 +144,6 @@
|
||||
movl src, (destoff)
|
||||
# endif
|
||||
# else
|
||||
# define SYSCALL_ERROR_HANDLER \
|
||||
0:pushl %ebx; \
|
||||
cfi_adjust_cfa_offset (4); \
|
||||
cfi_rel_offset (ebx, 0); \
|
||||
SETUP_PIC_REG (bx); \
|
||||
addl $_GLOBAL_OFFSET_TABLE_, %ebx; \
|
||||
xorl %edx, %edx; \
|
||||
subl %eax, %edx; \
|
||||
pushl %edx; \
|
||||
cfi_adjust_cfa_offset (4); \
|
||||
PUSH_ERRNO_LOCATION_RETURN; \
|
||||
call BP_SYM (__errno_location)@PLT; \
|
||||
POP_ERRNO_LOCATION_RETURN; \
|
||||
popl %ecx; \
|
||||
cfi_adjust_cfa_offset (-4); \
|
||||
popl %ebx; \
|
||||
cfi_adjust_cfa_offset (-4); \
|
||||
cfi_restore (ebx); \
|
||||
movl %ecx, (%eax); \
|
||||
orl $-1, %eax; \
|
||||
jmp L(pseudo_end);
|
||||
/* A quick note: it is assumed that the call to `__errno_location' does
|
||||
not modify the stack! */
|
||||
# endif
|
||||
# else
|
||||
/* Store (- %eax) into errno through the GOT. */
|
||||
# define SYSCALL_ERROR_HANDLER \
|
||||
0:SETUP_PIC_REG(cx); \
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1999, 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1999-2001, 2003, 2004, 2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>.
|
||||
|
||||
@ -34,7 +34,7 @@ ENTRY(__syscall_error)
|
||||
;;
|
||||
st4 [r2]=r8
|
||||
mov r8=-1
|
||||
#elif USE___THREAD
|
||||
#else
|
||||
# ifndef NOT_IN_libc
|
||||
# define SYSCALL_ERROR_ERRNO __libc_errno
|
||||
# else
|
||||
@ -46,37 +46,7 @@ ENTRY(__syscall_error)
|
||||
mov r8=-1
|
||||
add r2=r2,r13;;
|
||||
st4 [r2]=r3
|
||||
#elif defined _LIBC_REENTRANT
|
||||
.prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(0)
|
||||
alloc r33=ar.pfs, 0, 4, 0, 0
|
||||
mov r32=rp
|
||||
.body
|
||||
mov r35=r8
|
||||
mov r34=r1
|
||||
;;
|
||||
br.call.sptk.many b0 = __errno_location
|
||||
.Lret0: /* force new bundle */
|
||||
st4 [r8]=r35
|
||||
mov r1=r34
|
||||
mov rp=r32
|
||||
mov r8=-1
|
||||
mov ar.pfs=r33
|
||||
#else /* _LIBC_REENTRANT */
|
||||
/*
|
||||
* Note that the gp has to be set properly for this to work.
|
||||
* As long as all syscalls are in the same load unit
|
||||
* (executable or shared library) as this routine, we should
|
||||
* be fine. Otherwise, we would have to first load the global
|
||||
* pointer register from __gp.
|
||||
*/
|
||||
addl r2=@ltoff(errno),gp
|
||||
;;
|
||||
ld8 r2=[r2]
|
||||
mov r3=r8
|
||||
mov r8=-1
|
||||
;;
|
||||
st4 [r2]=r3
|
||||
#endif /* _LIBC_REENTRANT */
|
||||
#endif
|
||||
ret // ret is #define'd in syscall.h!
|
||||
END(__syscall_error)
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2000, 2001, 2002, 2003, 2004, 2011 Free Software Foundation, Inc.
|
||||
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
@ -32,7 +32,6 @@
|
||||
.text
|
||||
ENTRY(__syscall_error)
|
||||
#ifndef PIC
|
||||
# if USE___THREAD
|
||||
# ifndef NOT_IN_libc
|
||||
# define SYSCALL_ERROR_ERRNO __libc_errno
|
||||
# else
|
||||
@ -46,34 +45,6 @@ ENTRY(__syscall_error)
|
||||
lhi %r2,-1
|
||||
br %r14
|
||||
1: .long SYSCALL_ERROR_ERRNO@ntpoff
|
||||
# elif !defined _LIBC_REENTRANT
|
||||
basr %r1,0
|
||||
0: l %r1,1f-0b(%r1)
|
||||
lcr %r2,%r2
|
||||
st %r2,0(%r1)
|
||||
lhi %r2,-1
|
||||
br %r14
|
||||
1: .long errno
|
||||
# else
|
||||
stm %r13,%r15,52(%r15)
|
||||
cfi_offset (%r15, -36)
|
||||
cfi_offset (%r14, -40)
|
||||
cfi_offset (%r13, -44)
|
||||
lr %r0,%r15
|
||||
ahi %r15,-96
|
||||
cfi_adjust_cfa_offset (96)
|
||||
lcr %r13,%r2
|
||||
st %r0,0(%r15)
|
||||
basr %r1,0
|
||||
0: l %r1,1f-0b(%r1)
|
||||
basr %r14,%r1
|
||||
st %r13,0(%r2)
|
||||
lm %r13,%r15,148(%r15)
|
||||
cfi_adjust_cfa_offset (-96)
|
||||
lhi %r2,-1
|
||||
br %r14
|
||||
1: .long __errno_location
|
||||
#endif
|
||||
#else
|
||||
# if RTLD_PRIVATE_ERRNO
|
||||
basr %r1,0
|
||||
@ -83,7 +54,7 @@ ENTRY(__syscall_error)
|
||||
lhi %r2,-1
|
||||
br %r14
|
||||
1: .long rtld_errno - 0b
|
||||
# elif USE___THREAD
|
||||
# else
|
||||
# ifndef NOT_IN_libc
|
||||
# define SYSCALL_ERROR_ERRNO __libc_errno
|
||||
# else
|
||||
@ -98,39 +69,6 @@ ENTRY(__syscall_error)
|
||||
lhi %r2,-1
|
||||
br %r14
|
||||
1: .long _GLOBAL_OFFSET_TABLE_-0b
|
||||
# elif !defined _LIBC_REENTRANT
|
||||
basr %r1,0
|
||||
0: al %r1,1f-0b(%r1)
|
||||
l %r1,errno@GOT(%r1)
|
||||
lcr %r2,%r2
|
||||
st %r2,0(0,%r1)
|
||||
lhi %r2,-1
|
||||
br %r14
|
||||
1: .long _GLOBAL_OFFSET_TABLE_-0b
|
||||
# else
|
||||
stm %r11,%r15,44(%r15)
|
||||
cfi_offset (%r15, -36)
|
||||
cfi_offset (%r14, -40)
|
||||
cfi_offset (%r13, -44)
|
||||
cfi_offset (%r12, -48)
|
||||
cfi_offset (%r11, -52)
|
||||
lr %r0,%r15
|
||||
ahi %r15,-96
|
||||
cfi_adjust_cfa_offset (96)
|
||||
lcr %r11,%r2
|
||||
st %r0,0(%r15)
|
||||
basr %r13,0
|
||||
0: l %r12,1f-0b(%r13)
|
||||
l %r1,2f-0b(%r13)
|
||||
la %r12,0(%r12,%r13)
|
||||
bas %r14,0(%r1,%r13)
|
||||
st %r11,0(%r2)
|
||||
lm %r11,%r15,140(%r15)
|
||||
cfi_adjust_cfa_offset (-96)
|
||||
lhi %r2,-1
|
||||
br %r14
|
||||
1: .long _GLOBAL_OFFSET_TABLE_-0b
|
||||
2: .long __errno_location@PLT-0b
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008
|
||||
/* Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2011
|
||||
Free Software Foundation, Inc.
|
||||
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
|
||||
This file is part of the GNU C Library.
|
||||
@ -107,7 +107,6 @@
|
||||
br %r14; \
|
||||
2: .long rtld_errno-1b
|
||||
# elif defined _LIBC_REENTRANT
|
||||
# if USE___THREAD
|
||||
# ifndef NOT_IN_libc
|
||||
# define SYSCALL_ERROR_ERRNO __libc_errno
|
||||
# else
|
||||
@ -128,14 +127,6 @@
|
||||
# define SYSCALL_ERROR_LABEL 0f
|
||||
# define SYSCALL_ERROR_HANDLER \
|
||||
0: basr %r1,0; \
|
||||
1: al %r1,2f-1b(%r1); \
|
||||
br %r1; \
|
||||
2: .long syscall_error@plt-1b
|
||||
# endif
|
||||
# else
|
||||
# define SYSCALL_ERROR_LABEL 0f
|
||||
# define SYSCALL_ERROR_HANDLER \
|
||||
0: basr %r1,0; \
|
||||
1: al %r1,2f-1b(%r1); \
|
||||
l %r1,errno@GOT(%r1); \
|
||||
lcr %r2,%r2; \
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2001, 2002, 2003, 2004, 2011 Free Software Foundation, Inc.
|
||||
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
@ -33,7 +33,6 @@
|
||||
.text
|
||||
ENTRY(__syscall_error)
|
||||
#ifndef PIC
|
||||
# if USE___THREAD
|
||||
# ifndef NOT_IN_libc
|
||||
# define SYSCALL_ERROR_ERRNO __libc_errno
|
||||
# else
|
||||
@ -49,29 +48,6 @@ ENTRY(__syscall_error)
|
||||
lghi %r2,-1
|
||||
br %r14
|
||||
1: .quad SYSCALL_ERROR_ERRNO@ntpoff
|
||||
# elif !defined _LIBC_REENTRANT
|
||||
larl %r1,errno
|
||||
lcr %r2,%r2
|
||||
st %r2,0(%r1)
|
||||
lghi %r2,-1
|
||||
br %r14
|
||||
# else
|
||||
stmg %r13,%r15,104(%r15)
|
||||
cfi_offset (%r15,-40)
|
||||
cfi_offset (%r14,-48)
|
||||
cfi_offset (%r13,-56)
|
||||
lgr %r0,%r15
|
||||
aghi %r15,-160
|
||||
cfi_adjust_cfa_offset (160)
|
||||
lcr %r13,%r2
|
||||
stg %r0,0(%r15)
|
||||
brasl %r14,__errno_location
|
||||
st %r13,0(%r2)
|
||||
lmg %r13,%r15,264(%r15)
|
||||
cfi_adjust_cfa_offset (-160)
|
||||
lghi %r2,-1
|
||||
br %r14
|
||||
#endif
|
||||
#else
|
||||
# if RTLD_PRIVATE_ERRNO
|
||||
larl %r1,rtld_errno
|
||||
@ -79,7 +55,7 @@ ENTRY(__syscall_error)
|
||||
st %r2,0(%r1)
|
||||
lghi %r2,-1
|
||||
br %r14
|
||||
# elif USE___THREAD
|
||||
# else
|
||||
# ifndef NOT_IN_libc
|
||||
# define SYSCALL_ERROR_ERRNO __libc_errno
|
||||
# else
|
||||
@ -94,29 +70,6 @@ ENTRY(__syscall_error)
|
||||
st %r2,0(%r1,%r3)
|
||||
lghi %r2,-1
|
||||
br %r14
|
||||
# elif !defined _LIBC_REENTRANT
|
||||
larl %r1,_GLOBAL_OFFSET_TABLE_
|
||||
lg %r1,errno@GOT(%r1)
|
||||
lcr %r2,%r2
|
||||
st %r2,0(%r1)
|
||||
lghi %r2,-1
|
||||
br %r14
|
||||
# else
|
||||
stmg %r13,%r15,104(%r15)
|
||||
cfi_offset (%r15,-40)
|
||||
cfi_offset (%r14,-48)
|
||||
cfi_offset (%r13,-56)
|
||||
lgr %r0,%r15
|
||||
aghi %r15,-160
|
||||
cfi_adjust_cfa_offset (160)
|
||||
lcr %r13,%r2
|
||||
stg %r0,0(%r15)
|
||||
brasl %r14,__errno_location@PLT
|
||||
st %r13,0(%r2)
|
||||
lmg %r13,%r15,264(%r15)
|
||||
cfi_adjust_cfa_offset (-160)
|
||||
lghi %r2,-1
|
||||
br %r14
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Assembler macros for 64 bit S/390.
|
||||
Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2008
|
||||
Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2011
|
||||
Free Software Foundation, Inc.
|
||||
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
|
||||
This file is part of the GNU C Library.
|
||||
@ -115,7 +115,6 @@
|
||||
lghi %r2,-1; \
|
||||
br %r14
|
||||
# elif defined _LIBC_REENTRANT
|
||||
# if USE___THREAD
|
||||
# ifndef NOT_IN_libc
|
||||
# define SYSCALL_ERROR_ERRNO __libc_errno
|
||||
# else
|
||||
@ -133,10 +132,6 @@
|
||||
lghi %r2,-1; \
|
||||
br %r14
|
||||
# else
|
||||
# define SYSCALL_ERROR_LABEL syscall_error@plt
|
||||
# define SYSCALL_ERROR_HANDLER
|
||||
# endif
|
||||
# else
|
||||
# define SYSCALL_ERROR_LABEL 0f
|
||||
# define SYSCALL_ERROR_HANDLER \
|
||||
0: larl %r1,_GLOBAL_OFFSET_TABLE_; \
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Copyright (C) 1992,1993,1995,1996,1997,1998,1999,2000,2002,2003,2004,
|
||||
2005,2006,2009 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1992,1993,1995-2000,2002-2006,2009,2011
|
||||
Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>, August 1995.
|
||||
Changed by Kaz Kojima, <kkojima@rr.iij4u.or.jp>.
|
||||
@ -114,7 +114,6 @@
|
||||
|
||||
# elif defined _LIBC_REENTRANT
|
||||
|
||||
# if USE___THREAD
|
||||
# ifndef NOT_IN_libc
|
||||
# define SYSCALL_ERROR_ERRNO __libc_errno
|
||||
# else
|
||||
@ -138,43 +137,6 @@
|
||||
0: .long _GLOBAL_OFFSET_TABLE_; \
|
||||
1: .long SYSCALL_ERROR_ERRNO@GOTTPOFF
|
||||
# else
|
||||
# define SYSCALL_ERROR_HANDLER \
|
||||
neg r0,r1; \
|
||||
mov.l r14,@-r15; \
|
||||
cfi_adjust_cfa_offset (4); \
|
||||
cfi_rel_offset (r14, 0); \
|
||||
mov.l r12,@-r15; \
|
||||
cfi_adjust_cfa_offset (4); \
|
||||
cfi_rel_offset (r12, 0); \
|
||||
mov.l r1,@-r15; \
|
||||
cfi_adjust_cfa_offset (4); \
|
||||
cfi_rel_offset (r1, 0); \
|
||||
mov.l 0f,r12; \
|
||||
mova 0f,r0; \
|
||||
add r0,r12; \
|
||||
sts.l pr,@-r15; \
|
||||
cfi_adjust_cfa_offset (4); \
|
||||
cfi_rel_offset (pr, 0); \
|
||||
mov r15,r14; \
|
||||
cfi_def_cfa_register (r14); \
|
||||
mov.l 1f,r1; \
|
||||
bsrf r1; \
|
||||
nop; \
|
||||
2: mov r14,r15; \
|
||||
lds.l @r15+,pr; \
|
||||
mov.l @r15+,r1; \
|
||||
mov.l r1,@r0; \
|
||||
mov.l @r15+,r12; \
|
||||
mov.l @r15+,r14; \
|
||||
bra .Lpseudo_end; \
|
||||
mov _IMM1,r0; \
|
||||
.align 2; \
|
||||
0: .long _GLOBAL_OFFSET_TABLE_; \
|
||||
1: .long PLTJMP(C_SYMBOL_NAME(__errno_location))-(2b-.)
|
||||
/* A quick note: it is assumed that the call to `__errno_location' does
|
||||
not modify the stack! */
|
||||
# endif
|
||||
# else
|
||||
/* Store (-r0) into errno through the GOT. */
|
||||
# define SYSCALL_ERROR_HANDLER \
|
||||
neg r0,r1; \
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1997, 2002, 2003, 2004, 2006, 2008
|
||||
/* Copyright (C) 1997, 2002, 2003, 2004, 2006, 2008, 2011
|
||||
Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Miguel de Icaza <miguel@gnu.ai.mit.edu>, January 1997.
|
||||
@ -99,7 +99,6 @@ ENTRY(name); \
|
||||
mov -1, %o0;
|
||||
# elif defined _LIBC_REENTRANT
|
||||
|
||||
# if USE___THREAD
|
||||
# ifndef NOT_IN_libc
|
||||
# define SYSCALL_ERROR_ERRNO __libc_errno
|
||||
# else
|
||||
@ -115,18 +114,6 @@ ENTRY(name); \
|
||||
mov -1, %o0;
|
||||
# else
|
||||
# define SYSCALL_ERROR_HANDLER \
|
||||
0: save %sp, -96, %sp; \
|
||||
cfi_def_cfa_register(%fp); \
|
||||
cfi_window_save; \
|
||||
cfi_register (%o7, %i7); \
|
||||
call __errno_location; \
|
||||
nop; \
|
||||
st %i0, [%o0]; \
|
||||
jmp %i7 + 8; \
|
||||
restore %g0, -1, %o0;
|
||||
# endif
|
||||
# else
|
||||
# define SYSCALL_ERROR_HANDLER \
|
||||
0: SETUP_PIC_REG(o2,g1) \
|
||||
sethi %hi(errno), %g1; \
|
||||
or %g1, %lo(errno), %g1; \
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1997, 2000, 2002, 2003, 2004, 2006, 2008
|
||||
/* Copyright (C) 1997, 2000, 2002, 2003, 2004, 2006, 2008, 2011
|
||||
Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Richard Henderson <richard@gnu.ai.mit.edu>, 1997.
|
||||
@ -106,7 +106,6 @@ ENTRY(name); \
|
||||
mov -1, %o0;
|
||||
# elif defined _LIBC_REENTRANT
|
||||
|
||||
# if USE___THREAD
|
||||
# ifndef NOT_IN_libc
|
||||
# define SYSCALL_ERROR_ERRNO __libc_errno
|
||||
# else
|
||||
@ -122,18 +121,6 @@ ENTRY(name); \
|
||||
mov -1, %o0;
|
||||
# else
|
||||
# define SYSCALL_ERROR_HANDLER \
|
||||
0: save %sp, -176, %sp; \
|
||||
cfi_def_cfa_register(%fp); \
|
||||
cfi_window_save; \
|
||||
cfi_register (%o7, %i7); \
|
||||
call __errno_location; \
|
||||
nop; \
|
||||
st %i0, [%o0]; \
|
||||
jmp %i7 + 8; \
|
||||
restore %g0, -1, %o0;
|
||||
# endif
|
||||
# else
|
||||
# define SYSCALL_ERROR_HANDLER \
|
||||
0: SETUP_PIC_REG(o2,g1) \
|
||||
sethi %hi(errno), %g1; \
|
||||
or %g1, %lo(errno), %g1; \
|
||||
|
@ -124,7 +124,7 @@
|
||||
movl %edx, (%rcx); \
|
||||
orq $-1, %rax; \
|
||||
jmp L(pseudo_end);
|
||||
# elif USE___THREAD
|
||||
# else
|
||||
# ifndef NOT_IN_libc
|
||||
# define SYSCALL_ERROR_ERRNO __libc_errno
|
||||
# else
|
||||
@ -138,34 +138,6 @@
|
||||
movl %edx, %fs:(%rcx); \
|
||||
orq $-1, %rax; \
|
||||
jmp L(pseudo_end);
|
||||
# elif defined _LIBC_REENTRANT
|
||||
/* Store (- %rax) into errno through the GOT.
|
||||
Note that errno occupies only 4 bytes. */
|
||||
# define SYSCALL_ERROR_HANDLER \
|
||||
0: \
|
||||
xorl %edx, %edx; \
|
||||
subq %rax, %rdx; \
|
||||
pushq %rdx; \
|
||||
cfi_adjust_cfa_offset(8); \
|
||||
PUSH_ERRNO_LOCATION_RETURN; \
|
||||
call BP_SYM (__errno_location)@PLT; \
|
||||
POP_ERRNO_LOCATION_RETURN; \
|
||||
popq %rdx; \
|
||||
cfi_adjust_cfa_offset(-8); \
|
||||
movl %edx, (%rax); \
|
||||
orq $-1, %rax; \
|
||||
jmp L(pseudo_end);
|
||||
|
||||
/* A quick note: it is assumed that the call to `__errno_location' does
|
||||
not modify the stack! */
|
||||
# else /* Not _LIBC_REENTRANT. */
|
||||
# define SYSCALL_ERROR_HANDLER \
|
||||
0:movq errno@GOTPCREL(%RIP), %rcx; \
|
||||
xorl %edx, %edx; \
|
||||
subq %rax, %rdx; \
|
||||
movl %edx, (%rcx); \
|
||||
orq $-1, %rax; \
|
||||
jmp L(pseudo_end);
|
||||
# endif /* PIC */
|
||||
|
||||
/* The Linux/x86-64 kernel expects the system call parameters in
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2001, 2002, 2004, 2005 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2001, 2002, 2004, 2005, 2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -45,43 +45,11 @@ syscall_error:
|
||||
movl $EAGAIN, %eax /* Yes; translate it to EAGAIN. */
|
||||
notb:
|
||||
#endif
|
||||
#if USE___THREAD
|
||||
#ifdef PIC
|
||||
movq C_SYMBOL_NAME(errno@GOTTPOFF)(%rip), %rcx
|
||||
movl %eax, %fs:0(%rcx)
|
||||
#else
|
||||
movl %eax, %fs:C_SYMBOL_NAME(errno@TPOFF)
|
||||
# endif
|
||||
#elif !defined PIC
|
||||
# ifndef _LIBC_REENTRANT
|
||||
movl %eax, C_SYMBOL_NAME(errno)
|
||||
# else
|
||||
pushq %rax
|
||||
cfi_adjust_cfa_offset(8)
|
||||
PUSH_ERRNO_LOCATION_RETURN
|
||||
call BP_SYM (__errno_location)
|
||||
POP_ERRNO_LOCATION_RETURN
|
||||
popq %rcx
|
||||
cfi_adjust_cfa_offset(-8)
|
||||
movl %ecx, (%rax)
|
||||
# endif
|
||||
#else
|
||||
# if RTLD_PRIVATE_ERRNO
|
||||
leaq rtld_errno(%rip), %rcx
|
||||
movl %eax, (%rcx)
|
||||
# elif !defined _LIBC_REENTRANT
|
||||
movq C_SYMBOL_NAME(errno)@GOTPCREL(%rip), %rcx
|
||||
movl %eax, (%rcx)
|
||||
# else
|
||||
pushq %rax
|
||||
cfi_adjust_cfa_offset(8)
|
||||
PUSH_ERRNO_LOCATION_RETURN
|
||||
call C_SYMBOL_NAME (BP_SYM (__errno_location)@PLT)
|
||||
POP_ERRNO_LOCATION_RETURN
|
||||
popq %rcx
|
||||
cfi_adjust_cfa_offset(-8)
|
||||
movl %ecx, (%rax)
|
||||
# endif
|
||||
#endif
|
||||
movq $-1, %rax
|
||||
ret
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Machine-dependent ELF dynamic relocation inline functions. x86-64 version.
|
||||
Copyright (C) 2001-2006, 2008, 2009, 2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 2001-2006, 2008-2010, 2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Andreas Jaeger <aj@suse.de>.
|
||||
|
||||
@ -195,7 +195,6 @@ _dl_start_user:\n\
|
||||
define the value.
|
||||
ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one
|
||||
of the main executable's symbols, as for a COPY reloc. */
|
||||
#if !defined RTLD_BOOTSTRAP || USE___THREAD
|
||||
#define elf_machine_type_class(type) \
|
||||
((((type) == R_X86_64_JUMP_SLOT \
|
||||
|| (type) == R_X86_64_DTPMOD64 \
|
||||
@ -204,11 +203,6 @@ _dl_start_user:\n\
|
||||
|| (type) == R_X86_64_TLSDESC) \
|
||||
* ELF_RTYPE_CLASS_PLT) \
|
||||
| (((type) == R_X86_64_COPY) * ELF_RTYPE_CLASS_COPY))
|
||||
#else
|
||||
# define elf_machine_type_class(type) \
|
||||
((((type) == R_X86_64_JUMP_SLOT) * ELF_RTYPE_CLASS_PLT) \
|
||||
| (((type) == R_X86_64_COPY) * ELF_RTYPE_CLASS_COPY))
|
||||
#endif
|
||||
|
||||
/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */
|
||||
#define ELF_MACHINE_JMP_SLOT R_X86_64_JUMP_SLOT
|
||||
@ -302,10 +296,6 @@ elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc,
|
||||
&& __builtin_expect (sym->st_shndx != SHN_UNDEF, 1))
|
||||
value = ((Elf64_Addr (*) (void)) value) ();
|
||||
|
||||
# if defined RTLD_BOOTSTRAP && !USE___THREAD
|
||||
assert (r_type == R_X86_64_GLOB_DAT || r_type == R_X86_64_JUMP_SLOT);
|
||||
*reloc_addr = value + reloc->r_addend;
|
||||
# else
|
||||
switch (r_type)
|
||||
{
|
||||
case R_X86_64_GLOB_DAT:
|
||||
@ -453,7 +443,6 @@ elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc,
|
||||
break;
|
||||
# endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,8 +2,4 @@
|
||||
|
||||
#include <tls.h>
|
||||
|
||||
#if USE___THREAD
|
||||
@@@ use-thread = yes @@@
|
||||
#else
|
||||
@@@ use-thread = no @@@
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user