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 88B7C385DC06 for ; Tue, 14 Apr 2020 13:38:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 88B7C385DC06 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 DBFDCAD33; Tue, 14 Apr 2020 13:38:01 +0000 (UTC) Subject: Re: [PATCH] readelf: Warn zero-sized relocation sections To: "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> From: Jan Beulich Message-ID: <6e17e945-6787-5ef0-1f8c-ef12703355c8@suse.com> Date: Tue, 14 Apr 2020 15:38:02 +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: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-13.1 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: Tue, 14 Apr 2020 13:38:04 -0000 On 14.04.2020 15:30, H.J. Lu wrote: > On Tue, Apr 14, 2020 at 6:25 AM Jan Beulich wrote: >> >> On 14.04.2020 15:03, H.J. Lu wrote: >>> On Tue, Apr 14, 2020 at 5:42 AM Jan Beulich wrote: >>>> >>>> On 14.04.2020 14:25, H.J. Lu via Binutils wrote: >>>>> Older linkers may fail with zero-sized relocation section in section >>>>> group. >>>>> >>>>> PR ld/25767 >>>>> * readelf.c (process_section_headers): Warn zero-sized >>>>> relocation sections. >>>> >>>> Zero-sized sections of whatever kind are perfectly fine in ELF. I >>>> see no reason why one would want to see a warning for such by >>>> default. >>> >>> Linkers older than 2.35 may fail with >>> >>> ./ld: BFD (GNU Binutils) 2.34.50.20200402 assertion fail >>> /export/gnu/import/git/gitlab/x86-binutils/bfd/elf.c:3652 >> >> Which is a bug, yes, but imo no reason to clutter readelf output. >> > > When such linker failures happen, this is useful to identify why. And hence an option to enable such a warning would seem reasonable, but not making this default behavior. Jan