From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757490AbYDJQUm (ORCPT ); Thu, 10 Apr 2008 12:20:42 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755867AbYDJQUe (ORCPT ); Thu, 10 Apr 2008 12:20:34 -0400 Received: from hrndva-omtalb.mail.rr.com ([71.74.56.123]:51359 "EHLO hrndva-omtalb.mail.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755573AbYDJQUd (ORCPT ); Thu, 10 Apr 2008 12:20:33 -0400 Date: Thu, 10 Apr 2008 12:20:31 -0400 (EDT) From: Steven Rostedt X-X-Sender: rostedt@gandalf.stny.rr.com To: "H. Peter Anvin" cc: Linus Torvalds , Andi Kleen , Andy Whitcroft , LKML , Ingo Molnar , Peter Zijlstra , akpm@linux-foundation.org, Rusty Russell , Glauber de Oliveira Costa , Jan Beulich , Thomas Gleixner , pinskia@gcc.gnu.org Subject: Re: [PATCH] pop previous section in alternative.c In-Reply-To: <47FE3B24.4020301@zytor.com> Message-ID: References: <47FD5D42.5000603@zytor.com> <87wsn6m6zt.fsf@basil.nowhere.org> <20080410094637.GW17915@shadowen.org> <20080410144114.GH10019@one.firstfloor.org> <20080410150544.GI10019@one.firstfloor.org> <47FE3B24.4020301@zytor.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 10 Apr 2008, H. Peter Anvin wrote: > Linus Torvalds wrote: > > > > That would mark gcc itself as buggy, because gcc will move some things > > into the #APP/#NO_APP thing, and sometimes doesn't end the #APP at all! > > > > That is quite buggy indeed, since the whole #APP and #NO_APP string set > are arbitrary strings that are part of the gcc configuration, marked as > "what to insert before user assembly" and "what to insert after user > assembly." They are not guaranteed to be simple comments, in fact. > > In fact, gas *is* sensitive to #APP ... #NO_APP, so they are not simple > comments. Looking at the output below, shows that testing .sections in between #APP and #NO_APP would in fact catch this bug. -- Steve .Ltext0: #APP .section .rodata, "a" intelnops: .byte 0x90 .byte 0x89,0xf6 .byte 0x8d,0x76,0x00 .byte 0x8d,0x74,0x26,0x00 .byte 0x90 .byte 0x8d,0x74,0x26,0x00 .byte 0x8d,0xb6,0x00,0x00,0x00,0x00 .byte 0x8d,0xb4,0x26,0x00,0x00,0x00,0x00 .byte 0x90 .byte 0x8d,0xb4,0x26,0x00,0x00,0x00,0x00 .section .rodata, "a" k8nops: .byte 0x90 .byte 0x66,0x90 .byte 0x66,0x66,0x90 .byte 0x66,0x66,0x66,0x90 .byte 0x66,0x66,0x90 .byte 0x66,0x90 .byte 0x66,0x66,0x90 .byte 0x66,0x66,0x90 .byte 0x66,0x66,0x66,0x90 .byte 0x66,0x66,0x90 .byte 0x66,0x66,0x66,0x90 .byte 0x66,0x66,0x66,0x90 .section .rodata, "a" k7nops: .byte 0x90 .byte 0x8b,0xc0 .byte 0x8d,0x04,0x20 .byte 0x8d,0x44,0x20,0x00 .byte 0x8d,0x44,0x20,0x00 .byte 0x90 .byte 0x8d,0x80,0,0,0,0 .byte 0x8D,0x04,0x05,0,0,0,0 .byte 0x8D,0x04,0x05,0,0,0,0 .byte 0x90 .section .rodata, "a" p6nops: .byte 0x90 .byte 0x66,0x90 .byte 0x0f,0x1f,0x00 .byte 0x0f,0x1f,0x40,0 .byte 0x0f,0x1f,0x44,0x00,0 .byte 0x66,0x0f,0x1f,0x44,0x00,0 .byte 0x0f,0x1f,0x80,0,0,0,0 .byte 0x0f,0x1f,0x84,0x00,0,0,0,0 #NO_APP .type constant_test_bit, @function constant_test_bit: .LFB30: