From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22991 invoked by alias); 20 Sep 2013 19:25:56 -0000 Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org Received: (qmail 22979 invoked by uid 89); 20 Sep 2013 19:25:55 -0000 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 20 Sep 2013 19:25:55 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.4 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r8KIxxws022549 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 20 Sep 2013 14:59:59 -0400 Received: from [10.3.113.8] ([10.3.113.8]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r8KIxxiH001195; Fri, 20 Sep 2013 14:59:59 -0400 Message-ID: <523C9B2F.9070300@redhat.com> Date: Fri, 20 Sep 2013 19:25:00 -0000 From: Josh Stone User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8 MIME-Version: 1.0 To: Martin Martin CC: systemtap@sourceware.org Subject: Re: Systemtap's DTRACE_PROBE and clang References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2013-q3/txt/msg00343.txt.bz2 On 09/20/2013 02:45 AM, Martin Martin wrote: > Hi, > > I've been submitting bug reports to Clang to get DTRACE_PROBE to > compile. They implemented section flag "?", which solved the first > problem. Great! > The remaining problem is that systemtap is using "note" in place of > "@note." llvm-mc only accepts the @note form, which is the only form > gas is documented to accept: > https://sourceware.org/binutils/docs/as/Section.html#Section > (.pushsection refers to the documentation for .section for syntax). > > The clang people write: > > How onerous is it to change the code here? On the other side, it'd be > helpful to understand why gas is accepting (and people are writing) a > form of .pushsection that isn't in the documentation. > > Workaround for now, it does work if you change it to: > .pushsection .note.stapsdt,"?",@note Interesting. I'm not sure why we have "note" rather than @note, but it's been that way at least since the beginning of Roland's SDTv3 rewrite. But I just tried @note, like the patch below, and it looks ok both on Fedora 19 and on RHEL5 (roughly the oldest we support). I'll run it through our full testsuite, and assuming nothing comes up then I'm happy to commit the change. (quoted just so my mailer won't break lines) > diff --git a/includes/sys/sdt.h b/includes/sys/sdt.h > index ba04c12..c623caf 100644 > --- a/includes/sys/sdt.h > +++ b/includes/sys/sdt.h > @@ -173,7 +173,7 @@ __extension__ extern unsigned long long __sdt_unsp; > > #define _SDT_ASM_BODY(provider, name, pack_args, args) \ > _SDT_ASM_1(990: _SDT_NOP) \ > - _SDT_ASM_3( .pushsection .note.stapsdt,_SDT_ASM_AUTOGROUP,"note") \ > + _SDT_ASM_3( .pushsection .note.stapsdt,_SDT_ASM_AUTOGROUP,@note) \ > _SDT_ASM_1( .balign 4) \ > _SDT_ASM_3( .4byte 992f-991f, 994f-993f, _SDT_NOTE_TYPE) \ > _SDT_ASM_1(991: .asciz _SDT_NOTE_NAME) \