forked from rlane/ubpf
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
adding support for clang relocations #102
Closed
Closed
Commits on Jul 13, 2022
-
Separate out JITting from interpreting
This patch separates out the JITter from the interpreter. It adds a "null" JIT which just errors out. After this patch is applied it is possible to build on non-x86-64 platforms and run the interpreter without worrying about the JIT. This is achieved by adding a translate function-pointer member to the ubpf_vm struct. ubpf_create() then sets the pointer up to the correct JIT. Finally ubpf_translate() now delegates to that function pointer. To enable code reuse some common code from ubpf_jit_x86_64.c is moved into a new file ubpf_jit.c. Also what was ubpf_translate() in ubpf_jit_x86_64.c is renmaed ubpf_translate_x86_64.c. The build process assumes that all backends can be compiled on all platforms. It then relies on the linker to not link in unused backends. The code also assumes that only the JIT backend targeting the platform the code is run on will is needed. Finally, the testing infrastructure is updated to support non-x86-64 platforms.
Configuration menu - View commit details
-
Copy full SHA for 9e263f7 - Browse repository at this point
Copy the full SHA 9e263f7View commit details -
The elf tests fail on Arm but not x86-64. This seems to be due to the local field of st_other not eing set on symbols. We work around this issue by setting local to 0 on all symbols. This is a good catch-all value as it generally means "default".
Configuration menu - View commit details
-
Copy full SHA for aea2e64 - Browse repository at this point
Copy the full SHA aea2e64View commit details -
Configuration menu - View commit details
-
Copy full SHA for b6e33da - Browse repository at this point
Copy the full SHA b6e33daView commit details -
Configuration menu - View commit details
-
Copy full SHA for 025fcc5 - Browse repository at this point
Copy the full SHA 025fcc5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3d2f44e - Browse repository at this point
Copy the full SHA 3d2f44eView commit details -
This can be useful to: - Inspect registers after program execution. - Determine where registers should be stored. Signed-off-by: Martin Ichilevici de Oliveira <martin.i.oliveira@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 00456ac - Browse repository at this point
Copy the full SHA 00456acView commit details -
Add initial Arm64 JIT implementation
This adds initial implementation of the Arm64 JIT.
Configuration menu - View commit details
-
Copy full SHA for 1d3a04f - Browse repository at this point
Copy the full SHA 1d3a04fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0729595 - Browse repository at this point
Copy the full SHA 0729595View commit details -
Configuration menu - View commit details
-
Copy full SHA for a34e1b5 - Browse repository at this point
Copy the full SHA a34e1b5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7d6f312 - Browse repository at this point
Copy the full SHA 7d6f312View commit details -
Configuration menu - View commit details
-
Copy full SHA for bad0643 - Browse repository at this point
Copy the full SHA bad0643View commit details -
Configuration menu - View commit details
-
Copy full SHA for eeba4ba - Browse repository at this point
Copy the full SHA eeba4baView commit details -
Configuration menu - View commit details
-
Copy full SHA for 167bcfc - Browse repository at this point
Copy the full SHA 167bcfcView commit details -
Configuration menu - View commit details
-
Copy full SHA for e215432 - Browse repository at this point
Copy the full SHA e215432View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5c11221 - Browse repository at this point
Copy the full SHA 5c11221View commit details -
adding support for clang relocations
Added support for clang function and string relocations, these show as up as R_BPF_64_64 and R_BPF_64_32 in *-readelf relocations. Support for nosetests elf tests is still TBD. Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Configuration menu - View commit details
-
Copy full SHA for 3f28fd2 - Browse repository at this point
Copy the full SHA 3f28fd2View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.