https://sourceware.org/bugzilla/show_bug.cgi?id=32961

--- Comment #21 from Zhiyuan Lv <zhiyuan.lv at linux dot intel.com> ---
(In reply to H.J. Lu from comment #13)
> (In reply to Zhiyuan Lv from comment #12)
> > Hi H.J.,
> > 
> > On Tue, May 13, 2025 at 07:15:14AM +0000, hjl.tools at gmail dot com wrote:
> > > https://sourceware.org/bugzilla/show_bug.cgi?id=32961
> > > 
> > > --- Comment #8 from H.J. Lu <hjl.tools at gmail dot com> ---
> > > (In reply to Zhiyuan Lv from comment #7)
> > > > And, the GCC version I used is 14.2.0, which will generate per function
> > > > section of "__patchable_function_entries". Thanks!
> > > 
> > > Now, the question is if GCC should generate a unique section name for
> > > __patchable_function_entries -ffunction-sections.  If I give you a
> > 
> > Just curious: is the same name a problem here? I saw that gcc 14
> > generates __patchable** sections for each function with the same name,
> > and they seem to work fine: each section has its own relocation section
> > respectively. Why does "-ffunction-sections" cause problems? Thanks!
> > 
> 
> It is the similar problem on GCC side. -fpatchable-function-entry doesn't
> work with -ffunction-sections. My GCC patch should fix it.

Could you elaborate more why the two parameters cannot work together?

I am still wondering whether it is possible to avoid compiler change. With GCC
14 in Ubuntu 24.04, I can see that gcc generates __patchable_function_entries
sections per function with the same name, and GAS/LD seems to treat them
separately so they do not introduce unnecessary dependencies. So, the same name
of __patchable_function_entries is not a problem.

IIUC, all we need is unique name for .pushsection, and your latest patch has
already ensured that. Today I also tested that with unmodified gcc 14, all my
tests passed. Thanks!

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to