[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r100900: Use __executable_start to fi
From: |
Andreas Schwab |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r100900: Use __executable_start to find start of text segment for profiling |
Date: |
Sun, 25 Jul 2010 21:09:54 +0200 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 100900
committer: Andreas Schwab <address@hidden>
branch nick: emacs
timestamp: Sun 2010-07-25 21:09:54 +0200
message:
Use __executable_start to find start of text segment for profiling
* emacs.c (main) [PROFILING]: Use __executable_start if defined to
find start of text segment.
* dispnew.c (safe_bcopy): Don't define if HAVE___EXECUTABLE_START
is defined.
* configure.in: Check for __executable_start.
modified:
ChangeLog
configure
configure.in
src/ChangeLog
src/config.in
src/dispnew.c
src/emacs.c
=== modified file 'ChangeLog'
--- a/ChangeLog 2010-07-24 18:44:54 +0000
+++ b/ChangeLog 2010-07-25 19:09:54 +0000
@@ -1,3 +1,7 @@
+2010-07-25 Andreas Schwab <address@hidden>
+
+ * configure.in: Check for __executable_start.
+
2010-07-24 Ken Brown <address@hidden>
* configure.in (LINKER, LIB_GCC): Remove cygwin special cases (Bug#6715)
=== modified file 'configure'
--- a/configure 2010-07-24 22:06:03 +0000
+++ b/configure 2010-07-25 19:09:54 +0000
@@ -11190,7 +11190,7 @@
sendto recvfrom getsockopt setsockopt getsockname getpeername \
gai_strerror mkstemp getline getdelim mremap memmove fsync sync \
memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign \
-cfmakeraw cfsetspeed isnan copysign
+cfmakeraw cfsetspeed isnan copysign __executable_start
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
=== modified file 'configure.in'
--- a/configure.in 2010-07-24 18:44:54 +0000
+++ b/configure.in 2010-07-25 19:09:54 +0000
@@ -2611,7 +2611,7 @@
sendto recvfrom getsockopt setsockopt getsockname getpeername \
gai_strerror mkstemp getline getdelim mremap memmove fsync sync \
memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign \
-cfmakeraw cfsetspeed isnan copysign)
+cfmakeraw cfsetspeed isnan copysign __executable_start)
AC_CHECK_HEADERS(sys/un.h)
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2010-07-25 18:36:37 +0000
+++ b/src/ChangeLog 2010-07-25 19:09:54 +0000
@@ -1,5 +1,10 @@
2010-07-25 Andreas Schwab <address@hidden>
+ * emacs.c (main) [PROFILING]: Use __executable_start if defined to
+ find start of text segment.
+ * dispnew.c (safe_bcopy): Don't define if HAVE___EXECUTABLE_START
+ is defined.
+
* callproc.c (set_initial_environment): Avoid unbalanced braces.
2010-07-25 Ken Brown <address@hidden>
=== modified file 'src/config.in'
--- a/src/config.in 2010-07-11 10:31:10 +0000
+++ b/src/config.in 2010-07-25 19:09:54 +0000
@@ -801,6 +801,9 @@
/* Define to 1 if you want to use the X window system. */
#undef HAVE_X_WINDOWS
+/* Define to 1 if you have the `__executable_start' function. */
+#undef HAVE___EXECUTABLE_START
+
/* Define to 1 if you have the `__fpending' function. */
#undef HAVE___FPENDING
=== modified file 'src/dispnew.c'
--- a/src/dispnew.c 2010-07-12 16:32:53 +0000
+++ b/src/dispnew.c 2010-07-25 19:09:54 +0000
@@ -436,7 +436,7 @@
#endif /* GLYPH_DEBUG == 0 */
-#ifdef PROFILING
+#if defined PROFILING && !HAVE___EXECUTABLE_START
/* FIXME: only used to find text start for profiling. */
void
=== modified file 'src/emacs.c'
--- a/src/emacs.c 2010-07-13 10:57:00 +0000
+++ b/src/emacs.c 2010-07-25 19:09:54 +0000
@@ -1747,9 +1747,18 @@
#else
extern char etext;
#endif
+#ifdef HAVE___EXECUTABLE_START
+ /* This symbol is defined by GNU ld to the start of the text
+ segment. */
+ extern char __executable_start[];
+#else
extern void safe_bcopy ();
+#endif
atexit (_mcleanup);
+#ifdef HAVE___EXECUTABLE_START
+ monstartup (__executable_start, &etext);
+#else
/* This uses safe_bcopy because that function comes first in the
Emacs executable. It might be better to use something that
gives the start of the text segment, but start_of_text is not
@@ -1757,6 +1766,7 @@
/* FIXME: Does not work on architectures with function
descriptors. */
monstartup (safe_bcopy, &etext);
+#endif
}
else
moncontrol (0);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r100900: Use __executable_start to find start of text segment for profiling,
Andreas Schwab <=