Issue eBPF kernel programs with ldc?
Richard (Rikki) Andrew Cattermole
richard at cattermole.co.nz
Tue Jan 7 00:06:33 UTC 2025
On 07/01/2025 12:03 AM, data pulverizer wrote:
> On Monday, 6 January 2025 at 07:26:02 UTC, Richard (Rikki) Andrew
> Cattermole wrote:
>> On 06/01/2025 5:27 AM, data pulverizer wrote:
>>> @(ldc.attributes.section("xdp_md"))
>>> struct xdp_md {
>>
>> I don't understand why you gave a type declaration a section.
>>
>> Its not done on the C side.
>>
>> https://github.com/libbpf/libbpf/blob/
>> c5f22aca0f3aa855daa159b2777472b35e721804/include/uapi/linux/bpf.h#L6449
>>
>> And this error would imply it too:
>>
>> ``[1] PTR hello_world.xdp_md* type_id=2 Invalid name``
The only solution I can think of is to use pragma mangle on the struct,
but otherwise I think you need to ask on ldc's bug tracker.
More information about the Digitalmars-d-learn
mailing list