This repository was archived by the owner on Jan 10, 2025. It is now read-only.
Conversation
0a5c3c2 to
f6fa3a3
Compare
alessandrod
reviewed
Jul 13, 2023
src/elf.rs
Outdated
|
|
||
| impl<T: Copy + PartialEq> FunctionRegistry<T> { | ||
| /// Register a symbol with an explicit key | ||
| pub fn register_function(&mut self, key: u32, name: Vec<u8>, value: T) -> Result<(), ElfError> { |
There was a problem hiding this comment.
Here and in the other register_*, it should be name: impl Into<Vec<u8>>
src/elf.rs
Outdated
| } else { | ||
| let mut key = [0u8; mem::size_of::<u64>()]; | ||
| LittleEndian::write_u64(&mut key, usize::from(value) as u64); | ||
| ebpf::hash_symbol_name(&key) |
There was a problem hiding this comment.
&usize::from(value).to_le_bytes() ?
f6fa3a3 to
c795320
Compare
Codecov Report
@@ Coverage Diff @@
## main #484 +/- ##
==========================================
+ Coverage 89.51% 89.66% +0.15%
==========================================
Files 23 23
Lines 10055 10095 +40
==========================================
+ Hits 9001 9052 +51
+ Misses 1054 1043 -11
|
alessandrod
approved these changes
Jul 13, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Unifies the function registries of
ExecutableandBuiltinProgram.