Files
Khem Raj ec72249e3a xdp-tools: Fix embedded BPF objects when linking with lld
libxdp turns its BPF programs into linkable objects with a relocatable
link of a raw binary input (cc -r -Wl,--format=binary). Because there is
no real object among the inputs, lld on riscv64 writes an object with
e_flags 0 (soft-float ABI) and a GNU property note with every CFI feature
bit set. Linking it then fails with clang:

  ld.lld: error: libxdp.a(xdp-dispatcher.embed.o): file has conflicting
    properties: GNU_PROPERTY_RISCV_FEATURE_1_CFI_LP_UNLABELED and
    GNU_PROPERTY_RISCV_FEATURE_1_CFI_LP_FUNC_SIG
  ld.lld: error: libxdp.a(xdp-dispatcher.embed.o): cannot link object
    files with different floating-point ABI from Scrt1.o

Build the embed objects from a small .incbin assembly stub instead, so the
compiler driver emits them with the correct target ABI.

AI-Generated: Uses Claude Code
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
2026-10-19 15:08:27 -07:00
..