Re: [PATCH] i386: Prefer PLT indirection for __fentry__ calls under -fPIC

2025-04-08 Thread Alexander Monakov
On Sun, 6 Apr 2025, Ard Biesheuvel wrote: > > Note that this patch touches only 64-bit codegen, -m32 will yield > > call *mcount@GOT as before (the previous patch also touched only 64-bit > > case). > > > > I will mention this in the commit log. Just wanted to remind about this, since v2 seem

Re: [PATCH] i386: Prefer PLT indirection for __fentry__ calls under -fPIC

2025-04-06 Thread H.J. Lu
On Sun, Apr 6, 2025 at 8:54 AM H.J. Lu wrote: > > On Fri, Apr 4, 2025 at 12:01 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

Re: [PATCH] i386: Prefer PLT indirection for __fentry__ calls under -fPIC

2025-04-06 Thread H.J. Lu
On Fri, Apr 4, 2025 at 12:01 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-base

Re: [PATCH] i386: Prefer PLT indirection for __fentry__ calls under -fPIC

2025-04-06 Thread Alexander Monakov
On Sun, 6 Apr 2025, Ard Biesheuvel wrote: > > Wrong changelog (reused from the earlier patch?) > > The entry should mention PR category/number. > > > > Thanks, > > How should I generate this PR, and this changelog? Piping the diff into 'contrib/mklog.py -b 119386' should do the trick (you'll

Re: [PATCH] i386: Prefer PLT indirection for __fentry__ calls under -fPIC

2025-04-06 Thread Ard Biesheuvel
On Sun, 6 Apr 2025 at 12:58, Alexander Monakov wrote: > > On Fri, 4 Apr 2025, 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 functio

Re: [PATCH] i386: Prefer PLT indirection for __fentry__ calls under -fPIC

2025-04-06 Thread Alexander Monakov
On Fri, 4 Apr 2025, 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 > indirect

Re: [PATCH] i386: Prefer PLT indirection for __fentry__ calls under -fPIC

2025-04-06 Thread Uros Bizjak
On Fri, Apr 4, 2025 at 9:00 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

[PATCH] i386: Prefer PLT indirection for __fentry__ calls under -fPIC

2025-04-04 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