mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-22 10:50:07 +00:00
Tue Feb 13 00:12:12 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* gmon/Makefile (headers): Remove machine-gmon.h. * sysdeps/stub/machine-gmon.h, sysdeps/i386/machine-gmon.h: Removed. * gmon/mcount.c [! NO_UNDERSCORES] (_mcount): Specify "mcount" as the asm name. (_mcount): Define normally, taking no args. Use __builtin_return_address to fetch PC values of caller and caller's caller. Tue Feb 13 00:12:12 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu> * gmon/Makefile (headers): Remove machine-gmon.h. * sysdeps/stub/machine-gmon.h, sysdeps/i386/machine-gmon.h: Removed. * gmon/mcount.c [! NO_UNDERSCORES] (_mcount): Specify "mcount" as the asm name. (_mcount): Define normally, taking no args. Use __builtin_return_address to fetch PC values of caller and caller's caller. * Makerules: Rewrote rules to update libc archives of all flavors. Define separate specific rules for each flavor using o-iterator. * sysdeps/unix/Makefile: Include s-proto.d only ifdef subdir. Sat Feb 10 11:35:16 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * Makerules (ar-symtab-name): New macro. Replace all occurences of __.SYMDEF by $(ar-symtab-name). * sysdeps/unix/sysv/Makefile (ar-symtab-name): Define as empty. * Makefile (configure, %/configure): Depend on aclocal.m4. * Make-dist (configure, %/configure): Likewise. * sysdeps/unix/Makefile: Include s-proto.d for its deps. * gmon/sys/gmon.h: Don't include machine-gmon.h; those defns are only needed in the implementation, not for any users. * time/northamerica: Updated from ADO 96c, new rules for Mexico in 1996.
This commit is contained in:
parent
afced61c8f
commit
dbdb6189d5
32
ChangeLog
32
ChangeLog
@ -1,5 +1,37 @@
|
||||
Tue Feb 13 00:12:12 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
|
||||
|
||||
* gmon/Makefile (headers): Remove machine-gmon.h.
|
||||
* sysdeps/stub/machine-gmon.h, sysdeps/i386/machine-gmon.h: Removed.
|
||||
* gmon/mcount.c [! NO_UNDERSCORES] (_mcount): Specify "mcount" as
|
||||
the asm name.
|
||||
(_mcount): Define normally, taking no args.
|
||||
Use __builtin_return_address to fetch PC values of caller and caller's
|
||||
caller.
|
||||
|
||||
* Makerules: Rewrote rules to update libc archives of all flavors.
|
||||
Define separate specific rules for each flavor using o-iterator.
|
||||
|
||||
* sysdeps/unix/Makefile: Include s-proto.d only ifdef subdir.
|
||||
|
||||
Sat Feb 10 11:35:16 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
|
||||
|
||||
* Makerules (ar-symtab-name): New macro. Replace all occurences
|
||||
of __.SYMDEF by $(ar-symtab-name).
|
||||
* sysdeps/unix/sysv/Makefile (ar-symtab-name): Define as empty.
|
||||
|
||||
Mon Feb 12 03:10:41 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
|
||||
|
||||
* Makefile (configure, %/configure): Depend on aclocal.m4.
|
||||
* Make-dist (configure, %/configure): Likewise.
|
||||
|
||||
* sysdeps/unix/Makefile: Include s-proto.d for its deps.
|
||||
|
||||
* gmon/sys/gmon.h: Don't include machine-gmon.h; those defns are
|
||||
only needed in the implementation, not for any users.
|
||||
|
||||
* time/northamerica: Updated from ADO 96c, new rules for Mexico in
|
||||
1996.
|
||||
|
||||
* sunrpc/pm_getport.c: #if 0 out gratuitous inclusion of <net/if.h>.
|
||||
* sunrpc/pm_getmaps.c: Likewise.
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1991, 92, 93, 94, 95, 96 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
|
||||
@ -170,8 +170,8 @@ mv -f $@.new $@
|
||||
test ! -d CVS || cvs commit -m'Regenerated: autoconf $(ACFLAGS) $<' $@
|
||||
endef
|
||||
|
||||
configure: configure.in; $(autoconf-it)
|
||||
%/configure: %/configure.in; $(autoconf-it)
|
||||
configure: configure.in aclocal.m4; $(autoconf-it)
|
||||
%/configure: %/configure.in aclocal.m4; $(autoconf-it)
|
||||
|
||||
.PHONY: dist
|
||||
dist: $(tardir).tar.gz $(tardir)-crypt.tar.gz
|
||||
|
4
Makefile
4
Makefile
@ -36,8 +36,8 @@ mv -f $@.new $@
|
||||
test ! -d CVS || cvs commit -m'Regenerated: autoconf $(ACFLAGS) $<' $@
|
||||
endef
|
||||
|
||||
configure: configure.in; $(autoconf-it)
|
||||
%/configure: %/configure.in; $(autoconf-it)
|
||||
configure: configure.in aclocal.m4; $(autoconf-it)
|
||||
%/configure: %/configure.in aclocal.m4; $(autoconf-it)
|
||||
|
||||
include Makeconfig
|
||||
|
||||
|
36
Makerules
36
Makerules
@ -65,6 +65,11 @@ endif
|
||||
# Add -I switches to get the right sysdep directories.
|
||||
# `+includes' in Makeconfig references $(+sysdep-includes).
|
||||
+sysdep-includes := $(addprefix -I,$(+sysdep_dirs))
|
||||
|
||||
# The name of the symbol table archive member. The default is suitable for
|
||||
# BSD style archives. It can be overridden in sysdep Makefiles when SYSV
|
||||
# style archive are used.
|
||||
ar-symtab-name = __.SYMDEF
|
||||
|
||||
# Include any system-specific makefiles.
|
||||
|
||||
@ -349,7 +354,7 @@ ARFLAGS := r$(verbose)
|
||||
lib: lib-noranlib $(foreach l,$(libtypes),$(patsubst %,$(common-objpfx)$l,c))
|
||||
|
||||
# Pattern rule for libraries: depend on the __.SYMDEF member updated by ranlib.
|
||||
lib%.a: lib%.a(__.SYMDEF) ;
|
||||
lib%.a: lib%.a($(ar-symtab-name)) ;
|
||||
|
||||
libobjs: $(foreach o,$(object-suffixes),\
|
||||
$(common-objpfx)$(patsubst %,$(libtype$o),c)(\
|
||||
@ -392,21 +397,18 @@ endif
|
||||
|
||||
endif
|
||||
|
||||
# Rules to update the __.SYMDEF member with ranlib.
|
||||
# To consolidate, each flavor library's __.SYMDEF member
|
||||
# depends on the imaginary intermediate file `symdef.SUFFIX',
|
||||
# where SUFFIX is that flavor's object suffix; then a pattern rule
|
||||
# "remakes" symdef.% depending on all the libc.a(foo.%) files in $(objects).
|
||||
$(common-objpfx)$(patsubst %,$(libtype.o),c)(__.SYMDEF): symdef.o
|
||||
$(common-objpfx)$(patsubst %,$(libtype.so),c)(__.SYMDEF): symdef.so
|
||||
$(common-objpfx)$(patsubst %,$(libtype.po),c)(__.SYMDEF): symdef.po
|
||||
$(common-objpfx)$(patsubst %,$(libtype.go),c)(__.SYMDEF): symdef.go
|
||||
symdef.%: $(foreach o,$(object-suffixes),\
|
||||
$(common-objpfx)$(patsubst %,$(libtype$o),c)(\
|
||||
$(patsubst $(objpfx)%.o,%.%,$(objects)))) \
|
||||
$(filter subdir_lib,$(firstword $(subdir) subdir_lib))
|
||||
# The last line above makes it also depend on subdir_lib for the parent.
|
||||
$(RANLIB) $(common-objpfx)$(patsubst %,$(libtype.$*),c)
|
||||
# Rules to update the $(ar-symtab-name) member with ranlib,
|
||||
# one for each object flavor.
|
||||
define o-iterator-doit
|
||||
$(common-objpfx)$(patsubst %,$(libtype$o),c)($(ar-symtab-name)): \
|
||||
$(common-objpfx)$(patsubst %,$(libtype$o),c)(\
|
||||
$(patsubst $(objpfx)%.o,%$o,$(objects))) \
|
||||
$(filter subdir_lib,$(firstword $(subdir) subdir_lib)); \
|
||||
$$(RANLIB) $$(common-objpfx)$$(patsubst %,$$(libtype$o),c)
|
||||
endef
|
||||
object-suffixes-left = $(object-suffixes)
|
||||
include $(o-iterator)
|
||||
|
||||
|
||||
# This makes all the object files.
|
||||
.PHONY: objects objs
|
||||
@ -613,7 +615,7 @@ check: tests
|
||||
|
||||
.PHONY: TAGS
|
||||
TAGS: distinfo $(..)MakeTAGS
|
||||
$(MAKE) $(addprefix -f ,$^)
|
||||
$(MAKE) $(addprefix -f ,$^) $@
|
||||
|
||||
.PHONY: echo-headers
|
||||
echo-headers:
|
||||
|
@ -21,7 +21,7 @@
|
||||
#
|
||||
subdir := gmon
|
||||
|
||||
headers := sys/gmon.h machine-gmon.h
|
||||
headers := sys/gmon.h
|
||||
|
||||
routines := gmon mcount profil
|
||||
|
||||
|
@ -48,14 +48,38 @@ static char sccsid[] = "@(#)mcount.c 8.1 (Berkeley) 6/4/93";
|
||||
* _mcount updates data structures that represent traversals of the
|
||||
* program's call graph edges. frompc and selfpc are the return
|
||||
* address and function address that represents the given call graph edge.
|
||||
*
|
||||
*
|
||||
* Note: the original BSD code used the same variable (frompcindex) for
|
||||
* both frompcindex and frompc. Any reasonable, modern compiler will
|
||||
* perform this optimization.
|
||||
*/
|
||||
#if 0
|
||||
_MCOUNT_DECL(frompc, selfpc) /* _mcount; may be static, inline, etc */
|
||||
register u_long frompc, selfpc;
|
||||
#endif
|
||||
|
||||
/* GCC version 2 gives us a perfect magical function to get
|
||||
just the information we need:
|
||||
void *__builtin_return_address (unsigned int N)
|
||||
returns the return address of the frame N frames up. */
|
||||
|
||||
#if __GNUC__ < 2
|
||||
#error "This file uses __builtin_return_address, a GCC 2 extension."
|
||||
#endif
|
||||
|
||||
#include <sysdep.h>
|
||||
#ifndef NO_UNDERSCORES
|
||||
/* The asm symbols for C functions are `_function'.
|
||||
The canonical name for the counter function is `mcount', no _. */
|
||||
void _mcount (void) asm ("mcount");
|
||||
#endif
|
||||
|
||||
void
|
||||
_mcount (void)
|
||||
{
|
||||
register u_long selfpc = (u_long) __builtin_return_address (0);
|
||||
register u_long frompc = (u_long) __builtin_return_address (1);
|
||||
|
||||
register u_short *frompcindex;
|
||||
register struct tostruct *top, *prevtop;
|
||||
register struct gmonparam *p;
|
||||
@ -154,7 +178,7 @@ _MCOUNT_DECL(frompc, selfpc) /* _mcount; may be static, inline, etc */
|
||||
*frompcindex = toindex;
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
done:
|
||||
#ifdef KERNEL
|
||||
@ -171,8 +195,10 @@ overflow:
|
||||
return;
|
||||
}
|
||||
|
||||
#if 0 /* Obsolete with __builtin_return_address. */
|
||||
/*
|
||||
* Actual definition of mcount function. Defined in <machine/profile.h>,
|
||||
* which is included by <sys/gmon.h>.
|
||||
*/
|
||||
MCOUNT
|
||||
#endif
|
||||
|
@ -37,7 +37,6 @@
|
||||
#define _SYS_GMON_H_
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#include <machine-gmon.h>
|
||||
|
||||
/*
|
||||
* Structure prepended to gmon.out profiling data file.
|
||||
|
@ -1,29 +0,0 @@
|
||||
/* Machine-specific calling sequence for `mcount' profiling function. i386
|
||||
Copyright (C) 1995 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
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
|
||||
#define _MCOUNT_DECL static inline void _mcount
|
||||
|
||||
/* Call _mcount with our the return PC for our caller,
|
||||
and the return PC our caller will return to. */
|
||||
#define MCOUNT \
|
||||
void mcount (u_long arg) \
|
||||
{ \
|
||||
_mcount (((u_long *) (&arg)[-2])[-1], \
|
||||
(&arg)[-1]); \
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
/* Machine-specific calling sequence for `mcount' profiling function. Stub
|
||||
Copyright (C) 1995 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
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
|
||||
#define _MCOUNT_DECL static inline void _mcount
|
||||
|
||||
/* Call _mcount with our the return PC for our caller,
|
||||
and the return PC our caller will return to. */
|
||||
#define MCOUNT \
|
||||
void mcount (u_long arg) \
|
||||
{ \
|
||||
_mcount (caller return PC, my return PC); \
|
||||
}
|
||||
|
||||
#error "sysdeps/MACHINE/machine-gmon.h missing"
|
@ -292,4 +292,12 @@ $(objpfx)sysd-syscalls: $(..)sysdeps/unix/make-syscalls.sh \
|
||||
done > $@T
|
||||
mv -f $@T $@
|
||||
|
||||
# This syscall objects depend on s-proto.d, which is generated to
|
||||
# specify dependencies generated syscalls with have on headers.
|
||||
ifdef subdir
|
||||
# These deps use file names relative to a subdir, so don't
|
||||
# include them in the parent directory.
|
||||
-include $(objpfx)s-proto.d
|
||||
endif
|
||||
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user