Skip to content

Commit

Permalink
Remove unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
0152la committed Feb 26, 2024
1 parent 2fd8c54 commit 8e898df
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
2 changes: 0 additions & 2 deletions include/compartment.h
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,6 @@ comp_from_elf(char *, char **, size_t, char **, void **, size_t, void *);
void
comp_add_intercept(struct Compartment *, uintptr_t, uintptr_t);
void
comp_stack_push(struct Compartment *, const void *, size_t);
void
comp_map(struct Compartment *);
void
comp_map_full(struct Compartment *);
Expand Down
10 changes: 0 additions & 10 deletions src/compartment.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,16 +264,6 @@ comp_add_intercept(struct Compartment *new_comp, uintptr_t intercept_target,
new_comp->intercept_patches[new_comp->curr_intercept_count - 1] = new_patch;
}

void
comp_stack_push(
struct Compartment *comp, const void *to_push, size_t to_push_sz)
{
comp->stack_pointer = (char *) comp->stack_pointer - to_push_sz;
memcpy((void *) comp->stack_pointer, to_push, to_push_sz);
assert(comp->stack_pointer > (void *) ((char *) comp->scratch_mem_stack_top
- comp->scratch_mem_stack_size));
}

/* Map a struct Compartment into memory, making it ready for execution
*/
void
Expand Down

0 comments on commit 8e898df

Please sign in to comment.