Skip to content

Commit

Permalink
Accomodate changed map_file()
Browse files Browse the repository at this point in the history
  • Loading branch information
bediger4000 committed May 11, 2017
1 parent 5f78a75 commit 5d5a244
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dyn_unmap_run.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ void c_main(int ac, char **av, char **env)
int how_to_map = 0;
void *mapped;
void *entry_point;
struct stat sb;
unsigned long dummy;
Elf64_Ehdr *elf_ehdr, *ldso_ehdr;
struct saved_block *argvb, *envb, *elfauxvb;
int trim_args;
Expand All @@ -55,12 +55,12 @@ void c_main(int ac, char **av, char **env)
if (file_to_unmap)
unmap(file_to_unmap);

mapped = map_file(file_to_map);
mapped = map_file(file_to_map, &dummy);
elf_ehdr = (Elf64_Ehdr *)mapped;

entry_point = load_elf(mapped, how_to_map, &elf_ehdr, &ldso_ehdr);

linux_munmap(mapped, sb.st_size);
linux_munmap(mapped, dummy);

argvb = save_argv(ac - trim_args, &av[trim_args]);
envb = save_argv(0, env);
Expand Down

0 comments on commit 5d5a244

Please sign in to comment.