From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1042.google.com (mail-pj1-x1042.google.com [IPv6:2607:f8b0:4864:20::1042]) by sourceware.org (Postfix) with ESMTPS id 465C2386EC44 for ; Mon, 20 Apr 2020 09:35:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 465C2386EC44 Received: by mail-pj1-x1042.google.com with SMTP id t9so2204000pjw.0 for ; Mon, 20 Apr 2020 02:35:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=/BImwxMvdndWtEaxRtBUIHSkRrio60YUq/BGGPJw7yk=; b=ta6BdG3sjwrTaLQoejSslEyiMInIoCgB7pxZZ7VSVHaeRuRcfdFUe5zLsLj4PyVSKh Smfy7QB8cv47QCUNnaz7vkXtWg4rG8fJhYKrkupSsUctk27QmBhssffK3J5R2GtwMhBk NyIFgimyDn4+4mjGL64kMBm06Ul5WHN9tO5oGM8FRpuijpaqmWggoXRbi+aYroLRnTUr nezigKT1HkGkIUwDZtoonBz/KtFZTXc/g1GDWCnkokGYs1i2dTF6On2Gv9IGbBPyXMlP /lBFqgEHxYYpyhZIS+WmYb+CflKqSh/CE3L1oH3Y5Ii4cFQ78X6QoCzlxOMFxKIOw/oC H/oA== X-Gm-Message-State: AGi0PuZ2xLTJ9KUErl++S7LhBMjt+WBYG54t0Z1gt1WKsJiaEydfYWhq xlQ91lbQFYcGLfKvtwM/Sdz6z4Ipm30= X-Google-Smtp-Source: APiQypJbaTpneKmjtt1jJkFEq8SxNSZBVzigVJxF5R2Wslbv2DvpM0KVDapT1HRlKJYkyUhI+RJafQ== X-Received: by 2002:a17:90a:c702:: with SMTP id o2mr18866267pjt.196.1587375351470; Mon, 20 Apr 2020 02:35:51 -0700 (PDT) Received: from bubble.grove.modra.org ([2406:3400:51d:8cc0:99dd:b446:8a47:2d98]) by smtp.gmail.com with ESMTPSA id c144sm566984pfb.172.2020.04.20.02.35.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Apr 2020 02:35:50 -0700 (PDT) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id 2AAFB81064; Mon, 20 Apr 2020 19:05:47 +0930 (ACST) Date: Mon, 20 Apr 2020 19:05:47 +0930 From: Alan Modra To: "H.J. Lu" Cc: Nick Clifton , Jan Beulich , Binutils Subject: Re: [PATCH] elf: Strip zero-sized dynamic sections Message-ID: <20200420093547.GR29913@bubble.grove.modra.org> References: <81ae71d0-e88e-bf62-1298-3bee538f852e@suse.com> <073ab46b-7fa7-1557-593e-6a98db0cc1fe@suse.com> <6e17e945-6787-5ef0-1f8c-ef12703355c8@suse.com> <20200418002601.GC29913@bubble.grove.modra.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-Spam-Status: No, score=-7.6 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: Mon, 20 Apr 2020 09:35:53 -0000 On Sat, Apr 18, 2020 at 09:51:53AM -0700, H.J. Lu wrote: > On Fri, Apr 17, 2020 at 5:26 PM Alan Modra wrote: > > > > On Fri, Apr 17, 2020 at 10:57:04AM -0700, H.J. Lu wrote: > > > Any ideas why ppc64 backend generates zero-sized relocation section: > > > > > > tmpdir/libcomm-data.so: > > > ... > > > [ 5] .rela.dyn RELA 0000000000000160 000160 > > > 000000 18 A 3 0 8 > > > ... > > > > > > Is this required by psABI? > > > > No, it just looks to be something that isn't tidied. The .rela.dyn > > output section is created due to .rela.branch_lt being created as a > > dynamic section, and not being sized early enough for > > size_dynamic_sections to set SEC_EXCLUDE. I'll see if I can make it > > go away. > > > > I opened: > > https://sourceware.org/bugzilla/show_bug.cgi?id=25849 > > Here is a patch. OK for master? I don't think readelf should warn until all ELF targets are tidied. If someone sees a warning on alpha-linux, say, they have no way to avoid producing object files that give a warning. -- Alan Modra Australia Development Lab, IBM