From owner-freebsd-bugs@FreeBSD.ORG Thu Jul 14 11:50:13 2005 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D47C216A41C for ; Thu, 14 Jul 2005 11:50:13 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id EDE7843D48 for ; Thu, 14 Jul 2005 11:50:12 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j6EBoCMu094256 for ; Thu, 14 Jul 2005 11:50:12 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j6EBoCki094255; Thu, 14 Jul 2005 11:50:12 GMT (envelope-from gnats) Resent-Date: Thu, 14 Jul 2005 11:50:12 GMT Resent-Message-Id: <200507141150.j6EBoCki094255@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "Wojciech A. Koszek" Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8F50416A41C for ; Thu, 14 Jul 2005 11:42:54 +0000 (GMT) (envelope-from dunstan@freebsd.czest.pl) Received: from freebsd.czest.pl (silver.iplus.pl [80.48.250.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id CA5D243D46 for ; Thu, 14 Jul 2005 11:42:50 +0000 (GMT) (envelope-from dunstan@freebsd.czest.pl) Received: from freebsd.czest.pl (freebsd.czest.pl [80.48.250.4]) by freebsd.czest.pl (8.12.10/8.12.9) with ESMTP id j6EBuJGW031587 for ; Thu, 14 Jul 2005 11:56:20 GMT (envelope-from dunstan@freebsd.czest.pl) Received: (from dunstan@localhost) by freebsd.czest.pl (8.12.10/8.12.9/Submit) id j6EBuIhU031586; Thu, 14 Jul 2005 11:56:19 GMT (envelope-from dunstan) Message-Id: <200507141156.j6EBuIhU031586@freebsd.czest.pl> Date: Thu, 14 Jul 2005 11:56:19 GMT From: "Wojciech A. Koszek" To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: kern/83445: [PATCH] ndis won't compile with kernel profiling enabled X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: "Wojciech A. Koszek" List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jul 2005 11:50:14 -0000 >Number: 83445 >Category: kern >Synopsis: [PATCH] ndis won't compile with kernel profiling enabled >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Jul 14 11:50:12 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Wojciech A. Koszek >Release: FreeBSD 5.4-STABLE i386 >Organization: >Environment: System: FreeBSD laptop.freebsd.czest.pl 5.4-STABLE FreeBSD 5.4-STABLE #2: Tue Jul 5 22:56:49 CEST 2005 dunstan@laptop.freebsd.czest.pl:/usr/obj/usr/src/sys/LAPTOP2 i386 >Description: With kernel profiling enabled (-p[p] in CONFIGARGS) I'm not able to properly compile ndis(4). Build process stops on: (src/sys/compat/ndis/winx32_wrap.S): [..] ret $0xFF [..] After changing this instructions to their proper op-code: .byte 0xC2 .byte 0xFF .byte 0x00 everything seems to be just fine (ndis compiles). Since this change needs to be made in order to satisfy compiler, I belive it doesn't touch typical behaviour. >How-To-Repeat: cd /usr/src/sys/modules/ndis env CFLAGS=-DGPROF make [..] anding -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-p rototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -std=c99 -c /usr/src/sys/modules/ndis/../../compat/ndis/winx32_wrap.S /usr/src/sys/modules/ndis/../../compat/ndis/winx32_wrap.S: Assembler messages: /usr/src/sys/modules/ndis/../../compat/ndis/winx32_wrap.S:127: Error: junk at en d of line, first unrecognized character is `$' /usr/src/sys/modules/ndis/../../compat/ndis/winx32_wrap.S:198: Error: junk at en d of line, first unrecognized character is `$' *** Error code 1 [..] >Fix: Patch [diff.0.winx32_wrap.S] corrects this problem. --- ndis begins here --- Patch against FreeBSD 5.4-STABLE, kern.osreldate: 504102. diff -upr /usr/src/sys/compat/ndis/winx32_wrap.S src/sys/compat/ndis/winx32_wrap.S --- /usr/src/sys/compat/ndis/winx32_wrap.S Sun May 22 20:18:13 2005 +++ src/sys/compat/ndis/winx32_wrap.S Thu Jul 14 12:43:13 2005 @@ -123,8 +123,15 @@ x86_stdcall_wrap_call: mov %esi,%eax # restore return val pop %edi pop %esi + +/* + * In order to compile kernel with profiling enabled, + * 'ret $0xFF' needs to be placed here in binary form. + */ x86_stdcall_wrap_arg: - ret $0xFF + .byte 0xC2 + .byte 0xFF + .byte 0x00 x86_stdcall_wrap_end: @@ -194,8 +201,15 @@ x86_fastcall_wrap_call: pop %eax # restore return val add $12,%esp # clean the stack + +/* + * In order to compile kernel with profiling enabled, + * 'ret $0xFF' needs to be placed here in binary form. + */ x86_fastcall_wrap_arg: - ret $0xFF + .byte 0xC2 + .byte 0xFF + .byte 0x00 x86_fastcall_wrap_end: /* --- ndis ends here --- >Release-Note: >Audit-Trail: >Unformatted: