From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by sourceware.org (Postfix) with ESMTPS id C52833858D28 for ; Sat, 5 Feb 2022 10:00:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C52833858D28 Received: by mail-pj1-x1031.google.com with SMTP id om8so73739pjb.5 for ; Sat, 05 Feb 2022 02:00:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Y+qDbkbeQVBIe/l+eftLLdboo06iTDb2d2RISQyiFwI=; b=WAIIJ/FDensPSsz1HdcMBe8IIdFQqq2yIyZIaQjwMnSMxmOAnXfTPpj8QtamqOL9yy g4H+xrNPoWnAu7W4iwl7Bq1Z9ZcjAknXjo/girBORmalqyy8k2bFf8LIXjmXV6tY0Wmf 7aP0TZVvmPDcn3aQheEIhfAIven7wXNR0cZs8DiRZFQxlQEpv+iuEGsJdoORE4mqB6Ht liMH9g48uHpE8J1607vy0kv7INUsRE+v0N9kxdVtFO85OebVZ5vaTDZ0fAGeuq6Elz1O pSnpodoOq6e9Prz1kQYesQNvOK4GPaFqFgtI6NmuOaqGIxvQWxEDDfpFI2UL5+Y4dX7r esmg== X-Gm-Message-State: AOAM530v/DpvArXYfSTpJMetRBQ/euP6HZGBb4ziwej3Hb4XFM4j2Vs5 7FrQPQ7637HvKsPT5KoD33k= X-Google-Smtp-Source: ABdhPJxWKv/phFOlNmD3BlqrhSkfVygd+Td2JP/4+yVdDm9XRYnxHSXEB9gG2zCkFKnS7ZLpkIIPlw== X-Received: by 2002:a17:902:c951:: with SMTP id i17mr7223129pla.26.1644055227957; Sat, 05 Feb 2022 02:00:27 -0800 (PST) Received: from squeak.grove.modra.org (158.106.96.58.static.exetel.com.au. [58.96.106.158]) by smtp.gmail.com with ESMTPSA id n13sm2414666pfv.212.2022.02.05.02.00.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Feb 2022 02:00:26 -0800 (PST) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id F05CE1140D6C; Sat, 5 Feb 2022 20:30:23 +1030 (ACDT) Date: Sat, 5 Feb 2022 20:30:23 +1030 From: Alan Modra To: Fangrui Song Cc: binutils@sourceware.org Subject: Re: PR28827 testcase Message-ID: References: <20220205074313.fqmorplqrc7b2a4u@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220205074313.fqmorplqrc7b2a4u@gmail.com> X-Spam-Status: No, score=-3038.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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: Sat, 05 Feb 2022 10:00:30 -0000 On Fri, Feb 04, 2022 at 11:43:13PM -0800, Fangrui Song wrote: > On 2022-02-05, Alan Modra via Binutils wrote: > > This testcase triggers a stub sizing error with the patches applied > > for PR28743 (commit 2f83249c13d8 and c804c6f98d34). > > > > PR 28827 > > * testsuite/ld-powerpc/pr28827-1.s, > > * testsuite/ld-powerpc/pr28827-1.d: New test. > > * testsuite/ld-powerpc/powerpc.exp: Run it. > > > > diff --git a/ld/testsuite/ld-powerpc/powerpc.exp b/ld/testsuite/ld-powerpc/powerpc.exp > > index 318bf92c85f..9eff14fc89f 100644 > > --- a/ld/testsuite/ld-powerpc/powerpc.exp > > +++ b/ld/testsuite/ld-powerpc/powerpc.exp > > @@ -465,6 +465,7 @@ if [ supports_ppc64 ] then { > > run_dump_test "tlsie" > > run_dump_test "non-contiguous-powerpc64" > > run_dump_test "tprel" > > + run_dump_test "pr28827-1" > > run_dump_test "pr28827-2" > > } > > > > diff --git a/ld/testsuite/ld-powerpc/pr28827-1.d b/ld/testsuite/ld-powerpc/pr28827-1.d > > new file mode 100644 > > index 00000000000..8df9bcffddc > > --- /dev/null > > +++ b/ld/testsuite/ld-powerpc/pr28827-1.d > > @@ -0,0 +1,4 @@ > > +# ld: -melf64ppc -gc-sections -shared -z relro --plt-align=0 > > +# size: -A > > + > > +#pass > > diff --git a/ld/testsuite/ld-powerpc/pr28827-1.s b/ld/testsuite/ld-powerpc/pr28827-1.s > > new file mode 100644 > > index 00000000000..bf647a69072 > > --- /dev/null > > +++ b/ld/testsuite/ld-powerpc/pr28827-1.s > > @@ -0,0 +1,6828 @@ > > + .globl _start > > + .type _start,@function > > + .text > > +_start: > > + .cfi_startproc > > +0: > > + addis 2,12,(.TOC.-0b)@ha > > + addi 2,2,(.TOC.-0b)@l > > + .localentry _start,.-0b > > + mflr 0 > > + std 0,16(1) > > + stdu 1,-32(1) > > + .cfi_def_cfa_offset 32 > > + .cfi_offset 65, 16 > > + bl f0 > > + nop > > + bl f1 > > + nop > > + bl f2 > > + nop > > + bl f3 > > + nop > > + bl f4 > > + nop > > + bl f5 > > + nop > > + bl f6 > > [...] > > Can the long list of instructions be replaced with two output sections > with only few instructions? No, the idea was to create a reasonably big .plt and call stub section. (I should have used nested gas .irpt macros..) > SECTIONS { > .text_low 0x2000: { *(.text_low) } > .text_high 0x2002000 : { *(.text_high) } > } -- Alan Modra Australia Development Lab, IBM