Re: [OOPS] in kdb v2.3 on top of 2.5.44

Keith Owens (kaos@sgi.com)
Tue, 22 Oct 2002 18:34:24 +1000


On Sun, 20 Oct 2002 14:46:05 -0400 (EDT),
David Mansfield <lkml@dm.cobite.com> wrote:
>EIP is at kdba_setjmp+0x4/0x50
>eax: 00000000 ebx: c044a000 ecx: 00000001 edx: 00000000
>esi: 00000004 edi: c034409f ebp: c044a000 esp: c044be1c

A kbuild change in 2.5.41 moved the initial setting of CFLAGS before
the include of .config. Now the global CFLAGS must not depend on any
config settings (totally undocumented, of course). kdba_setjmp was
compiled with CONFIG_FRAME_POINTERS=y from config.h, but gcc flags were
set to -fomit-frame-pointer, the mismatch generated bad code.

Will be fixed in next kdb patch, in the meantime, apply this over
kdb-v2.3-2.5.53-common-1.

Index: 43.2/Makefile
--- 43.2/Makefile Thu, 17 Oct 2002 15:02:15 +1000 kaos (linux-2.5/I/d/12_Makefile 1.41.1.10 444)
+++ 43.2(w)/Makefile Tue, 22 Oct 2002 18:17:22 +1000 kaos (linux-2.5/I/d/12_Makefile 1.41.1.10 444)
@@ -159,9 +159,6 @@ CPPFLAGS := -D__KERNEL__ -Iinclude
CPPFLAGS += $(patsubst %,-I%,$(CROSS_COMPILE_INC))
CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -Wno-trigraphs -O2 \
-fno-strict-aliasing -fno-common
-ifndef CONFIG_FRAME_POINTER
-CFLAGS += -fomit-frame-pointer
-endif
AFLAGS := -D__ASSEMBLY__ $(CPPFLAGS)

export VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION KERNELRELEASE ARCH \
@@ -212,6 +209,10 @@ include-config := 1

endif

+ifndef CONFIG_FRAME_POINTER
+CFLAGS += -fomit-frame-pointer
+endif
+
include arch/$(ARCH)/Makefile

core-y += kernel/ mm/ fs/ ipc/ security/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/