Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Abhay Kandpal <abhay@linux.ibm.com>
To: Ulrich Weigand <Ulrich.Weigand@de.ibm.com>,
	"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Cc: Abhay Kandpal <Abhay.k@ibm.com>, "cel@linux.ibm.com" <cel@linux.ibm.com>
Subject: Re: [PATCHi v1] PowerPC: Create call stubs for compiled modules
Date: Thu, 20 Aug 2026 00:09:39 +0530	[thread overview]
Message-ID: <8bd56e49-bedd-4f5b-9362-63b369d49aa5@linux.ibm.com> (raw)
In-Reply-To: <d616d601c9be9be47e15a806fe1d3675b23e1b69.camel@de.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 1053 bytes --]

Hi Ulrich,

That was it, thanks.|-mlongcall -mno-pltseq| fixes the problem.
GCC now loads the target from the module's own .toc via TOC16_HA/TOC16_LO_DS,
which BFD resolves normally, and emits the r2 save and restore around the call itself.

I have created a new patch which adds these to the PowerPC compile options;
I've dropped the call stub patch. Tested on powerpc64le-linux,
no unexpected failures in the full testsuite.

Thanks,
Abhay


On 19/08/26 18:09, Ulrich Weigand wrote:
> Abhay Kandpal<abhay@linux.ibm.com> wrote:
>
>>    24:    std     r2,24(r1)
>>    30:    addis   r12,r2,0
>>              30: R_PPC64_PLT16_HA    _setjmp
>>    34:    ld      r12,0(r12)
>>              34: R_PPC64_PLT16_LO_DS    _setjmp
>> 80:    mtctr   r12
>>              80: R_PPC64_PLTSEQ    longjmp
>> 84:    bctrl
>>              84: R_PPC64_PLTCALL    longjmp
>>    88:    ld      r2,24(r1)
> I think you also need the -mno-pltseq option to get rid of
> this inlined PLT sequence.
>>
> Bye,
> Ulrich

[-- Attachment #2: Type: text/html, Size: 2280 bytes --]

      reply	other threads:[~2026-08-19 18:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-13  9:28 Abhay Kandpal
2026-08-18 12:19 ` Ulrich Weigand
2026-08-18 17:47   ` Abhay Kandpal
2026-08-19 12:39     ` Ulrich Weigand
2026-08-19 18:39       ` Abhay Kandpal [this message]

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=8bd56e49-bedd-4f5b-9362-63b369d49aa5@linux.ibm.com \
    --to=abhay@linux.ibm.com \
    --cc=Abhay.k@ibm.com \
    --cc=Ulrich.Weigand@de.ibm.com \
    --cc=cel@linux.ibm.com \
    --cc=gdb-patches@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