From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 3F75D3858C54 for ; Tue, 26 Apr 2022 16:39:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3F75D3858C54 Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-295-AiDISwiINGGNRYhdFb7lpA-1; Tue, 26 Apr 2022 12:39:50 -0400 X-MC-Unique: AiDISwiINGGNRYhdFb7lpA-1 Received: by mail-wm1-f71.google.com with SMTP id q188-20020a1c43c5000000b003928f679c42so8275756wma.5 for ; Tue, 26 Apr 2022 09:39:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=e92K3pItjV4HUsNoKX0fOhzNytPuhW0HR/3fOtTUozs=; b=BZzzuPsj0Pr7JXGUvQE1ODrC9CmUTKF2FYd9GxOPNPtya7MOg33Dxqrd8qMI4pRJ40 u/xo9SpMV6Gk9BaYBvIS4X5D73VxpA/iO/5Fjm39fA1CZI7Fn/Ptle0oF+jCmRNtm37l NP5yYFbDmSErdnqL3hoXD26JricPqjICmnlNt7CJvUeAbfrNVDrSArQqMsu0qS5E6+EN e6Tw6X3/pJGhUN1gWDhtUlM4LQBtYUudtuPPLECxYWzAqxl4DpdceteG/FpCzMnHPsjH ClMjnN9cfney5LcwV64eV1jcfO5OFRl9BmHhDzYlVcYyNQOICCU418ECVZF/8Bx63gMy ujpw== X-Gm-Message-State: AOAM5336rYpfKaFmBi4TQ3grAddVsJw7JrOv8qsUbyrxiKWzl+GOWMQg lX3cmWnHTSWAeT3rlOGsiP5XZIEClWoReKD+Zfhfviezwhn+d4cjNCcaWaHm5hyaQdZPk/H1CzE hcBbkzx291vxamxiDBQ== X-Received: by 2002:a05:600c:35c5:b0:390:9982:7409 with SMTP id r5-20020a05600c35c500b0039099827409mr21812698wmq.127.1650991189358; Tue, 26 Apr 2022 09:39:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwpYqr3HJpo0NekRubipXMEO953Cdu3G+PLGk7mdtYs4NKuzIhsCCaLe+dYSfKG1EmZhhBC3g== X-Received: by 2002:a05:600c:35c5:b0:390:9982:7409 with SMTP id r5-20020a05600c35c500b0039099827409mr21812684wmq.127.1650991189091; Tue, 26 Apr 2022 09:39:49 -0700 (PDT) Received: from [192.168.1.6] (adsl-2-solo-173-39.claranet.co.uk. [80.168.173.39]) by smtp.gmail.com with ESMTPSA id p3-20020adfaa03000000b00207a1db96cfsm12422042wrd.71.2022.04.26.09.39.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 26 Apr 2022 09:39:48 -0700 (PDT) Message-ID: <459ee8f3-5251-b9ad-d3cd-d2172b7b47da@redhat.com> Date: Tue, 26 Apr 2022 17:39:47 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: RFC: Add a linker warning when creating segments with RWX permissions To: Jan Beulich Cc: binutils@sourceware.org References: <878rrsw074.fsf@redhat.com> From: Nick Clifton In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-GB Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Apr 2022 16:39:53 -0000 Hi Jan, >> +static inline bool >> +is_memory_resident (const Elf_Internal_Phdr *src) >> +{ >> + /* FIXME: Should we return true for PT_TLS segments ? */ >> + return src->p_type == PT_LOAD; >> +} > > I think for PT_TLS you would want to warn if X is set, no matter > whether R and W are also both set? Agreed. > How would one go about silencing this warning without splitting the > segment? Hmmm - a good point. There needs to be a new option to silence the warning. Either that or the --no-warn-execstack option could be extended to silence this warning. Cheers Nick