Skip to content
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_reader: check if ELF is for BPF data #830

Merged
merged 1 commit into from
Nov 2, 2022

Conversation

florianl
Copy link
Contributor

Signed-off-by: Florian Lehner dev@der-flo.net

Perfom a basic check on the given ELF. This change adopts the check that is happening also in other loader:

https://github.com/libbpf/libbpf/blob/c97b16d96c8b1771973dba1596477f7d7e9ba201/src/libbpf.c#L1380-L1385

elf_reader.go Outdated Show resolved Hide resolved
Signed-off-by: Florian Lehner <dev@der-flo.net>
@ti-mo
Copy link
Collaborator

ti-mo commented Nov 2, 2022

Changed the error string to unexpected machine type for BPF ELF: %s. Thanks for the patch!

@ti-mo ti-mo merged commit a9cf21d into cilium:master Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants