public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Fangrui Song <i@maskray.me>
To: Alan Modra <amodra@gmail.com>
Cc: binutils@sourceware.org
Subject: Re: PR28827 testcase
Date: Fri, 4 Feb 2022 23:43:13 -0800	[thread overview]
Message-ID: <20220205074313.fqmorplqrc7b2a4u@gmail.com> (raw)
In-Reply-To: <Yf4fbpopDkXg5MMb@squeak.grove.modra.org>

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) }
}

  reply	other threads:[~2022-02-05  7:43 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-05  6:55 Alan Modra
2022-02-05  7:43 ` Fangrui Song [this message]
2022-02-05 10:00   ` Alan Modra
2022-02-05 10:39 ` Nick Clifton
2022-02-06  4:17   ` Alan Modra
2022-02-06  4:26     ` H.J. Lu
2022-02-06 22:54       ` Alan Modra
2022-02-06 23:38         ` H.J. Lu
2022-02-07  3:15           ` Alan Modra
2022-02-07  4:05             ` H.J. Lu
2022-02-07  5:32               ` Alan Modra
2022-02-08 11:41                 ` Nick Clifton
2022-02-08 13:03                   ` H.J. Lu
2022-02-08 23:48                   ` Alan Modra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220205074313.fqmorplqrc7b2a4u@gmail.com \
    --to=i@maskray.me \
    --cc=amodra@gmail.com \
    --cc=binutils@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).