...

Text file src/github.com/cilium/ebpf/btf/testdata/relocs_read_tgt.c

Documentation: github.com/cilium/ebpf/btf/testdata

     1/*
     2	This file exists to emit ELFs with specific BTF types to use as target BTF
     3	in tests. It can be made redundant when btf.Spec can be handcrafted and
     4	passed as a CO-RE target in the future.
     5*/
     6
     7struct s {
     8	char a;
     9	char b;
    10};
    11
    12struct s *unused_s __attribute__((unused));
    13
    14typedef unsigned int my_u32;
    15typedef unsigned char u8;
    16typedef unsigned short u16;
    17typedef unsigned int u32;
    18typedef unsigned long u64;
    19
    20struct bits {
    21	/*int x;*/
    22	u8 b : 2, a : 4; /* a was before b */
    23	my_u32 d : 2;    /* was 'unsigned int' */
    24	u16 c : 1;       /* was before d */
    25	enum { ZERO = 0, ONE = 1 } e : 1;
    26	u16 f;      /* was: u64 f:16 */
    27	u32 g : 30; /* was: u64 g:30 */
    28};
    29
    30struct bits *unused_bits __attribute__((unused));

View as plain text