-
Notifications
You must be signed in to change notification settings - Fork 693
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
elf: library isn't compatible with libbpf section naming #1162
Labels
Comments
lmb
changed the title
libbpf ELF section compatibility
elf: library isn't compatible with libbpf section naming
Nov 1, 2023
lmb
added a commit
to lmb/ebpf
that referenced
this issue
Nov 7, 2023
We've historically relied on manually pulling in updated ELF section names from libbpf. This has led to errors creeping in as well as being constantly out of sync. Fix this by using a small awk script to pull the section definitions out of libbpf.c. We already rely on awk to update function names in the awk package so this isn't a new requirement. It turns out that we've strayed from libbpf in a couple of places. This commit adds compatibility behaviour to avoid outward visible changes for the section names we have tests for. The old generate-btf target is repurposed to do the generation and therefore renamed to update-kernel-deps. Fixes cilium#1162 Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
lmb
added a commit
to lmb/ebpf
that referenced
this issue
Nov 7, 2023
We've historically relied on manually pulling in updated ELF section names from libbpf. This has led to errors creeping in as well as being constantly out of sync. Fix this by using a small awk script to pull the section definitions out of libbpf.c. We already rely on awk to update function names in the awk package so this isn't a new requirement. It turns out that we've strayed from libbpf in a couple of places. This commit adds compatibility behaviour to avoid outward visible changes for the section names we have tests for. The old generate-btf target is repurposed to do the generation and therefore renamed to update-kernel-deps. Fixes cilium#1162 Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
lmb
added a commit
to lmb/ebpf
that referenced
this issue
Nov 7, 2023
We've historically relied on manually pulling in updated ELF section names from libbpf. This has led to errors creeping in as well as being constantly out of sync. Fix this by using a small awk script to pull the section definitions out of libbpf.c. We already rely on awk to update function names in the awk package so this isn't a new requirement. It turns out that we've strayed from libbpf in a couple of places. This commit adds compatibility behaviour to avoid outward visible changes for the section names we have tests for. The old generate-btf target is repurposed to do the generation and therefore renamed to update-kernel-deps. Fixes cilium#1162 Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
lmb
added a commit
to lmb/ebpf
that referenced
this issue
Nov 8, 2023
We've historically relied on manually pulling in updated ELF section names from libbpf. This has led to errors creeping in as well as being constantly out of sync. Fix this by using a small awk script to pull the section definitions out of libbpf.c. We already rely on awk to update function names in the awk package so this isn't a new requirement. It turns out that we've strayed from libbpf in a couple of places. This commit adds compatibility behaviour to avoid outward visible changes for the section names we have tests for. The old generate-btf target is repurposed to do the generation and therefore renamed to update-kernel-deps. Fixes cilium#1162 Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
lmb
added a commit
to lmb/ebpf
that referenced
this issue
Nov 9, 2023
We've historically relied on manually pulling in updated ELF section names from libbpf. This has led to errors creeping in as well as being constantly out of sync. Fix this by using a small awk script to pull the section definitions out of libbpf.c. We already rely on awk to update function names in the awk package so this isn't a new requirement. It turns out that we've strayed from libbpf in a couple of places. This commit adds compatibility behaviour to avoid outward visible changes for the section names we have tests for. The old generate-btf target is repurposed to do the generation and therefore renamed to update-kernel-deps. Fixes cilium#1162 Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We're no longer fully compatible with libbpf when it comes to ELF section naming (see libbpf docs). We treat all section name patterns as prefixes and don't obey the
+
specifier. We've simply been adding to the list without keeping up with libbpf's underlying logic.This issue is for investigating the differences and looking how we can close the gap, ideally with minimal breakage.
Tasks
The text was updated successfully, but these errors were encountered: