[PATCH 2/7] x86: handle a local IFUNC referenced only from a non-alloc section
Harshit Kumar
harshit7kr@gmail.com
Fri Nov 13 12:43:45 GMT 2026
Hi Jan,
> Question is: Why don't you replace those existing incarnations of the
> rule enforcement then?
I left them alone to keep the series a fix rather than a refactor (the
cover letter says so). I'm happy to convert them, though: v2 will make
the global-symbol code in x86, AArch64, RISC-V and SPARC use the helper
too, and (per the 0/7 thread) have it treat debugging sections like
SHT_NOTE, unless Alan objects.
> Pointer-to-const for the function argument?
Yes, will do.
Thanks,
Harshit
On Fri, 13 Nov 2026 at 17:03, Jan Beulich <jbeulich@suse.com> wrote:
>
> On 11.11.2026 12:03, Harshit Kumar wrote:
> > --- a/ld/testsuite/ld-i386/i386.exp
> > +++ b/ld/testsuite/ld-i386/i386.exp
> > @@ -445,6 +445,10 @@ run_dump_test "pr20253-4a"
> > run_dump_test "pr20253-4b"
> > run_dump_test "pr20253-4c"
> > run_dump_test "pr20253-5"
> > +run_dump_test "ifunc-skip-nonalloc"
> > +run_dump_test "ifunc-note-nonalloc"
> > +run_dump_test "ifunc-plain-nonalloc"
> > +run_dump_test "ifunc-global-plain-nonalloc"
> > run_dump_test "pr20515"
> > run_dump_test "property-x86-3"
> > run_dump_test "property-x86-4a"
>
> How did you pick this insertion point? There are a few ifunc tests invoked
> further down, after a conditional return from the script. Aiui either your
> new tests need to be put below there, or you're indicating that the existing
> ifunc ones there are misplaced any want moving up ahead.
>
> Note also that there is a whole ld-ifunc/ subdir. Whether putting the new
> tests there instead would be the right thing I don't know, though, as I'm
> unaware of the criteria which were used for the split.
>
> > --- /dev/null
> > +++ b/ld/testsuite/ld-i386/ifunc-global-plain-nonalloc.d
> > @@ -0,0 +1,4 @@
> > +#name: global IFUNC symbol referenced from a plain non-alloc section
> > +#as: --32
> > +#ld: -e _start -melf_i386
>
> These -melf_i386 (if really needed) may in fact get in the way of invoking
> these testcases ahead of said conditional return.
>
> Similar remarks for the x86-64 part.
>
> Jan
More information about the Binutils
mailing list