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

aot: Enable aot built bpftrace programs to run on their own #3104

Merged
merged 2 commits into from
May 26, 2024

Commits on May 22, 2024

  1. aot: Enable aot built binaries to run

    Fixes a couple issues with aot built binaries that was preventing
    runtime from functioning.
    
    Namely, we were looking in the wrong place in the ELF file for the
    custom .btaot section that we added. We were also not serializing the
    map of BpfMaps contained in BpfBytecode, which is necessary for runtime.
    Finally, I fixed maps not being printed out correctly when bpftrace exits.
    arthurshau committed May 22, 2024
    Configuration menu
    Copy the full SHA
    da20854 View commit details
    Browse the repository at this point in the history
  2. aot: Allow running aot binaries directly without calling runtime shim

    Currently, even though we make a copy of the runtime shim and then
    embed the necessary metadata + bytecode into the binary, you still need
    to pass that binary as an argument to the runtime shim in order to run
    it (i.e. you need to do 'bpftrace-aotrt <file_name>'). Since the binary
    can fully function on its own, we don't need to do this anymore.
    
    This commit makes the executable just look inside itself for the
    metadata and bytecode, skipping the need to call bpftrace-aotrt. (i.e.
    you can now run the binary with just ./<file_name>.)
    arthurshau committed May 22, 2024
    Configuration menu
    Copy the full SHA
    318d4bd View commit details
    Browse the repository at this point in the history