From patchwork Mon Feb 4 13:52:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 1035930 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-99742-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="MK30QiR3"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43tTfW23lPz9sCh for ; Tue, 5 Feb 2019 00:52:19 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:mime-version :content-type; q=dns; s=default; b=RnblNVpqgHnMZ13LCis+L/0GS1D05 dzlaFJPlYymJwkxZ4AO4RsGZk6NLlOMCoGmlsR7t1BSyLwLrHdeK/VD8GGzCOsKh aPZN9Yy+iapUsDWJ4Uic7Fj+rRBvaI5ucDL5R93TfoSi4Q7e1cYygJA1MU1aVm+B RSmlHZmgwi5xNo= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:mime-version :content-type; s=default; bh=uGhShccxNiI4CU8stDY7T/D6G2E=; b=MK3 0QiR3jrhepTIwmBA+De2umzfHuhH3g1wM0IiSaYmBaBYG3pOZSVVONUBplVr4R01 c1uUbEWp22ST1DpF0BtnvrBsrZjTa7bYI11N7qXSNYLYKR7gxwcVCZuoLf97OlSY LByZ4uWeQ59knuA0EC6kF2G0ENripoK4XVakggb0= Received: (qmail 123860 invoked by alias); 4 Feb 2019 13:52:13 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 123847 invoked by uid 89); 4 Feb 2019 13:52:13 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, KAM_SHORT, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=customizing, produces X-HELO: mx1.redhat.com From: Florian Weimer To: libc-alpha@sourceware.org Subject: [PATCH] arm: Use nr constraint for Systemtap probes [BZ #24164] Date: Mon, 04 Feb 2019 14:52:08 +0100 Message-ID: <87sgx3pson.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 With the default "nor" constraint, current GCC will use the "o" constraint for constants, after emitting the constant to memory. That results in unparseable Systemtap probe notes such as "-4@.L1052". Removing the "o" alternative and using "nr" instead avoids this. 2019-02-04 Florian Weimer [BZ #24164] arm: Use "nr" constraint for Systemtap probes, to avoid the compiler using memory operands for constants, due to the "o" alternative in the default "nor" constraint. * include/stap-probe.h [USE_STAP_PROBE]: Include * sysdeps/generic/stap-probe-machine.h: New file. * sysdeps/arm/stap-probe-machine.h: Likewise. diff --git a/include/stap-probe.h b/include/stap-probe.h index c53dd86592..8c26292edd 100644 --- a/include/stap-probe.h +++ b/include/stap-probe.h @@ -21,6 +21,7 @@ #ifdef USE_STAP_PROBE +# include # include /* Our code uses one macro LIBC_PROBE (name, n, arg1, ..., argn). diff --git a/sysdeps/arm/stap-probe-machine.h b/sysdeps/arm/stap-probe-machine.h new file mode 100644 index 0000000000..b15855ab37 --- /dev/null +++ b/sysdeps/arm/stap-probe-machine.h @@ -0,0 +1,22 @@ +/* Macros for customizing Systemtap . Arm version. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +/* The default "nor" constraint produces unparseable memory references + for constants. Omit the problematic "o" constraint. See bug 24164 + and GCC 89146. */ +#define STAP_SDT_ARG_CONSTRAINT nr diff --git a/sysdeps/generic/stap-probe-machine.h b/sysdeps/generic/stap-probe-machine.h new file mode 100644 index 0000000000..aa4e29c42e --- /dev/null +++ b/sysdeps/generic/stap-probe-machine.h @@ -0,0 +1,19 @@ +/* Macros for customizing Systemtap . Generic version. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +/* By default, there are no custimizations. */