diff options
| author | Joseph Myers <joseph@codesourcery.com> | 2012-02-03 23:22:53 +0000 |
|---|---|---|
| committer | Joseph Myers <joseph@codesourcery.com> | 2012-02-03 23:22:53 +0000 |
| commit | 9a1d92541ff2e864aab682d66fba7ea2555ef13b (patch) | |
| tree | a5b3b673f66207a42c5f53618a328d934b08d8fc | |
| parent | 65dc3b75044cc4847e8c523c22daec12fa51702f (diff) | |
| download | glibc-9a1d92541ff2e864aab682d66fba7ea2555ef13b.tar.xz glibc-9a1d92541ff2e864aab682d66fba7ea2555ef13b.zip | |
Consistently use macros for x86 PIC thunks.
50 files changed, 177 insertions, 490 deletions
@@ -1,5 +1,52 @@ 2012-02-03 Joseph Myers <joseph@codesourcery.com> + * sysdeps/i386/sysdep.h (SETUP_PIC_REG, LOAD_PIC_REG): Define also + for non-PIC compilation. + (SETUP_PIC_REG): Add .p2align directive. + * sysdeps/i386/i686/memcmp.S: Use macros for PIC register setup. + * sysdeps/i386/i686/multiarch/bcopy.S: Likewise. + * sysdeps/i386/i686/multiarch/bzero.S: Likewise. + * sysdeps/i386/i686/multiarch/memchr.S: Likewise. + * sysdeps/i386/i686/multiarch/memcmp-sse4.S: Likewise. + * sysdeps/i386/i686/multiarch/memcmp.S: Likewise. + * sysdeps/i386/i686/multiarch/memcpy-ssse3-rep.S: Likewise. + * sysdeps/i386/i686/multiarch/memcpy-ssse3.S: Likewise. + * sysdeps/i386/i686/multiarch/memcpy.S: Likewise. + * sysdeps/i386/i686/multiarch/memcpy_chk.S: Likewise. + * sysdeps/i386/i686/multiarch/memmove.S: Likewise. + * sysdeps/i386/i686/multiarch/memmove_chk.S: Likewise. + * sysdeps/i386/i686/multiarch/mempcpy.S: Likewise. + * sysdeps/i386/i686/multiarch/mempcpy_chk.S: Likewise. + * sysdeps/i386/i686/multiarch/memrchr.S: Likewise. + * sysdeps/i386/i686/multiarch/memset-sse2-rep.S: Likewise. + * sysdeps/i386/i686/multiarch/memset-sse2.S: Likewise. + * sysdeps/i386/i686/multiarch/memset.S: Likewise. + * sysdeps/i386/i686/multiarch/memset_chk.S: Likewise. + * sysdeps/i386/i686/multiarch/rawmemchr.S: Likewise. + * sysdeps/i386/i686/multiarch/strcasecmp.S: Likewise. + * sysdeps/i386/i686/multiarch/strcat-sse2.S: Likewise. + * sysdeps/i386/i686/multiarch/strcat.S: Likewise. + * sysdeps/i386/i686/multiarch/strchr.S: Likewise. + * sysdeps/i386/i686/multiarch/strcmp-sse4.S: Likewise. + * sysdeps/i386/i686/multiarch/strcmp-ssse3.S: Likewise. + * sysdeps/i386/i686/multiarch/strcmp.S: Likewise. + * sysdeps/i386/i686/multiarch/strcpy-sse2.S: Likewise. + * sysdeps/i386/i686/multiarch/strcpy.S: Likewise. + * sysdeps/i386/i686/multiarch/strcspn.S: Likewise. + * sysdeps/i386/i686/multiarch/strlen.S: Likewise. + * sysdeps/i386/i686/multiarch/strncase.S: Likewise. + * sysdeps/i386/i686/multiarch/strnlen.S: Likewise. + * sysdeps/i386/i686/multiarch/strrchr.S: Likewise. + * sysdeps/i386/i686/multiarch/strspn.S: Likewise. + * sysdeps/i386/i686/multiarch/wcschr.S: Likewise. + * sysdeps/i386/i686/multiarch/wcscmp.S: Likewise. + * sysdeps/i386/i686/multiarch/wcscpy.S: Likewise. + * sysdeps/i386/i686/multiarch/wcslen.S: Likewise. + * sysdeps/i386/i686/multiarch/wcsrchr.S: Likewise. + * sysdeps/i386/i686/multiarch/wmemcmp.S: Likewise. + +2012-02-03 Joseph Myers <joseph@codesourcery.com> + * math/tst-CMPLX.c: Include <stdio.h>. 2012-01-31 Joseph Myers <joseph@codesourcery.com> diff --git a/nptl/ChangeLog b/nptl/ChangeLog index 0b7c5e7e78..1470566fb7 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,3 +1,13 @@ +2012-02-03 Joseph Myers <joseph@codesourcery.com> + + * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use + macros for PIC register setup. + * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise. + * 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/i386/pthread_once.S: Likewise. + 2012-01-11 Marek Polacek <polacek@redhat.com> * forward.c (FORWARD_NORETURN): Define macro. diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S index 54590b7b8b..8a84759dc4 100644 --- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S +++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S @@ -1,4 +1,5 @@ -/* Copyright (C) 2002-2004,2006-2007,2009,2010 Free Software Foundation, Inc. +/* Copyright (C) 2002-2004,2006-2007,2009,2010,2012 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -649,17 +650,6 @@ __condvar_w_cleanup: .uleb128 0 .Lcstend: -#ifdef PIC - .section .gnu.linkonce.t.__i686.get_pc_thunk.cx,"ax",@progbits - .globl __i686.get_pc_thunk.cx - .hidden __i686.get_pc_thunk.cx - .type __i686.get_pc_thunk.cx,@function -__i686.get_pc_thunk.cx: - movl (%esp), %ecx; - ret - .size __i686.get_pc_thunk.cx,.-__i686.get_pc_thunk.cx -#endif - #ifdef SHARED .hidden DW.ref.__gcc_personality_v0 .weak DW.ref.__gcc_personality_v0 diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_post.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_post.S index 9f3e63520f..624a474a4d 100644 --- a/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_post.S +++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_post.S @@ -1,4 +1,5 @@ -/* Copyright (C) 2002,2003,2005,2007,2008,2011 Free Software Foundation, Inc. +/* Copyright (C) 2002,2003,2005,2007,2008,2011-2012 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -75,7 +76,7 @@ __new_sem_post: cfi_offset(%ebx, -8) 1: #ifdef PIC - call __i686.get_pc_thunk.bx + SETUP_PIC_REG(bx) #else movl $4f, %ebx 4: @@ -96,7 +97,7 @@ __new_sem_post: 3: #ifdef PIC - call __i686.get_pc_thunk.bx + SETUP_PIC_REG(bx) #else movl $5f, %ebx 5: @@ -149,15 +150,3 @@ __old_sem_post: .size __old_sem_post,.-__old_sem_post compat_symbol(libpthread, __old_sem_post, sem_post, GLIBC_2_0) #endif - - -#ifdef PIC - .section .gnu.linkonce.t.__i686.get_pc_thunk.bx,"ax",@progbits - .globl __i686.get_pc_thunk.bx - .hidden __i686.get_pc_thunk.bx - .type __i686.get_pc_thunk.bx,@function -__i686.get_pc_thunk.bx: - movl (%esp), %ebx; - ret - .size __i686.get_pc_thunk.bx,.-__i686.get_pc_thunk.bx -#endif diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S index ee46ab9363..1192fd74d0 100644 --- a/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S +++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2005, 2007, 2009, 2011 Free Software Foundation, Inc. +/* Copyright (C) 2002-2005, 2007, 2009, 2011-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -148,7 +148,7 @@ sem_timedwait: 3: negl %esi 6: #ifdef PIC - call __i686.get_pc_thunk.bx + SETUP_PIC_REG(bx) #else movl $4f, %ebx 4: diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S index 18adb9a092..a9d19ebbd3 100644 --- a/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S +++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2005, 2007, 2011 Free Software Foundation, Inc. +/* Copyright (C) 2002-2003, 2005, 2007, 2011-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -43,7 +43,7 @@ __new_sem_trywait: 1: #ifdef PIC - call __i686.get_pc_thunk.cx + SETUP_PIC_REG(cx) #else movl $3f, %ecx 3: @@ -66,15 +66,3 @@ __new_sem_trywait: __old_sem_trywait = __new_sem_trywait compat_symbol(libpthread, __old_sem_trywait, sem_trywait, GLIBC_2_0) #endif - - -#ifdef PIC - .section .gnu.linkonce.t.__i686.get_pc_thunk.cx,"ax",@progbits - .globl __i686.get_pc_thunk.cx - .hidden __i686.get_pc_thunk.cx - .type __i686.get_pc_thunk.cx,@function -__i686.get_pc_thunk.cx: - movl (%esp), %ecx; - ret - .size __i686.get_pc_thunk.cx,.-__i686.get_pc_thunk.cx -#endif diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_wait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_wait.S index fb8a398430..3d9ee743f3 100644 --- a/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_wait.S +++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_wait.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2005, 2007, 2011 Free Software Foundation, Inc. +/* Copyright (C) 2002-2003, 2005, 2007, 2011-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -108,7 +108,7 @@ __new_sem_wait: negl %esi #ifdef PIC - call __i686.get_pc_thunk.bx + SETUP_PIC_REG(bx) #else movl $8f, %ebx 8: @@ -322,7 +322,7 @@ __old_sem_wait: je 3b negl %esi #ifdef PIC - call __i686.get_pc_thunk.bx + SETUP_PIC_REG(bx) #else movl $4f, %ebx 4: diff --git a/nptl/sysdeps/unix/sysv/linux/i386/pthread_once.S b/nptl/sysdeps/unix/sysv/linux/i386/pthread_once.S index f31d968bc5..158633d4bb 100644 --- a/nptl/sysdeps/unix/sysv/linux/i386/pthread_once.S +++ b/nptl/sysdeps/unix/sysv/linux/i386/pthread_once.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2007 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2007, 2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -52,8 +52,7 @@ __pthread_once: Get the fork generation counter now. */ 6: movl (%ebx), %eax #ifdef PIC - call __i686.get_pc_thunk.cx - addl $_GLOBAL_OFFSET_TABLE_, %ecx + LOAD_PIC_REG(cx) #endif 5: movl %eax, %edx @@ -181,15 +180,3 @@ __pthread_once_internal = __pthread_once .globl pthread_once pthread_once = __pthread_once - - -#ifdef PIC - .section .gnu.linkonce.t.__i686.get_pc_thunk.cx,"ax",@progbits - .globl __i686.get_pc_thunk.cx - .hidden __i686.get_pc_thunk.cx - .type __i686.get_pc_thunk.cx,@function -__i686.get_pc_thunk.cx: - movl (%esp), %ecx; - ret - .size __i686.get_pc_thunk.cx,.-__i686.get_pc_thunk.cx -#endif diff --git a/sysdeps/i386/i686/memcmp.S b/sysdeps/i386/i686/memcmp.S index 24f6804b0c..4b87cec726 100644 --- a/sysdeps/i386/i686/memcmp.S +++ b/sysdeps/i386/i686/memcmp.S @@ -1,5 +1,5 @@ /* Compare two memory blocks for differences in the first COUNT bytes. - Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. + Copyright (C) 2004, 2005, 2006, 2012 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 @@ -36,22 +36,13 @@ into the jump table. */ #define LOAD_JU |
