From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id 8834D386EC42 for ; Fri, 24 Apr 2020 17:50:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 8834D386EC42 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=jbeulich@suse.com X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id C42D6AD72; Fri, 24 Apr 2020 17:50:08 +0000 (UTC) Subject: Re: [PATCH] readelf: Warn zero-sized relocation sections To: Nick Clifton , Hans-Peter Nilsson , "H.J. Lu" Cc: Binutils References: <20200414122552.249321-1-hjl.tools@gmail.com> <81ae71d0-e88e-bf62-1298-3bee538f852e@suse.com> <073ab46b-7fa7-1557-593e-6a98db0cc1fe@suse.com> <6e17e945-6787-5ef0-1f8c-ef12703355c8@suse.com> <8cf3413a-4ce9-1032-d188-d322fc29287e@suse.com> <8cdfadaa-e0f2-9ced-2359-c6ed3609154a@redhat.com> <7f05a248-7f7f-263e-29de-33e049e8c149@suse.com> <6e6883eb-3e70-722a-a43a-dfd5404d983e@redhat.com> <38ac9399-f2e7-2b9d-cd1c-154409738c51@suse.com> <75a39c17-84f6-31da-e6ff-5976fecf1d6d@redhat.com> From: Jan Beulich Message-ID: Date: Fri, 24 Apr 2020 19:50:04 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <75a39c17-84f6-31da-e6ff-5976fecf1d6d@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: Fri, 24 Apr 2020 17:50:12 -0000 On 24.04.2020 16:04, Nick Clifton wrote: > Hi Guys, > > OK, here is a first draft of a patch to implement a checking mode > for readelf. It incorporates H.J.'s zero-size section test, although > I have extended it to cover any SHT_PROGBITS section as well. (Mainly > because it makes writing a test case much easier). > > One thing that the patch does not do, but which maybe it should, is > disable the normal non-warning output when the checking mode is enabled. > The effect can be achieved by redirecting stdout to the null device > of course, but I appreciate that this is not always possible/easy to do. > > Anyway - comments ? Well, as said before, and as now supported by another reply you've got, I'm unconvinced warning about empty .text or .data in particular, but perhaps @progbits / @qnobits in general is helpful behavior. Especially not as long as gas created such files without there being a way to prevent it doing so. Apart from that, besides noticing a few seemingly unrelated changes, is __attribute__((weak)) portable enough to be used in binutils? (Sorry, didn't check if there are pre-existing instances.) Jan