From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd42.google.com (mail-io1-xd42.google.com [IPv6:2607:f8b0:4864:20::d42]) by sourceware.org (Postfix) with ESMTPS id 765C4385DC1B for ; Sun, 26 Apr 2020 16:00:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 765C4385DC1B Received: by mail-io1-xd42.google.com with SMTP id 19so16134477ioz.10 for ; Sun, 26 Apr 2020 09:00:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fQx3FPL3uNU9szpkxSZtyJyVH17iDouhXk2un1vrn4Y=; b=Uqzbg8hxpKYe1aFPfAWyfTCQrz4hA9zXWNO/GScuaA8VgVo0ONZjXf6XTXx4Tg2l4O 9CZh1uOZIJ78KlQtn/U/3g7TPVApOyT9eg8bhnaClr+Grf6Yhh5iPbTVFkl8rENPbndf wwnN2L3/3uW85XEAaoc2ahAZIDeFFuuyLIPQ0qWLyCmFeav0pc04d+6rSnWNr+xB1JWA kTVe8RnJ0VYXCOZi66/2DsIWeA01HhggejQKEwJqizz2xraTWHcA1UHJzT3PRpRQn05J S+4bDDpe9IqYykn0Bo4rovvpxESwsFngP9P5YktAIORoVGE0bIHLeTipTfRGKkhDGHtq SI9A== X-Gm-Message-State: AGi0PuYwSGWf2pzmIsaYkuSy5n7jbZcUBFdNvQi4Q1OgfrMhxER/T52X fBJUg37WCEeDAIXx9vlc1wiBqLxBEqqxMRbFPzE= X-Google-Smtp-Source: APiQypKFAnl4A5ZPJDZJLPZOtAFQILO1HlkKhpdl3c/FoOaYAqGKN5Z3IBnxGjHJsKwcAr6VTe/DMk5S4piHIFrJKFA= X-Received: by 2002:a05:6602:1c6:: with SMTP id w6mr16457245iot.91.1587916822814; Sun, 26 Apr 2020 09:00:22 -0700 (PDT) MIME-Version: 1.0 References: <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> <20200424171926.hv5ombyvjdofhm2u@gmail.com> In-Reply-To: From: "H.J. Lu" Date: Sun, 26 Apr 2020 08:59:47 -0700 Message-ID: Subject: Re: [PATCH] readelf: Warn zero-sized relocation sections To: Nick Clifton Cc: Fangrui Song , Nick Clifton via Binutils Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-6.2 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.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: Sun, 26 Apr 2020 16:00:24 -0000 On Sun, Apr 26, 2020 at 8:28 AM Nick Clifton via Binutils wrote: > > Hi Fangrui, > > > It is convenient to write a general linker script with lots of output > > section descriptions but many omitted in some cases. So empty sections > > may be common, especially in embedded systems. Not warning by default > > seems sensible. > > Right - this seems to be the opinion of several other contributors as well. > > > Took a rough look at the patch. Looks great! Just one question, -L's > > mnemonic is *L*int. Why is the long option --enable-checks, instead of > > --lint? > > Eh - no good reason - and I am happy to change the option name if people > think that --lint is better. I used -L as it was reminiscent of "lint" > (and "l" was already taken). But I picked --enable-checks as this seemed > more obvious to me than --lint. (My guess was that not all users will be > familiar with using the word 'lint' to mean 'check for errors'. It is a > kind of niche term). > In my opinion, zero-sized non SHT_REL/SHT_RELA sections are very common. But zero-sized SHT_REL/SHT_RELA section is an indication of not well implemented tools. -- H.J.