Re: [PATCH v4 1/2] i386: Prefer PLT indirection for __fentry__ calls under -fPIC

2025-04-10 Thread Ard Biesheuvel
On Wed, 9 Apr 2025 at 16:46, H.J. Lu wrote: > > On Wed, Apr 9, 2025 at 1:53 AM Ard Biesheuvel wrote: > > > > From: Ard Biesheuvel > > > > Commit bde21de1205 ("i386: Honour -mdirect-extern-access when calling > > __fentry__") updated the logic that emits mcount() / __fentry__() calls > > into fun

Re: [PATCH v4 1/2] i386: Prefer PLT indirection for __fentry__ calls under -fPIC

2025-04-09 Thread Uros Bizjak
On Wed, Apr 9, 2025 at 6:21 PM H.J. Lu wrote: > fprintf (file, "1:\tcall\t*%s@GOT(%%ebx)\n", mcount_name); > diff --git a/gcc/testsuite/gcc.target/i386/pr119386-1.c > b/gcc/testsuite/gcc.target/i386/pr119386-1.c > index 174d00f1e27..56e44c89859 100644 > --- a/gcc/testsuite/gcc.target/i386/pr119

Re: [PATCH v4 1/2] i386: Prefer PLT indirection for __fentry__ calls under -fPIC

2025-04-09 Thread H.J. Lu
On Wed, Apr 9, 2025 at 1:53 AM Ard Biesheuvel wrote: > > From: Ard Biesheuvel > > Commit bde21de1205 ("i386: Honour -mdirect-extern-access when calling > __fentry__") updated the logic that emits mcount() / __fentry__() calls > into function prologues when profiling is enabled, to avoid GOT-based

Re: [PATCH v4 1/2] i386: Prefer PLT indirection for __fentry__ calls under -fPIC

2025-04-09 Thread H.J. Lu
On Wed, Apr 9, 2025 at 8:54 AM Ard Biesheuvel wrote: > > On Wed, 9 Apr 2025 at 16:46, H.J. Lu wrote: > > > > On Wed, Apr 9, 2025 at 1:53 AM Ard Biesheuvel wrote: > > > > > > From: Ard Biesheuvel > > > > > > Commit bde21de1205 ("i386: Honour -mdirect-extern-access when calling > > > __fentry__")

[PATCH v4 1/2] i386: Prefer PLT indirection for __fentry__ calls under -fPIC

2025-04-09 Thread Ard Biesheuvel
From: Ard Biesheuvel Commit bde21de1205 ("i386: Honour -mdirect-extern-access when calling __fentry__") updated the logic that emits mcount() / __fentry__() calls into function prologues when profiling is enabled, to avoid GOT-based indirect calls when a direct call would suffice. There are two