File: relocs_read_tgt.c

package info (click to toggle)
golang-github-cilium-ebpf 0.17.3%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 4,684 kB
  • sloc: ansic: 1,259; makefile: 127; python: 113; awk: 29; sh: 24
file content (30 lines) | stat: -rw-r--r-- 698 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*
	This file exists to emit ELFs with specific BTF types to use as target BTF
	in tests. It can be made redundant when btf.Spec can be handcrafted and
	passed as a CO-RE target in the future.
*/

struct s {
	char a;
	char b;
};

struct s *unused_s __attribute__((unused));

typedef unsigned int my_u32;
typedef unsigned char u8;
typedef unsigned short u16;
typedef unsigned int u32;
typedef unsigned long u64;

struct bits {
	/*int x;*/
	u8 b : 2, a : 4; /* a was before b */
	my_u32 d : 2; /* was 'unsigned int' */
	u16 c : 1; /* was before d */
	enum { ZERO = 0, ONE = 1 } e : 1;
	u16 f; /* was: u64 f:16 */
	u32 g : 30; /* was: u64 g:30 */
};

struct bits *unused_bits __attribute__((unused));