Commit 27dfe16
libbpf-cargo: Don't provide kconfig data access after "open"
The .kconfig section is special in that libbpf sets its values as part
of the load procedure. That means that until then, i.e., during open,
contents are invalid. To that end the library doesn't even set the mmap
pointer to anything but NULL, despite all heuristics pointing at it
being mmapable and whatnot.
That's a problem for us, because we generate section contents and
attempt to have them reference this nonexistent mmap area, which will
fail.
Work around the issue by special casing this section and not emitting
data access functionality for the OpenMaps type.
Closes: #909
Signed-off-by: Daniel Müller <[email protected]>1 parent c38b01a commit 27dfe16
2 files changed
+57
-29
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
1 | 6 | | |
2 | 7 | | |
3 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
49 | 57 | | |
50 | 58 | | |
51 | 59 | | |
| |||
82 | 90 | | |
83 | 91 | | |
84 | 92 | | |
85 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
86 | 98 | | |
87 | 99 | | |
88 | 100 | | |
89 | | - | |
| 101 | + | |
90 | 102 | | |
91 | 103 | | |
92 | 104 | | |
93 | 105 | | |
| 106 | + | |
94 | 107 | | |
95 | 108 | | |
96 | 109 | | |
| |||
124 | 137 | | |
125 | 138 | | |
126 | 139 | | |
| 140 | + | |
127 | 141 | | |
128 | | - | |
129 | 142 | | |
130 | 143 | | |
131 | 144 | | |
| |||
399 | 412 | | |
400 | 413 | | |
401 | 414 | | |
402 | | - | |
403 | | - | |
404 | | - | |
405 | | - | |
406 | | - | |
407 | | - | |
408 | | - | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | | - | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
413 | 433 | | |
414 | 434 | | |
415 | 435 | | |
| |||
486 | 506 | | |
487 | 507 | | |
488 | 508 | | |
| 509 | + | |
489 | 510 | | |
490 | 511 | | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | | - | |
495 | | - | |
496 | | - | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | | - | |
501 | | - | |
502 | | - | |
503 | | - | |
504 | | - | |
505 | | - | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
506 | 529 | | |
507 | 530 | | |
508 | 531 | | |
| |||
0 commit comments