1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-12-24 17:51:17 +03:00

* elf/dl-reloc.c [PROF] (_dl_relocate_object): Define

consider_profiling always to zero.  Don't count of compiler to
	remove unreached if block.
	* sysdeps/x86_64/dl-trampoline.S [PROF] (_dl_runtime_profile):
	Don't compile.
	* sysdeps/i386/dl-trampoline.S [PROF] (_dl_runtime_profile): Likewise.
	* sysdeps/ia64/dl-trampoline.S [PROF] (_dl_runtime_profile): Likewise.
	* sysdeps/s390/s390-64/dl-trampoline.S [PROF] (_dl_runtime_profile):
	Likewise.
	* sysdeps/s390/s390-32/dl-trampoline.S [PROF] (_dl_runtime_profile):
	Likewise.
	* sysdeps/powerpc/powerpc64/dl-trampoline.S [PROF]
	(_dl_profile_resolve): Likewise.
	* sysdeps/powerpc/powerpc32/dl-trampoline.S [PROF]
	(_dl_profile_resolve): Likewise.
	* gmon/Makefile: Add rules to build and run tst-profile-static.
	* gmon/tst-profile-static.c: New file.
	* Makeconfig (+link-static): Allow passing program-specific flags.
This commit is contained in:
Ulrich Drepper
2005-07-07 02:39:45 +00:00
parent 016c70ea61
commit 9f0d7b6df9
12 changed files with 84 additions and 29 deletions

View File

@@ -1,4 +1,4 @@
# Copyright (C) 1995, 1996, 1997, 2001, 2002 Free Software Foundation, Inc.
# Copyright (C) 1995,1996,1997,2001,2002,2005 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,7 +27,15 @@ routines := gmon mcount profil sprofil bb_init_func bb_exit_func prof-freq
elide-routines.os = bb_init_func bb_exit_func
tests := tst-sprofil
include ../Makeconfig
tests = tst-sprofil
ifeq ($(build-profile),yes)
tests += tst-profile-static
tests-static += tst-profile-static
LDFLAGS-tst-profile-static = -profile
endif
# The mcount code won't work without a frame pointer.
CFLAGS-mcount.c := -fno-omit-frame-pointer

10
gmon/tst-profile-static.c Normal file
View File

@@ -0,0 +1,10 @@
#include <stdio.h>
static int
do_test (void)
{
puts ("Hello world");
return 0;
}
#define TEST_FUNCTION do_test ()
#include "../test-skeleton.c"