From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by sourceware.org (Postfix) with ESMTPS id E7C6D385842E for ; Tue, 5 Sep 2023 07:17:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E7C6D385842E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-1c06f6f98c0so16362095ad.3 for ; Tue, 05 Sep 2023 00:17:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693898233; x=1694503033; darn=gcc.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=skr5wT4b8EGZ4/vHGU/Ukh53ibFPRDL8U2xHo1I32BY=; b=aFn9ZEqeCfAPg9C3Du51m/ld3NqnoOfUUwlM1dqA62C0qXvXB9NqUxl1MzWkhTuK3m oVpq9GREC/4WXXXAV6Pf66WNKiVsLqmvqCHNlxz6V3Ci0gkcQjQSmKfqCMWtkMxSwijx M/zJejRtb0jXY6DCYgrosNHWjzkSRKp0NchZ2oROJ142m7ZCTzUcU/2FAYYXtpsaUEMA BjevEbqVRfwo5B+wYexOV8fvk4KD0e8g/uS3rlBvQvgtcqPAsdfuDSLxqcqGCQEmH08B Ls0/qS8CRGHYnB+Kux7HB+oTBeX+tjEOClBYUSHU+bl/mgJXAeWLS/oQNz7wTwELNohA Rnmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693898233; x=1694503033; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=skr5wT4b8EGZ4/vHGU/Ukh53ibFPRDL8U2xHo1I32BY=; b=IXwdOX7Sj8/1F5bgUvM6TfRrBmyUjFCukEgBkljFGWlxEeZXaFIJoudWZVyuXAk7/x mVKweCen2QCKCnd5c1hqVr8J/2jxj+37vFfNX5/vKG1rKMmjhtJ0P2iUcQqmAMS5c7aI uXawygy7A+syIt/X0JAlm+1eqMAqqcr+34kG9J+u3UUfD8URHQ627jMAaTMhp2TL9Tms JXB7zLCvsfipoOg54YQBrZZZmjrUFwpp0vOJwXIoUngwuQJUhPH+6L6Se0tP2QE6HzCM BEsr+8dGplSJBN+oe14U+flr+e5HPaAc1xTzSbSTrRLKpzInLb/pZa96b4kcCieg2oTu mhvw== X-Gm-Message-State: AOJu0YyGoVzRjYrSNpJv9OCyDDSz0lw132osHdBVg7aR1XlCyYyHG4yR GdJZxXZmaojo+e6y6dNNmi8= X-Google-Smtp-Source: AGHT+IExaIA3AdRZIEKNxuVB4+cZgttf055syOSj20LGQXYqhR3O7NYmKQqeYysOd2WgLccPW/IfKA== X-Received: by 2002:a17:902:f546:b0:1b9:de67:286f with SMTP id h6-20020a170902f54600b001b9de67286fmr14554879plf.49.1693898233605; Tue, 05 Sep 2023 00:17:13 -0700 (PDT) Received: from [172.31.0.109] ([136.36.130.248]) by smtp.gmail.com with ESMTPSA id w1-20020a170902e88100b001bafd5cf769sm8603517plg.2.2023.09.05.00.17.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 05 Sep 2023 00:17:13 -0700 (PDT) Message-ID: Date: Tue, 5 Sep 2023 01:17:10 -0600 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] RISC-V: Emit .note.GNU-stack for non-linux target as well Content-Language: en-US To: Kito Cheng , gcc-patches@gcc.gnu.org, kito.cheng@gmail.com, palmer@dabbelt.com References: <20230831090547.71737-1-kito.cheng@sifive.com> From: Jeff Law In-Reply-To: <20230831090547.71737-1-kito.cheng@sifive.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 8/31/23 03:05, Kito Cheng wrote: > We only emit that on linux target before, that not problem before, > however Qemu has fix a bug to make qemu user mode honor PT_GNU_STACK[1], > that will cause problem when we test baremetal with qemu. > > So the straightforward is enable that as well for non-linux toolchian, > the price is that will increase few bytes for each binary. > > [1] https://github.com/qemu/qemu/commit/872f3d046f2381e3f416519e82df96bd60818311 > > gcc/ChangeLog: > > * config/riscv/linux.h (TARGET_ASM_FILE_END): Move ... > * config/riscv/riscv.cc (TARGET_ASM_FILE_END): to here. OK. jeff