[PATCH 2/7] x86: handle a local IFUNC referenced only from a non-alloc section

Jan Beulich jbeulich@suse.com
Fri Nov 13 13:06:29 GMT 2026


On 13.11.2026 13:45, Harshit Kumar wrote:
>> How did you pick this insertion point?
> 
> On purpose ahead of the return.  The new tests are static links with
> no shared library or run step, so they don't need a Linux target,

But a GNU one at least, i.e. ...

> and I wanted x86_64-elf to run them too.

... I'm not sure these tests should work as expected there. (IOW if they
do, this may point at another problem.)

>  In x86-64.exp I first had them
> after pr20253-5b, but in an x86_64-elf build that is past the return
> and they silently stopped running, so I put them at the end of the
> pr-numbered run instead (after pr20093-2).  In i386.exp they follow
> pr20253-5, the end of the IFUNC tests there.  All eight pass in an
> x86_64-elf build as well as natively.  The ifunc-textrel tests below
> the return link with -pie, which I took to be why they are there.
> 
>> These -melf_i386 (if really needed) may in fact get in the way of
>> invoking these testcases ahead of said conditional return.
> 
> The neighbouring tests use -melf_i386 and -melf_x86_64 the same way
> (e.g. pr20253-5, pr20093-2), and they work on x86_64-elf.  I can drop
> the option if you prefer.

I think all options explicitly specified should be there for a reason.
Hence if there's none here, I'd prefer them to be omitted.

>> Note also that there is a whole ld-ifunc/ subdir.
> 
> ld-ifunc/ holds mostly shared or run tests built from C, and the
> related pr22929 test lives in ld-i386/ and ld-x86-64/, so I'd keep
> them there unless you prefer otherwise.

I have no particular preference, seeing that it's a mix already.

Jan


More information about the Binutils mailing list