From: Alan Modra <amodra@gmail.com>
To: Fangrui Song <i@maskray.me>
Cc: binutils@sourceware.org
Subject: Re: PR28827 testcase
Date: Sat, 5 Feb 2022 20:30:23 +1030 [thread overview]
Message-ID: <Yf5Kt9WiP5RgmOQa@squeak.grove.modra.org> (raw)
In-Reply-To: <20220205074313.fqmorplqrc7b2a4u@gmail.com>
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
next prev parent reply other threads:[~2022-02-05 10:00 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
2022-02-05 10:00 ` Alan Modra [this message]
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=Yf5Kt9WiP5RgmOQa@squeak.grove.modra.org \
--to=amodra@gmail.com \
--cc=binutils@sourceware.org \
--cc=i@maskray.me \
/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).