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

--- Comment #4 from Sourceware Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Vineet Gupta <[email protected]>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=31393a5fd0e88f3e1384665352a7e13cfdd70e38

commit 31393a5fd0e88f3e1384665352a7e13cfdd70e38
Author: Vineet Gupta <[email protected]>
Date:   Thu Sep 10 09:14:22 2026 +0530

    gas: bpf: test `gotol' in a compound conditional

    The PR gas/34558 coverage added with the fix exercises only the standalone
    `gotol'.  That case can also be fixed by moving BPF_INSN_JAL above
    BPF_INSN_JAR in bpf_opcodes[], so that `gotol%w%d32' is tried before
    `goto%w%d16'.  The compound conditional jumps embed the same `goto%w%d16'
    and have no `gotol' counterpart to reorder ahead of them, so they stay
    broken under that approach:

      if r1 > r2 gotol +1

    assembles silently to JGT with a R_BPF_GNU_64_16 relocation against an
    undefined symbol `l'.  Conditional jumps only have the 16-bit `off' field,
    so there is no `gotol' form of them.

    Add a test for the compound forms, so the reordering alternative does not
    look equivalent to %t.  Verified that it fails when %t is replaced by the
    reordering: no diagnostic, and each of its three lines silently encoded as
    a conditional jump with a relocation against `l'.

    gas/
            * testsuite/gas/bpf/jump-gotol-cond-pseudoc.s: New test.
            * testsuite/gas/bpf/jump-gotol-cond-pseudoc.d: New test.
            * testsuite/gas/bpf/jump-gotol-cond-pseudoc.l: New test.
            * testsuite/gas/bpf/bpf.exp: Run it.

    Signed-off-by: Vineet Gupta <[email protected]>

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

Reply via email to