Commit 85264316 authored by Alexey Dobriyan's avatar Alexey Dobriyan Committed by Linus Torvalds

fs//binfmt_elf.c: move variables initialization closer to their usage

Link: http://lkml.kernel.org/r/20190416202002.GB24304@avx2Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent be0deb58
...@@ -732,14 +732,6 @@ static int load_elf_binary(struct linux_binprm *bprm) ...@@ -732,14 +732,6 @@ static int load_elf_binary(struct linux_binprm *bprm)
goto out; goto out;
elf_ppnt = elf_phdata; elf_ppnt = elf_phdata;
elf_bss = 0;
elf_brk = 0;
start_code = ~0UL;
end_code = 0;
start_data = 0;
end_data = 0;
for (i = 0; i < loc->elf_ex.e_phnum; i++, elf_ppnt++) { for (i = 0; i < loc->elf_ex.e_phnum; i++, elf_ppnt++) {
char *elf_interpreter; char *elf_interpreter;
loff_t pos; loff_t pos;
...@@ -887,6 +879,14 @@ static int load_elf_binary(struct linux_binprm *bprm) ...@@ -887,6 +879,14 @@ static int load_elf_binary(struct linux_binprm *bprm)
if (retval < 0) if (retval < 0)
goto out_free_dentry; goto out_free_dentry;
elf_bss = 0;
elf_brk = 0;
start_code = ~0UL;
end_code = 0;
start_data = 0;
end_data = 0;
/* Now we do a little grungy work by mmapping the ELF image into /* Now we do a little grungy work by mmapping the ELF image into
the correct location in memory. */ the correct location in memory. */
for(i = 0, elf_ppnt = elf_phdata; for(i = 0, elf_ppnt = elf_phdata;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment