From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com [209.85.215.173]) by sourceware.org (Postfix) with ESMTPS id 6D6713858D28 for ; Sat, 5 Feb 2022 07:43:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6D6713858D28 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=maskray.me Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pg1-f173.google.com with SMTP id p125so6950262pga.2 for ; Fri, 04 Feb 2022 23:43:15 -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=Ff7uVz2tjT0LGGXRJNiciVWPYDVwzaHJlTfS4HcrRo8=; b=aMevo0xHQn/t6fGvPM+quBH5glaJ0moCdQpm7gkBz06Ctbe3gU30/vYchBYm6Uk1FZ BzpWx4abP+XraEuf/xCdLhG/yLNSAiUGDqt/Jhcj0s7CaefzfCBvVWVznt6+ec/IbBn2 XTirdBC9Q2uu6TVxdSw5wbfQxUYwi2FWIgRX4iQ+YB+/VM4giOTkOF35OjnLQR7DUWaV lNKO0SZpWJlw8vVzIDWlw3J1Pv0tf06tqhGBsLobENjZD+IOfqGcJJ14Biwcjszc22JB sLrBgU9M2Iv4hpHrmojbfldkstOHBSCtqV05HjeVik445zJvGy/RVSxpX/w54osvqrIE bbwg== X-Gm-Message-State: AOAM532phNlSg2QfhElon0mcbYzHOOObLgySOLxvpWa1C/RkNOz1lff+ TTMnMEMgFUpduZ9et/Jx7HtHms/LUCE= X-Google-Smtp-Source: ABdhPJzyR4SA3jdz5U3nvCUipg7cCsfuXKS1CZL1MBWVZ6f4r1dvobbg/lUk3XapdUvCq5jlku1w4Q== X-Received: by 2002:a05:6a00:1409:: with SMTP id l9mr6766942pfu.23.1644046994463; Fri, 04 Feb 2022 23:43:14 -0800 (PST) Received: from localhost ([2601:647:6300:b760:de00:1a00:fcc4:87ef]) by smtp.gmail.com with ESMTPSA id f15sm4637871pfn.19.2022.02.04.23.43.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Feb 2022 23:43:14 -0800 (PST) Date: Fri, 4 Feb 2022 23:43:13 -0800 From: Fangrui Song To: Alan Modra Cc: binutils@sourceware.org Subject: Re: PR28827 testcase Message-ID: <20220205074313.fqmorplqrc7b2a4u@gmail.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-9.0 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, KAM_INFOUSMEBIZ, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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 07:43:17 -0000 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? SECTIONS { .text_low 0x2000: { *(.text_low) } .text_high 0x2002000 : { *(.text_high) } }