diff options
Diffstat (limited to 'libc/sysdeps/linux/i386')
-rw-r--r-- | libc/sysdeps/linux/i386/Makefile | 11 | ||||
-rw-r--r-- | libc/sysdeps/linux/i386/bits/machine-gmon.h | 41 | ||||
-rw-r--r-- | libc/sysdeps/linux/i386/crt0.S | 6 | ||||
-rw-r--r-- | libc/sysdeps/linux/i386/mcount.S | 54 |
4 files changed, 2 insertions, 110 deletions
diff --git a/libc/sysdeps/linux/i386/Makefile b/libc/sysdeps/linux/i386/Makefile index c7f88b681..9b2a36290 100644 --- a/libc/sysdeps/linux/i386/Makefile +++ b/libc/sysdeps/linux/i386/Makefile @@ -21,7 +21,7 @@ include $(TOPDIR)Rules.mak ASFLAGS=$(CFLAGS) CRT0_SRC = crt0.S -CRT0_OBJ = crt0.o crt1.o gcrt1.o +CRT0_OBJ = crt0.o crt1.o ifeq ($(strip $(UCLIBC_PIE_SUPPORT)),y) CRT0_OBJ += Scrt0.o Scrt1.o endif @@ -30,9 +30,6 @@ CTOR_TARGETS=$(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o SSRC=__longjmp.S vfork.S clone.S setjmp.S bsd-setjmp.S \ bsd-_setjmp.S syscall.S mmap64.S -ifeq ($(strip $(UCLIBC_PROFILING)),y) -SSRC+=mcount.S -endif SOBJS=$(patsubst %.S,%.o, $(SSRC)) CSRC=brk.c sigaction.c @@ -67,12 +64,6 @@ $(COBJS): %.o : %.c $(CC) $(CFLAGS) -c $< -o $@ $(STRIPTOOL) -x -R .note -R .comment $*.o -ifeq ($(strip $(UCLIBC_PROFILING)),y) -gmon-start.S: ../common/gmon-start.c - $(CC) $(CFLAGS) -c $< -S -o $*.S -gcrt1.o: $(CRT0_DEPS) -endif - ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y) crti.o: crti.S $(CC) $(CFLAGS) -c crti.S -o crti.o diff --git a/libc/sysdeps/linux/i386/bits/machine-gmon.h b/libc/sysdeps/linux/i386/bits/machine-gmon.h deleted file mode 100644 index 841518f06..000000000 --- a/libc/sysdeps/linux/i386/bits/machine-gmon.h +++ /dev/null @@ -1,41 +0,0 @@ -/* i386-specific implementation of profiling support. - Copyright (C) 1997, 2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include <sysdep.h> - -/* We need a special version of the `mcount' function since for ix86 it - must not clobber any register. This has several reasons: - - there is a bug in gcc as of version 2.7.2.2 which prohibits the - use of profiling together with nested functions - - the ELF `fixup' function uses GCC's regparm feature - - some (future) systems might want to pass parameters in registers. */ - -/* We must not pollute the global namespace. */ -#define mcount_internal __mcount_internal - -extern void mcount_internal (u_long frompc, u_long selfpc); - -#define _MCOUNT_DECL(frompc, selfpc) \ -void __attribute__ (( regparm (2) )) mcount_internal (u_long frompc, u_long selfpc) - - -/* Define MCOUNT as empty since we have the implementation in another - file. */ -#define MCOUNT diff --git a/libc/sysdeps/linux/i386/crt0.S b/libc/sysdeps/linux/i386/crt0.S index 213df9094..98baa257b 100644 --- a/libc/sysdeps/linux/i386/crt0.S +++ b/libc/sysdeps/linux/i386/crt0.S @@ -82,7 +82,7 @@ _start: addl $_GLOBAL_OFFSET_TABLE_+[.-.L0],%edx #endif -#if (defined L_crt1 || defined L_Scrt1 || defined L_gcrt1 ) && defined __UCLIBC_CTOR_DTOR__ +#if (defined L_crt1 || defined L_Scrt1) && defined __UCLIBC_CTOR_DTOR__ /* Push .init and .fini arguments to __uClibc_start_main() on the stack */ #ifdef L_Scrt1 pushl _fini@GOT(%edx) @@ -129,7 +129,3 @@ __data_start: .weak data_start data_start = __data_start -#if defined L_gcrt1 && defined __UCLIBC_PROFILING__ -# include "./gmon-start.S" -#endif - diff --git a/libc/sysdeps/linux/i386/mcount.S b/libc/sysdeps/linux/i386/mcount.S deleted file mode 100644 index 704a7b851..000000000 --- a/libc/sysdeps/linux/i386/mcount.S +++ /dev/null @@ -1,54 +0,0 @@ -/* i386-specific implemetation of profiling support. - Copyright (C) 1997, 2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - - -/* We need a special version of the `mcount' function since for ix86 it - must not clobber any register. This has several reasons: - - there is a bug in gcc as of version 2.7.2.2 which prohibits the - use of profiling together with nested functions - - the ELF `fixup' function uses GCC's regparm feature - - some (future) systems might want to pass parameters in registers. */ - - .globl _mcount - .type _mcount,@function; - .align 1<<4 -_mcount: - /* Save the caller-clobbered registers. */ - pushl %eax - pushl %ecx - pushl %edx - - movl 12(%esp), %edx - movl 4(%ebp), %eax - - /* No need to access the PLT or GOT, __mcount_internal is an - internal function and we can make a relative call. */ - call __mcount_internal - - /* Pop the saved registers. Please note that `mcount' has no - return value. */ - popl %edx - popl %ecx - popl %eax - ret - .size _mcount,.-_mcount; - -#undef mcount -.weak mcount ; mcount = _mcount |