Lines Matching +full:00 +full:a
34 0: 18 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 r1 = 0 ll
36 2: 61 11 00 00 00 00 00 00 r1 = *(u32 *)(r1 + 0)
37 3: 18 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 r2 = 0 ll
39 5: 61 20 00 00 00 00 00 00 r0 = *(u32 *)(r2 + 0)
40 6: 0f 10 00 00 00 00 00 00 r0 += r1
41 7: 18 01 00 00 08 00 00 00 00 00 00 00 00 00 00 00 r1 = 8 ll
43 9: 61 11 00 00 00 00 00 00 r1 = *(u32 *)(r1 + 0)
44 10: 0f 10 00 00 00 00 00 00 r0 += r1
45 11: 18 01 00 00 0c 00 00 00 00 00 00 00 00 00 00 00 r1 = 12 ll
47 13: 61 11 00 00 00 00 00 00 r1 = *(u32 *)(r1 + 0)
48 14: 0f 10 00 00 00 00 00 00 r0 += r1
49 15: 95 00 00 00 00 00 00 00 exit
82 has a type of ``R_BPF_64_64`` and refers to entry 7 in the symbol table.
83 The second relocation resolves to global variable ``g2`` which has a symbol
91 and represents a section. So for a static variable or function,
93 buffer, which is called ``A`` (addend). Looking at
98 In general, the ``A`` is 0 for global variables and functions,
111 1 R_BPF_64_64 ld_imm64 insn 32 r_offset + 4 S + A
112 2 R_BPF_64_ABS64 normal data 64 r_offset S + A
113 3 R_BPF_64_ABS32 normal data 32 r_offset S + A
114 4 R_BPF_64_NODYLD32 .BTF[.ext] data 32 r_offset S + A
115 10 R_BPF_64_32 call insn 32 r_offset + 4 (S + A) / 8 - 1
139 ``(S + A) / 8 - 1``.
148 int gfunc(int a, int b) {
149 return a * b;
152 int lfunc(int a, int b) {
153 return a + b;
156 int test(int a, int b) {
157 return gfunc(a, b) + lfunc(a, b) + global;
166 0: bf 26 00 00 00 00 00 00 r6 = r2
167 1: bf 17 00 00 00 00 00 00 r7 = r1
168 2: 85 10 00 00 ff ff ff ff call -1
170 3: bf 08 00 00 00 00 00 00 r8 = r0
171 4: bf 71 00 00 00 00 00 00 r1 = r7
172 5: bf 62 00 00 00 00 00 00 r2 = r6
173 6: 85 10 00 00 02 00 00 00 call 2
175 7: 0f 80 00 00 00 00 00 00 r0 += r8
176 8: 18 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 r1 = 0 ll
178 10: 61 11 00 00 00 00 00 00 r1 = *(u32 *)(r1 + 0)
179 11: 0f 10 00 00 00 00 00 00 r0 += r1
180 12: 95 00 00 00 00 00 00 00 exit
185 0: bf 20 00 00 00 00 00 00 r0 = r2
186 1: 2f 10 00 00 00 00 00 00 r0 *= r1
187 2: 95 00 00 00 00 00 00 00 exit
190 3: bf 20 00 00 00 00 00 00 r0 = r2
191 4: 0f 10 00 00 00 00 00 00 r0 += r1
192 5: 95 00 00 00 00 00 00 00 exit
194 The first relocation corresponds to ``gfunc(a, b)`` where ``gfunc`` has a value of 0,
196 The second relocation corresponds to ``lfunc(a, b)`` where ``lfunc`` has a section
198 The third relocation corresponds to ld_imm64 of ``global``, which has a section
206 Compiled with ``clang --target=bpf -O2 -g -c test.c``, we will see a
217 With ``llvm-readelf`` output, we can see that dwarf sections have a bunch of
226 000000000000001a 0000000400000003 R_BPF_64_ABS32 0000000000000000 .debug_str
250 From object file point of view CO-RE mechanism is implemented as a set
274 of a specific structure field in the target kernel.
282 value of a specific enum literal in the target kernel.
332 * for each member we recursively check match unless it is already behind a
337 * local variants have to have a match in target by symbolic name (but not
361 * ``insn_off`` - instruction offset (in bytes) within a code section
364 * ``type_id`` - BTF type ID of the "root" (containing) entity of a
371 a sequence of field and array indices, separated by colon (:). It's
373 arguments for identifying offset to a field. For example, consider the
379 int a;
385 * Access to ``s[0].a`` would be encoded as ``0:0``:
388 * ``0``: index of field ``a`` in ``struct sample``.
390 * Access to ``s->a`` would be encoded as ``0:0`` as well.
422 int a;
435 'a' type_id=3 bits_offset=0
451 *g = s->a;
452 s->a = 1;
455 00 <alpha>:
457 00: CO-RE <byte_off> [2] struct foo::a (0:0)
460 10: CO-RE <byte_off> [2] struct foo::a (0:0)