From: Arun Thomas Date: Fri, 17 Dec 2010 13:47:11 +0000 (+0000) Subject: Fix multiboot for ACK-built images X-Git-Tag: v3.2.0~712 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/named.html?a=commitdiff_plain;h=361f3774932cdc53cfddac78a62e5e06c04306a6;p=minix.git Fix multiboot for ACK-built images Move the profiling buffer to the end of the data segment --- diff --git a/kernel/Makefile b/kernel/Makefile index b4dd00d9f..d737ea937 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -6,7 +6,7 @@ PROG= kernel # first-stage, arch-dependent startup code SRCS= mpx.S SRCS+= start.c table.c main.c proc.c \ - system.c clock.c utility.c debug.c profile.c interrupt.c \ + system.c clock.c utility.c debug.c interrupt.c \ watchdog.c cpulocals.c .ifdef CONFIG_SMP @@ -38,6 +38,10 @@ MAN= .include "system/Makefile.inc" .include "arch/${ARCH}/Makefile.inc" + +# These come last, so the profiling buffer is at the end of the data segment +SRCS+= profile.c do_sprofile.c + .include debug.d: extracted-errno.h extracted-mfield.h extracted-mtype.h diff --git a/kernel/profile.c b/kernel/profile.c index 4eed04c24..5cc8ce443 100644 --- a/kernel/profile.c +++ b/kernel/profile.c @@ -28,6 +28,8 @@ #include #include "watchdog.h" +char sprof_sample_buffer[SAMPLE_BUFFER_SIZE]; + /* Function prototype for the profiling clock handler. */ FORWARD _PROTOTYPE( int profile_clock_handler, (irq_hook_t *hook) ); diff --git a/kernel/profile.h b/kernel/profile.h index 5580bf544..d25e2bfca 100644 --- a/kernel/profile.h +++ b/kernel/profile.h @@ -8,7 +8,7 @@ #include "arch_watchdog.h" #define SAMPLE_BUFFER_SIZE (64 << 20) -EXTERN char sprof_sample_buffer[SAMPLE_BUFFER_SIZE]; +extern char sprof_sample_buffer[SAMPLE_BUFFER_SIZE]; EXTERN int sprofiling; /* whether profiling is running */ EXTERN int sprofiling_type; /* whether profiling is running */ diff --git a/kernel/system/Makefile.inc b/kernel/system/Makefile.inc index 202bfab07..0142f58d0 100644 --- a/kernel/system/Makefile.inc +++ b/kernel/system/Makefile.inc @@ -34,7 +34,6 @@ SRCS+= \ do_sigreturn.c \ do_abort.c \ do_getinfo.c \ - do_sprofile.c \ do_cprofile.c \ do_profbuf.c \ do_vmctl.c \